I changed the xstream library with my custom XmlSerializer and everything worked just fine. i still don't know what was wrong with xstream??!!
Anyway thank you. Merry Christmas ---------- Forwarded message ---------- From: morteza adi <[email protected]> Date: Tue, Dec 24, 2013 at 9:14 AM Subject: Re: ConversionException in connInstance.getConfiguration() To: [email protected] Hi, here is my Set<ConnConfProperty>; [ { "schema":{ "name":"jdbcDriver", "displayName":"JDBC Driver", "helpMessage":"Specify the JDBC Driver class name. Oracle is oracle.jdbc.driver.OracleDriver. MySQL is org.gjt.mm.mysql.Driver. Could be empty if datasource is provided.", "type":"java.lang.String", "required":false, "order":14, "confidential":false }, "values":[ "oracle.jdbc.driver.OracleDriver" ], "overridable":false }, { "schema":{ "name":"password", "displayName":"User Password", "helpMessage":"Enter a user account password that has permission to access accounts table.", "type":"org.identityconnectors.common.security.GuardedString", "required":false, "order":5, "confidential":true }, "values":[ "1111111" ], "overridable":false }, { "schema":{ "name":"jdbcUrlTemplate", "displayName":"JDBC Connection URL", "helpMessage":"Specify the JDBC Driver Connection URL. Oracle template is jdbc:oracle:thin:@[host]:[port(1521)]:[DB]. MySQL template is jdbc:mysql://[host]:[port(3306)]/[db], for more info, read the JDBC driver documentation. Could be empty if datasource is provided.", "type":"java.lang.String", "required":false, "order":15, "confidential":false }, "values":[ "jdbc:oracle:thin:@[host]:[port(1521)]:[DB]" ], "overridable":false }, { "schema":{ "name":"passwordColumn", "displayName":"Password Column", "helpMessage":"Enter the name of the column in the table that will hold the password values. If empty, no validation on resource and passwords are activated.", "type":"java.lang.String", "required":false, "order":9, "confidential":false }, "values":[ "AUSRPSWD" ], "overridable":false }, { "schema":{ "name":"table", "displayName":"Table", "helpMessage":"Enter the name of the table in the database that contains the accounts.", "type":"java.lang.String", "required":true, "order":7, "confidential":false }, "values":[ "XXXXXX" ], "overridable":false }, { "schema":{ "name":"keyColumn", "displayName":"Key Column", "helpMessage":"This mandatory column value will be used as the unique identifier for rows in the table.", "type":"java.lang.String", "required":true, "order":8, "confidential":false }, "values":[ "YYYYYY" ], "overridable":false }, { "schema":{ "name":"statusColumn", "displayName":"Status Column", "helpMessage":"Enter the name of the column in the table that will hold the status values. If empty enabled and disabled operation wont be performed.", "type":"java.lang.String", "required":false, "order":10, "confidential":false }, "values":[ "SSSSSSS" ], "overridable":false }, { "schema":{ "name":"database", "displayName":"Database", "helpMessage":"Enter the name of the database on the database server that contains the table.", "type":"java.lang.String", "required":false, "order":6, "confidential":false }, "values":[ "ORASSSS" ], "overridable":false }, { "schema":{ "name":"user", "displayName":"User", "helpMessage":"Enter the name of the mandatory Database user with permission to account table.", "type":"java.lang.String", "required":false, "order":4, "confidential":false }, "values":[ "NNNNNN" ], "overridable":false }, { "schema":{ "name":"host", "displayName":"Host", "helpMessage":"Enter the name of the host where the database is running.", "type":"java.lang.String", "required":false, "order":2, "confidential":false }, "values":[ "192.168.XX.XXX" ], "overridable":false }, { "schema":{ "name":"retrievePassword", "displayName":"Retrieve password", "helpMessage":"Specify if password must be retrieved by default. Default is \"false\".", "type":"boolean", "required":false, "order":27, "confidential":false }, "values":[ true ], "overridable":false } ] However; after serialization my XmlConfiguration In DB shows my logback.xml file !!?? I traced the code seems the method public static String serialize(final Object object) in XmlSerializer does not do its job. result = URLEncoder.encode(xstream.toXML(object), "UTF-8"); object --> my Set<ConnConfProperty>; returns my logback.xml file ??!! really how does it possible ??!! On Mon, Dec 23, 2013 at 11:48 AM, Fabio Martelli <[email protected]>wrote: > Il 22/12/2013 06:18, morteza adi ha scritto: > > Hi, >> >> i'm trying to create and start table connid from code. here is what i did: >> (i'm using syncope 1.0.0) >> >> ConnInstanceTO connInstanceTO = new ConnInstanceTO(); >> connInstanceTO.setBundleName("org.connid.bundles.db.table"); >> >> connInstanceTO.addCapability(ConnectorCapability.ONE_PHASE_CREATE); >> connInstanceTO.addCapability(ConnectorCapability.ONE_PHASE_UPDATE); >> connInstanceTO.addCapability(ConnectorCapability.ONE_PHASE_DELETE); >> connInstanceTO.addCapability(ConnectorCapability.SEARCH); >> connInstanceTO.addCapability(ConnectorCapability.SYNC); >> >> >> Set<ConnConfProperty> confs = new HashSet<ConnConfProperty>(); >> >> ... filing ConnConfProperty's for table and adding to the confs variable. >> >> connInstanceTO.setConfiguration(filterProperties(confs)); >> connInstanceTO.setConnectorName(boundle.getConnectorName()); >> connInstanceTO.setVersion(boundle.getVersion()); >> >> ConnInstance connInstance = connInstanceDataBinder.getConnInstance( >> connInstanceTO); >> connInstance = connInstanceDAO.save(connInstance); >> >> // conninstance successfully inserets into DB >> >> // later in the code >> // if i try >> Set<ConnConfProperty> configuration = connInstance.getConfiguration(); >> // or create and save resourceTO >> // throws exception! >> >> com.thoughtworks.xstream.converters.ConversionException: name argument >> cannot be null : name argument cannot be null >> ---- Debugging information ---- >> message : name argument cannot be null >> cause-exception : java.lang.IllegalArgumentException >> cause-message : name argument cannot be null >> class : java.util.HashSet >> required-type : ch.qos.logback.classic.Logger >> path : /set/org.apache.syncope.types. >> ConnConfProperty/logger >> line number : 3 >> ------------------------------- >> >> any idea ? >> >> Best Regards, >> Adi >> > > Hi Adi, too little information. > Evidently the problem is your conn instance configuration. > > If you can, provide ConnInstance configuration value stored in the DB. > > Regards, > F. > > -- > Fabio Martelli > > Tirasa - Open Source Excellence > http://www.tirasa.net/ > > Apache Syncope PMC > http://people.apache.org/~fmartelli/ > >
