Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Porting to L7.2 Unresolved requirement: Import-Package
I'm porting an OSGI module to Liferay 7.2 CE, at module start I receive Unresolved requirement: Import-Package: com.sun.org.apache.xml.internal.utils.I know how to resolve the problem "Unresolved requirement" in this case the problem is the package com.sun.org.apache.xml.internal.utils. In Liferay 7.0 I didn't have this problem and the jar seems not available anywhere.
In general you should not rely on internal classes like "com.sun.org.apache.xml.internal.utils". Those may be changed or removed in later Java versions.
If you do not use that package explicitly in your code, maybe some of the dependencies of your module use it. You can exclude the import of packages in your bnd.bnd file like this:
If you do not use that package explicitly in your code, maybe some of the dependencies of your module use it. You can exclude the import of packages in your bnd.bnd file like this:
Import-Package: !com.sun.org.apache.xml.internal.utils,*
Note the "*" at the end. That is required so that the bndtools still analyse all the other imports in your module.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™