Message Boards

3rd Party Library dependent on xml-apis.jar NOT working with custom portlet

Michael Harris, modified 3 Years ago.

3rd Party Library dependent on xml-apis.jar NOT working with custom portlet

New Member Posts: 2 Join Date: 3/19/20 Recent Posts
I have a custom .war portlet that uses a 3rd Party Library(Antisamy.jar), which is dependent on the xml-apis.jar.  When I run the application in liferay I get the following error below:Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/Document
I've tried numerous things with no success:
1. I have modified some of the osgi params in the portal-ext.properties in hopes that it may resolve my issue with no luck. Some of the properties modified are below:
module.framework.system.packages.extra=org.w3c.dom
module.framework.boodelegation=org.w3c.dom
module.framework.packages=org.w3c.dom
org.osgi.framework.bootdelegation=org.w3c.dom
org.osgi.framework.bootdelegation=org.w3c.dom
org.osgi.framework.system.packages=org.w3c.dom
org.osgi.framework.system.packages.extra=org.w3c.dom

2. I have modified the liferay-plugin-package.properties file adding the Import-Package param, this also didn't any yield any success.
3. Again modified the liferay-plugin-package.properties file adding the Bundle-ClassPath param, which also didn't work.
When I add this code:
Bundle-ClassPath:\
  /WEB-INF/lib/xml-apis.jar,\
  *
I get the following error:
org.osgi.framework.BundleException: Could not resolve module: SlideShow-portlet [1180]_  Unresolved requirement: Import-Package: gov.nasa.hq.slideshow.portlet_ [Sanitized]

This portlet worked in 6.2, so it seems to be an osgi issue accessing/putting the  org/w3c/dom/Document on the classpath. Any help with this would be greatly appreciated. 

Clint Wilde, modified 3 Years ago.

RE: 3rd Party Library dependent on xml-apis.jar NOT working with custom por

New Member Posts: 2 Join Date: 9/23/20 Recent Posts

I am also having a similar problem.  I have a portlet that works fine in 6.2, but not in 7.2.  In 7.2, after uprading it, I get this same Exception.

thumbnail
Olaf Kock, modified 3 Years ago.

RE: 3rd Party Library dependent on xml-apis.jar NOT working with custom por

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

One of the properties mentioned above is named "boodelegation". To pick the low hanging fruit first: Add a "t" - I'm assuming that the properties block has been copied/pasted, not typed