CMDBuild Forum

SqlServer connector

Hello 

I'm trying to create a SQL Server connector with cmdbuild. I use the externalconnector zip file. I editted the following files: cmdbuild-schema.xml, configuration.xml and the transform.xsl file. But when I try to execute the java file with the correct paramaters i get the following: 

cmdbuild@cmdbuild-vm:~/external-connectors-1.4.0/connectors$ sudo java -jar Exte                                                                                                                     rnalConnector.1.4.0.jar . ImportOCS

log4j:WARN No appenders could be found for logger (connector).

log4j:WARN Please initialize the log4j system properly.

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/ExternalConnector.log].

log4j: Setting property [maxFileSize] to [100MB].

log4j: Setting property [maxBackupIndex] to [10].

log4j: setFile called: ./logs/ExternalConnector.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.InventoryConnector.connect(Inve                                                                                                                     ntoryConnector.java:79)

        at org.cmdbuild.externalconnector.update.UpdateCMDBuild.main(UpdateCMDBu                                                                                                                     ild.java:39)

 
What am I Doing wrong?
This is the configuration file that i use:
 
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <cmdbuild>
    <ServerAddress>127.0.0.1</ServerAddress>
    <ServerContext>cmdbuild</ServerContext>
    <ServerPort>8080</ServerPort>
    <Username>admin</Username>
    <Password>admin</Password>
  </cmdbuild>
  <inventory>
    <DbType>SQLSERVER</DbType>
    <DbAddress>SQLSERVERComputerName\InstanceName</DbAddress>
    <DbPort>1433</DbPort>
    <DbName>cmdbuild</DbName>
    <DbUser>cmdbuild</DbUser>
    <DbPassword>cmdbuild</DbPassword>
  </inventory>
</configuration>