[midPoint] Issues with connector.

Davy Priem davy.priem at vives.be
Mon Dec 13 14:55:28 CET 2021


Hi,

Thx for the quick reply. We’re testing on MP 4.4 - openjdk 17. I see there’s indeed some collision
[cid:749297BC-DFAA-4FC7-8DAB-118D8450F6E0]

Davy Priem




Op 13 dec. 2021, om 14:30 heeft Richard Richter <virgo at evolveum.com<mailto:virgo at evolveum.com>> het volgende geschreven:

Hi Davy

It always helps when you state the midPoint version you use, especially when there is a dependency clash like this. In this case, the QName class MP uses is the one from JDK (either 11 or 17, both have it), and it seems there is another one sneaking in with the connector.
Check the connector JAR for dependencies, I guess they are under lib inside the JAR. You can also try to search for the class in IDEA (I guess that's what you use from the snippet format below), use Ctrl+N, QName, Ctrl+N again if needed, to see non-project classes - you will see the dependency on the right:
<540001.png>
Now, some of these can be OK - as they are in different packages, but if there is some older non-compatible version with the same fully-qualified name, there can be trouble. You have to exclude that library. In the worst case, Axis 2 stack will not play well with MP at all. We used CXF for previous WS in MidPoint.

Cheers

Richard Richter
Evolveum developer


________________________________
From: "midPoint General Discussion" <midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>>
To: "midPoint General Discussion" <midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>>
Cc: "Davy Priem" <davy.priem at vives.be<mailto:davy.priem at vives.be>>
Sent: Monday, December 13, 2021 1:35:28 PM
Subject: [midPoint] Issues with connector.

Hi,

I have an issue with a connector were currently developing. It uses axis2 WSDL2JAVA to generate stub classes for accessing SOAP endpoints. During building tests work flawlessly, but we’re not able to use it within midpoint. There seems some kind of clash between objects:
2021-12-12 23:22:03,961 [] [http-nio-8080-exec-9] WARN (com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnIdUtil): Got ConnId exception (might be handled by upper layers later) java.lang.LinkageError in connector:5f12f0a4-eda2-4631-93ed-99a38f52aca6(ConnId be.vives.polygon.connector.planon.PlanonConnector v1.1): ConnectorSpec(resource:91e08dce-854a-4d73-8a34-5a9e17e413f3(Planon), name=null, oid=5f12f0a4-eda2-4631-93ed-99a38f52aca6): loader constraint violation in interface itable initialization for class com.ctc.wstx.sr.BasicStreamReader: when selecting method 'javax.xml.namespace.QName javax.xml.stream.XMLStreamReader.getName()' the class loader 'bootstrap' for super interface javax.xml.stream.XMLStreamReader, and the class loader org.identityconnectors.framework.impl.api.local.BundleClassLoader @5393c04 of the selected method's abstract class, com.ctc.wstx.sr.BasicStreamReader have different Class objects for the type javax.xml.namespace.QName used in the signature (javax.xml.stream.XMLStreamReader is in module java.xml of loader 'bootstrap'; com.ctc.wstx.sr.BasicStreamReader is in unnamed module of loader org.identityconnectors.framework.impl.api.local.BundleClassLoader @5393c04, parent loader org.springframework.boot.loader.LaunchedURLClassLoader @377dca04), reason: loader constraint violation in interface itable initialization for class com.ctc.wstx.sr.BasicStreamReader: when selecting method 'javax.xml.namespace.QName javax.xml.stream.XMLStreamReader.getName()' the class loader 'bootstrap' for super interface javax.xml.stream.XMLStreamReader, and the class loader org.identityconnectors.framework.impl.api.local.BundleClassLoader @5393c04 of the selected method's abstract class, com.ctc.wstx.sr.BasicStreamReader have different Class objects for the type javax.xml.namespace.QName used in the signature (javax.xml.stream.XMLStreamReader is in module java.xml of loader 'bootstrap'; com.ctc.wstx.sr.BasicStreamReader is in unnamed module of loader org.identityconnectors.framework.impl.api.local.BundleClassLoader @5393c04, parent loader org.springframework.boot.loader.LaunchedURLClassLoader @377dca04) (class java.lang.LinkageError)

We tried adding some exclusions to our pom.xml file but this does not help. Does anyone have an idea how to fix this? We don’t have much experience with java development. Our dependencies and plugin config (for axis2 1.8.0) looks like this:


<dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
    <version>${axis2.version}</version>

</dependency>

<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>${testng.version}</version>
</dependency>


<plugin>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
    <version>${axis2.version}</version>
    <executions>
        <execution>
            <id>generate-sources-employee</id>
            <phase>generate-sources</phase>
            <configuration>
                <packageName>be.vives.planon</packageName>

                <wsdlFile>${basedir}/src/main/resources/UsrEmployee.wsdl</wsdlFile>
                <outputDirectory>target/generated-sources</outputDirectory>
                <databindingName>adb</databindingName>
            </configuration>
            <goals>
                <goal>wsdl2code</goal>
            </goals>
        </execution>
    </executions>
</plugin>


Davy Priem

_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
https://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20211213/79ad9460/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GeplakteAfbeelding-1.png
Type: image/png
Size: 136368 bytes
Desc: GeplakteAfbeelding-1.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20211213/79ad9460/attachment-0001.png>


More information about the midPoint mailing list