[midPoint] Problem adding an ICF connector - Error creating connector instace: The classes (JAR) of connector: ... (OID:...) were not found by the ICF framework

Radovan Semancik radovan.semancik at evolveum.com
Thu Nov 21 13:27:44 CET 2013


Hi,

This sound like an interesting problem.

ICF is a tricky thing. It is using its own classloaders. Therefore the 
things may be slightly different that it may seem at the first sight. 
Firstly please make sure that the you are using the correct annotation 
in the connector class. Something like this:

@ConnectorClass(displayNameKey = "UI_CONNECTOR_NAME", configurationClass 
= DummyConfiguration.class)
public class DummyConnector implements Connector, ......

The archetype is maintained by the OpenICF project and I'm not 100% sure 
that it works correctly. We actually do not use it and we usually create 
the connector structure manually. Therefore it is possible that the 
archetype does not create a correct code. It is better to double-check 
the generated code.

Secondly please make sure that the JAR classes of the connector are 
placed in the <midpoint.home>/icf-connectors/
Simply placing the JAR files on the classpath is not enought. ICF 
classloaders in midPoint are set up to look at this specific location.

Also please make sure that the JAR contains a correct MANIFEST.MF file. 
It should look like this:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: semancik
Build-Jdk: 1.7.0_21
Bugtracking-System: http://jira.evolveum.com
Bundle-ManifestVersion: 2
Bundle-Name: Dummy Connector
Bundle-SymbolicName: com.evolveum.icf.dummy
Bundle-Vendor: Evolveum
Bundle-Version: 2.0
ConnectorBundle-FrameworkVersion: 1.1
ConnectorBundle-Name: com.evolveum.icf.dummy
ConnectorBundle-Version: 2.0
License: Apache License v2.0
License-URL: http://www.apache.org/licenses/LICENSE-2.0.txt
Organization: Evolveum
Organization-URL: http://www.evolveum.com
SCM-Revision: git-v2.2support-151-g4a2df66
Version-Number: 2.2.1-SNAPSHOT

-- 

                                            Radovan Semancik
                                           Software Architect
                                              evolveum.com



On 11/21/2013 12:26 PM, dev.eloper wrote:
> Hi everyone,
>
> I'm trying to add a custom ICF connector, generated with the Maven 
> archetype. However, when I'm trying to execute the connector, I'm 
> getting the following error in the UI:
>
> ===
> Error resolving connector reference in resource:xxx (My Sample): Error 
> creating connector instace: The classes (JAR) of connector: My Sample 
> (OID:xxx) were not found by the ICF framework; connector 
> type=org.forgerock.openicf.xxx, version=yyy
> ===
>
> Eventually, I drilled down to the code that might be causing a problem:
>
> === 
> org.identityconnectors.framework.impl.api.local.LocalConnectorInfoManagerImpl 
> in 
> org/forgerock/openicf/framework/connector-framework-internal-1.1.1.e6329.jar:
> 249:   options = connectorClass.getAnnotation(ConnectorClass.class);
>
> This line returns null. But I checked that calling 
> connectorClass.getAnnotations() will return a single annotation: 
> com.sun.proxy.$Proxy182, which proxies the original annotation, 
> instead of hte actual ConnectorClass annotation.
>
> Has anyone seen this problem before? What might it be related to? And, 
> how could I fix this issue?
>
> Thank you.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20131121/3c8fc9c8/attachment.htm>


More information about the midPoint mailing list