2014-05-08 18:34 GMT+02:00 <[email protected]>: > Hi > > I am trying to build a system such as ActiveDirectory ---> OpenlDAP based > on LSC... > > So.. It seems I have successfully managed to create the bindings against > the AD directory but now I am having the following issue in the logs.. > > > ----- > > > May 08 12:06:31 - DEBUG - Reading sql-map-config.xml from > file:/etc/lsc/sql-map-config.xml > May 08 12:06:31 - ERROR - org.lsc.exception.LscConfigurationException: > java.lang.reflect.InvocationTargetException > May 08 12:06:31 - DEBUG - org.lsc.exception.LscConfigurationException: > java.lang.reflect.InvocationTargetException > org.lsc.exception.LscConfigurationException: java.lang.reflect. > InvocationTargetException > at org.lsc.Task.<init>(Task.java:127) ~[lsc-core-2.0.4.jar:na] > at org.lsc.SimpleSynchronize.init(SimpleSynchronize.java:103) > ~[lsc-core-2.0.4.jar:na] > at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:146) > ~[lsc-core-2.0.4.jar:na] > at org.lsc.Launcher.run(Launcher.java:224) [lsc-core-2.0.4.jar:na] > at org.lsc.Launcher.launch(Launcher.java:159) > [lsc-core-2.0.4.jar:na] > at org.lsc.Launcher.main(Launcher.java:142) > [lsc-core-2.0.4.jar:na] > Caused by: java.lang.reflect.InvocationTargetException: null > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) ~[na:1.7.0_55] > at sun.reflect.NativeConstructorAccessorImpl.newInstance( > NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_55] > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( > DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_55] > at java.lang.reflect.Constructor.newInstance(Constructor.java:526) > ~[na:1.7.0_55] > at org.lsc.Task.<init>(Task.java:120) ~[lsc-core-2.0.4.jar:na] > ... 5 common frames omitted > Caused by: org.lsc.exception.LscServiceConfigurationException: Something > bad happened while building the SqlMapClient > instance.java.lang.RuntimeException: > Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error > parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath > '/sqlMapConfig/properties'. Cause: java.lang.RuntimeException: Error > loading properties. Cause: java.io.IOException: Could not find resource > database.properties > at org.lsc.persistence.DaoConfig.getSqlMapClient(DaoConfig.java:140) > ~[lsc-core-2.0.4.jar:na] > at org.lsc.persistence.DaoConfig.getSqlMapClient(DaoConfig.java:159) > ~[lsc-core-2.0.4.jar:na] > at > org.lsc.service.AbstractJdbcService.<init>(AbstractJdbcService.java:105) > ~[lsc-core-2.0.4.jar:na] > at > org.lsc.service.SimpleJdbcSrcService.<init>(SimpleJdbcSrcService.java:120) > ~[lsc-core-2.0.4.jar:na] > ... 10 common frames omitted > Caused by: java.lang.RuntimeException: Error occurred. Cause: > com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: > java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/properties'. > Cause: java.lang.RuntimeException: Error loading properties. Cause: > java.io.IOException: Could not find resource database.properties > at > com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:49) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at > com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:39) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at > com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:79) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at org.lsc.persistence.DaoConfig.getSqlMapClient(DaoConfig.java:138) > ~[lsc-core-2.0.4.jar:na] > ... 13 common frames omitted > Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. > Cause: java.lang.RuntimeException: Error parsing XPath > '/sqlMapConfig/properties'. Cause: java.lang.RuntimeException: Error > loading properties. Cause: java.io.IOException: Could not find resource > database.properties > at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at > com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:46) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > ... 16 common frames omitted > Caused by: java.lang.RuntimeException: Error parsing XPath > '/sqlMapConfig/properties'. Cause: java.lang.RuntimeException: Error > loading properties. Cause: java.io.IOException: Could not find resource > database.properties > at > com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:51) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > ... 17 common frames omitted > Caused by: java.lang.RuntimeException: Error loading properties. Cause: > java.io.IOException: Could not find resource database.properties > at com.ibatis.sqlmap.engine.builder.xml.XmlParserState. > setGlobalProperties(XmlParserState.java:133) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at com.ibatis.sqlmap.engine.builder.xml. > SqlMapConfigParser$2.process(SqlMapConfigParser.java:83) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at > com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > ... 21 common frames omitted > Caused by: java.io.IOException: Could not find resource database.properties > at > com.ibatis.common.resources.Resources.getResourceAsStream(Resources.java:110) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at > com.ibatis.common.resources.Resources.getResourceAsStream(Resources.java:95) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at > com.ibatis.common.resources.Resources.getResourceAsProperties(Resources.java:126) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > at com.ibatis.sqlmap.engine.builder.xml.XmlParserState. > setGlobalProperties(XmlParserState.java:119) > ~[ibatis-sqlmap-2.3.4.726.jar:na] > > > ---- > > file /etc/lsc/sql-map-config.xml got the following: > > ---------- > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" > "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> > <sqlMapConfig> > > <properties resource="database.properties"/> > <transactionManager type="JDBC"> > <dataSource type="SIMPLE"> > <property name="JDBC.Driver" value="${driver}"/> > <property name="JDBC.ConnectionURL" value="${url}"/> > <property name="JDBC.Username" value="${username}"/> > <property name="JDBC.Password" value="${password}"/> > <property name="Pool.MaximumActiveConnections" value="15"/> > <property name="Pool.MaximumIdleConnections" value="15"/> > <property name="Pool.MaximumWait" value="1000"/> > </dataSource> > </transactionManager> > > <sqlMap url="file://${lsc.config}/sql-map-config.d/InetOrgPerson.xml"/> > > </sqlMapConfig> > > ------- > > And the relevant part for the config file: > > --- > > <databaseConnection> > <!-- ./name identify the connection according to its node number, used in > the > service node to specify the source > or destination connection --> > <name>hsqldb-source-conn</name> > <!-- ./url mandatory, the JDBC URL --> > <url>jdbc:hsqldb:file:/var/tmp/hsqldb/lsc</url> > <!-- ./username mandatory, the JDBC username --> > <username>sa</username> > <!-- ./password mandatory, the JDBC credential --> > <password>tester</password> > <!-- ./driver mandatory, the Java classname to use as JDBC driver --> > <driver>org.hsqldb.jdbcDriver</driver> > <!-- ./otherSettings optional, may contain the list of complementary > values, passed to the JDBC driver > <otherSettings> > <entry><key><value></entry> > </otherSettings> --> > > > <snip> > > <databaseSourceService> > <!-- A database source service will have to contain at least a name, a > connection reference, a request for listing available objects, > and a request to get a complete object from its > ids --> > <name>hsqldb-source-service</name> > <connection reference="hsqldb-source-conn" /> > <!-- ./requestNameForList mandatory node providing the SQL request name > to list available objects in the data source --> > <!--requestNameForList>getInetOrgPersonList</requestNameForList--> > <requestNameForList>InetOrgPersonList</requestNameForList> > <!-- ./requestNameForNextId this optional node may be provided to > enable a asynchronous mode of the datasource. If provided, this request > will be > called to get the next updated id. This > request may return nothing and LSC will wait until the next modification or > its own stop > <requestNameForNextId>mandatory but not used > yet</requestNameForNextId> --> > <!-- ./requestNameForObject mandatory node providing the SQL request > name to get the full object according to the datasets identifying it > uniquely --> > <!--requestNameForObject>getInetOrgPerson</requestNameForObject--> > <requestNameForObject>InetOrgPerson</requestNameForObject> > </databaseSourceService> > > ---- > > > I am a bit lost in here.. > has anybody managed an AD-->Ldap which can be shared so to have a clear > example on how to proceed with this? >
Hi, why are you using a database? You should just have an LDAP source service for AD and a LDAP destination service. You can find an example here: http://lsc-project.org/wiki/documentation/tutorial/openldaptoactivedirectory Adapt it to have AD as source and OpenLDAP as destination. Clément.
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

