cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a user directory with MSSQL datasource

ndesprez_
Champ in-the-making
Champ in-the-making

I'm trying to create a new user directory. The data comes from a bespoke SQL Server 2008 database, exposed as a view named "vUser". I've declared a datasource in a separate file, stored as Nuxeo/nxserver/config/sqlds-config.xml:

  <component name="org.nuxeo.runtime.datasource.project">
  <extension target="org.nuxeo.runtime.datasource.DataSourceDescriptor" point="datasources">
  <datasource maxActive="20" maxIdle="5" maxWait="10000" name="jdbc/project" driverClassName="net.sourceforge.jtds.jdbcx.JtdsDataSource">
  <property name="serverName">X.X.X.X  </property>
  <property name="portNumber">1433  </property>
  <property name="databaseName">database  </property>
  <property name="user">user  </property>
  <property name="password">password  </property>
  </datasource>
  </extension>
  </component>

I've declared the user directory in another file, Nuxeo/nxserver/config/userprojects-config.xml:

  <component name="org.nuxeo.ecm.directory.project">
  <implementation class="org.nuxeo.ecm.directory.sql.SQLDirectoryDescriptor"/>
  <require>org.nuxeo.ecm.directory.sql.SQLDirectoryFactory  </require>
  <require>org.nuxeo.runtime.datasource.project  </require>
  <extension target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory" point="directories">
  <directory name="MyUserDirectory">
  <schema>user</schema>
  <idField>username</idField>
  <passwordField>password</passwordField>
  <passwordHashAlgorithm>SMD5</passwordHashAlgorithm>
  <autoincrementIdField>false</autoincrementIdField>
  <dataSource>jdbc/project</dataSource>
  <table>vUser</table>
  <createTablePolicy>never</createTablePolicy>
  <references>
  <inverseReference field="groups" directory="groupDirectory" dualReferenceField="members" />
  </references>
  </directory>
  </extension>
  </component>

When I start Nuxeo I get the following error:

org.nuxeo.ecm.directory.DirectoryException: org.nuxeo.ecm.core.api.WrappedException: Exception:
org.nuxeo.ecm.directory.DirectoryException. message: dataSource lookup failed
at org.nuxeo.ecm.directory.sql.SQLDirectoryProxy.getDirectory(SQLDirectoryProxy.java:51)
...

I'm obviously not declaring the datasource properly. What am I doing wrong?

5 REPLIES 5

Benjamin_Jalon1
Elite Collaborator
Elite Collaborator

Can you give us cause by exception. This only the High level exception. Can diagnostic it.

ndesprez_
Champ in-the-making
Champ in-the-making

This is another exception I get prior to the one above

Julien_Carsique
Elite Collaborator
Elite Collaborator

What is the version of Nuxeo?

ndesprez_
Champ in-the-making
Champ in-the-making

We're using 5.5.

Florent_Guillau
World-Class Innovator
World-Class Innovator

Are there any error or warning logs in server.log about org.nuxeo.runtime.datasource.project or sqlds-config.xml?

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.