Found the issue: Mysql jdbc driver 5.1 is required, I was using 5.0

Jesse


On Wed, May 22, 2013 at 9:11 AM, Jesse van Bekkum <[email protected]> wrote:

> Hi
>
> I get the following error when testing the connection of my Scripted SQL
> connector:
>
> ==> /var/log/syncope/core-rest.log <==
> 16:30:27.518 ERROR
> org.apache.syncope.core.rest.controller.AbstractController - Test
> connection failure {}
> java.lang.IllegalArgumentException: java.lang.AbstractMethodError:
> com.mysql.jdbc.Connection.isValid(I)Z
>  at
> org.apache.syncope.core.propagation.impl.ConnectorFacadeProxy.test(ConnectorFacadeProxy.java:480)
> ~[ConnectorFacadeProxy.class:na]
> at
> org.apache.syncope.core.rest.controller.ConnInstanceController.check(ConnInstanceController.java:360)
> ~[ConnInstanceController.class:na]
>  at
> org.apache.syncope.core.rest.controller.ConnInstanceController$$FastClassByCGLIB$$7de89b09.invoke(<generated>)
> [spring-core-3.2.2.RELEASE.jar:na]
> at
> org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
> [spring-core-3.2.2.RELEASE.jar:3.2.2.RELEASE]
>  at
> org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)
> [spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> [spring-aop-3.2.2.RELEASE.jar:3.2.2.RELEASE]
> .
> .
> .
> Caused by: java.lang.AbstractMethodError:
> com.mysql.jdbc.Connection.isValid(I)Z
> at
> org.forgerock.openicf.connectors.scriptedsql.ScriptedSQLConnection.test(ScriptedSQLConnection.java:116)
> ~[na:na]
>  at
> org.forgerock.openicf.connectors.scriptedsql.ScriptedSQLConnector.checkAlive(ScriptedSQLConnector.java:136)
> ~[na:na]
> at
> org.identityconnectors.framework.impl.api.local.ConnectorPoolManager$ConnectorPoolHandler.testObject(ConnectorPoolManager.java:113)
> ~[connid-framework-internal-1.3.3.jar:na]
>  at
> org.identityconnectors.framework.impl.api.local.ConnectorPoolManager$ConnectorPoolHandler.testObject(ConnectorPoolManager.java:79)
> ~[connid-framework-internal-1.3.3.jar:na]
>
> It goes wrong in scriptedsqlConnection.java, in the following lines:
>     public void test() {
>         try {
>             if (null == getSqlConnection() || sqlConn.isClosed() ||
> !sqlConn.isValid(2)) {
>                 throw new ConnectionBrokenException("JDBC connection is
> broken");
>             }
>         }
>         catch (SQLException e) {
>             throw ConnectionBrokenException.wrap(e);
>         }
>
>     }
>
> sqlConn.isValid(2) throws a NPE, but I cannot find out where that goes
> wrong.
>
> All my connection parameters are identical to the ones of the old ConnID
> JDBCconnector, which works. So classpath, mysql driver and parameters are
> correct.
>
> Any idea what's wrong?
>
> Jesse
>
>
> On Tue, May 21, 2013 at 3:18 PM, Jesse van Bekkum <[email protected]>wrote:
>
>> Thanks Francesco. This looks promising.
>>
>> Jesse
>>
>>
>> On Tue, May 21, 2013 at 2:46 PM, Francesco Chicchiriccò <
>> [email protected]> wrote:
>>
>>> On 21/05/2013 14:18, Jesse van Bekkum wrote:
>>>
>>>> Hi
>>>>
>>>> I would like to provision a multivalued attribute to a relational
>>>> database, in a simple one-to-many mapping:
>>>>
>>>> UserId1 | MultivaluedAttr1
>>>> UserId1 | MultivaluedAttr2
>>>> UserId2 | MultivaluedAttr1
>>>> etc.
>>>>
>>>> When I try to just provision a MV attribute, i get an error in core.log:
>>>> java.util.concurrent.**ExecutionException: 
>>>> java.lang.**IllegalArgumentException:
>>>> The method is only for single value attributes.
>>>>         at 
>>>> java.util.concurrent.**FutureTask$Sync.innerGet(**FutureTask.java:232)
>>>> ~[na:1.6.0_33]
>>>>         at java.util.concurrent.**FutureTask.get(FutureTask.**java:91)
>>>> ~[na:1.6.0_33]
>>>>         at org.apache.syncope.core.**propagation.impl.**
>>>> ConnectorFacadeProxy.update(**ConnectorFacadeProxy.java:184)
>>>> ~[ConnectorFacadeProxy.class:**na]
>>>>
>>>
>>> Hi,
>>> this looks like an exception raised by the ConnId DatabaseTable
>>> connector, that barely supports only single-valued attributes [1]:
>>> "[...]All of these attributes are single-valued[...]"
>>>
>>>          at org.apache.syncope.core.**propagation.impl.**
>>>> AbstractPropagationTaskExecuto**r.createOrUpdate(**
>>>> AbstractPropagationTaskExecuto**r.java:196) [**
>>>> AbstractPropagationTaskExecuto**r.class:na]
>>>>         at org.apache.syncope.core.**propagation.impl.**
>>>> AbstractPropagationTaskExecuto**r.execute(**
>>>> AbstractPropagationTaskExecuto**r.java:297) [**
>>>> AbstractPropagationTaskExecuto**r.class:na]
>>>>
>>>> Is there another way to get this to work?
>>>>
>>>
>>> I think you might try yourself with more customizable Scripted SQL
>>> connector [2].
>>>
>>>  The multivalued attributes I am working with are a bit like roles, so
>>>> if I define these as roles, and then provision the memberships somehow,
>>>> that would also work.
>>>>
>>>
>>> It might be, but consider that neither DatabaseTable nor Scripted SQL
>>> connectors support roles.
>>>
>>> Regards.
>>>
>>> [1] https://connid.atlassian.net/**wiki/display/BASE/Database+**
>>> Table#DatabaseTable-Schema<https://connid.atlassian.net/wiki/display/BASE/Database+Table#DatabaseTable-Schema>
>>> [2] https://cwiki.apache.org/**confluence/display/SYNCOPE/**
>>> Configure+a+Scripted+SQL+**resource<https://cwiki.apache.org/confluence/display/SYNCOPE/Configure+a+Scripted+SQL+resource>
>>>
>>> --
>>> Francesco Chicchiriccò
>>>
>>> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
>>> http://people.apache.org/~**ilgrosso/<http://people.apache.org/~ilgrosso/>
>>>
>>>
>>
>

Reply via email to