CMDBuild Forum

Basic Connector and LDAP trouble

Hi,

When trying to get the basic connector to grab some data from my ldap, I get the following error.


[root@localhost bin]# ./connector.sh &
[1] 9685
[root@localhost bin]# log4j:WARN No appenders could be found for logger (connector).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
log4j: Parsing for [root] with value=[WARN, R].
log4j: Level token is [WARN].
log4j: Category root set to WARN
log4j: Parsing appender named "R".
log4j: Parsing layout options for "R".
log4j: End of parsing for "R".
log4j: Setting property [file] to [./logs/basic-connector.log].
log4j: Setting property [maxFileSize] to [100MB].
log4j: Setting property [maxBackupIndex] to [10].
log4j: setFile called: ./logs/basic-connector.log, true
log4j: setFile ended
log4j: Parsed "R" options.
log4j: Parsing for [connector] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category connector set to DEBUG
log4j: Handling log4j.additivity.connector=[null]
log4j: Parsing for [servermail] with value=[INFO].
log4j: Level token is [INFO].
log4j: Category servermail set to INFO
log4j: Handling log4j.additivity.servermail=[null]
log4j: Parsing for [inventory] with value=[INFO].
log4j: Level token is [INFO].
log4j: Category inventory set to INFO
log4j: Handling log4j.additivity.inventory=[null]
log4j: Parsing for [ldap] with value=[INFO].
log4j: Level token is [INFO].
log4j: Category ldap set to INFO
log4j: Handling log4j.additivity.ldap=[null]
log4j: Finished configuring.
ERROR: an error has occurred during parsing this file: configuration.xml
Exception in thread "main" java.lang.NullPointerException
        at org.cmdbuild.externalconnector.update.LDAPConnector.connect(LDAPConnector.java:47)
        at org.cmdbuild.externalconnector.update.UpdateCMDBuild.main(UpdateCMDBuild.java:45)



My connector config is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
        <cmdbuild>
                <ServerAddress>127.0.0.1</ServerAddress>
                <ServerContext>cmd_test</ServerContext>
                <ServerPort>8080</ServerPort>
                <Username>admin</Username>
                <Password>Command</Password>
        </cmdbuild>
        <serverldap>
                <ServerAddress>192.168.42.118</ServerAddress>
                <Port>10389</Port>
                <User>admin</User>
                <Password>secret</Password>
                <SSL>0</SSL>
                <DNS>DC=example,DC=com</DNS>
                <Search>objectClass=*</Search>
                <Class>groups</Class>
                <Attributes>uid,displayName</Attributes>
                <Key>uid</Key>
        </serverldap>
</configuration>

 

 

...While the following works just fine.

[root@localhost bin]# ldapsearch -h 192.168.42.118 -p 10389 -b "ou=groups,dc=example,dc=com" "(objectClass=*)" uid displayName  -D "uid=admin,ou=groups,dc=example,dc=com" -W
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <ou=groups,dc=example,dc=com> with scope subtree
# filter: (objectClass=*)
# requesting: uid displayName
#

# admin, groups, example.com
dn: uid=admin,ou=groups,dc=example,dc=com
displayName: Directory Superuser
uid: admin

# groups, example.com
dn: ou=groups,dc=example,dc=com

# loom, groups, example.com
dn: uid=loom,ou=groups,dc=example,dc=com
displayName: an animal
uid: loom

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

Any ideas what I might be doing wrong?

Sorry, forgot to add the version info

:

Jdk 1.

6

Tomcat

7

Cmdbuild 2.

3

Basic connector 1.

5