Problem with org.apache.servicemix.bundles.jaxen

60 views
Skip to first unread message

Santiago Imas

unread,
Jun 24, 2024, 10:49:12 AM (5 days ago) Jun 24
to iDempiere
Hello community!  

I am writing on behalf of Comit SRL. We are working on the migration from ADempiere 361.Final to iDempiere. This process involves migrating the Argentine Localization (LAR).

We are currently developing a plugin for electronic invoicing. For this, we need the plugin wrapped.org.dom4j.dom4j (2.1.3), which we added to Required-Bundle section. However, we got the
following error:

Caused by: java.lang.ClassNotFoundException: org.dom4j.Element cannot be found by org.apache.servicemix.bundles.jaxen_1.1.6.1:.

We did some research where we detected the following in the MANIFEST.MF of org.apache.servicemix.bundles.jaxen_1.1.6.1:

Import-Package: org.dom4j;resolution:=optional;version="[1.6.1,2)"

We believe increasing the version range might solve the problem.

Additionally, we noticed that in iDempiere there is a directory called org.idempiere.p2.repackaged, where the README file states "Repackage osgi bundles to fix MANIFEST.MF issues."

Is this the correct way to address the issue?

Thank you in advance.

Best regards,

Santiago Imas.

Heng Sin Low

unread,
Jun 24, 2024, 11:45:06 AM (5 days ago) Jun 24
to idem...@googlegroups.com
I think the right fix is to replace org.apache.servicemix.bundles.jaxen_1.1.6.1 with a newer version (https://mvnrepository.com/artifact/jaxen/jaxen/2.0.0).

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/6397f173-292b-42fc-86f3-969c1cc3525en%40googlegroups.com.

Santiago Imas

unread,
Jun 25, 2024, 4:43:02 PM (4 days ago) Jun 25
to iDempiere
Hi Hengsin, thank you for your answer! This solves our problem, but we had to use version 1.1.6 (https://mvnrepository.com/artifact/jaxen/jaxen/1.1.6) instead, as version 2.0.0 caused a similar error, this time from the dom4j library. It seems that the Import-Package statement from this Jaxen library doesn't specify a version range so it works.

The way I did this was by adding the dependency in 'org.idempiere.p2.targetplatform.target' file.

+ <!-- jaxen -->
+ <location includeSource="true" missingManifest="generate" type="Maven">
+     <groupId>jaxen</groupId>
+     <artifactId>jaxen</artifactId>
+     <version>1.1.6</version>
+     <type>jar</type>
+ </location>


In this case, should we submit a pull request or open a ticket on JIRA?

hengsin

unread,
Jun 26, 2024, 4:35:56 AM (4 days ago) Jun 26
to iDempiere
Open a JIRA ticket and submit a pull request with reference to the JIRA ticket.

The pull request should includes the following:
- Update maven.locations.xml, replace org.apache.servicemix.bundles.jaxen with jaxen.jaxen
- Update org.idempiere.p2.targetplatform.target, replace org.apache.servicemix.bundles.jaxen with jaxen.jaxen
- Update org.idempiere.p2.targetplatform.target, change sequenNumber to current date (format is yyyyMMdd)
- Update all launch configuration (*.launch) that uses org.apache.servicemix.bundles.jaxen, replace org.apache.servicemix.bundles.jaxen with jaxen.jaxen

Reply all
Reply to author
Forward
0 new messages