Classloader exception with jsmpp lib with message- org.osgi.service.resolver.ResolutionException: Uses constraint violation.

Solution Unverified - Updated -

Issue

  • I'm implementing one java class to override the class in one feature. This new class is included in the bundle. When they test it as the local test, it's working well.
  • However when they deploy this bundle on JBoss Fuse, the class in the features in used, not our new override class. Do you have any suggestion on this issue? Also, do you know how we can configure the order of class loader?
  • When I deploy to Fuse, I get following error
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource custom-smpp [custom-smpp/1.2.0] because it exports package 'org.jsmpp.util' and is also exposed to it from resource org.apache.servicemix.bundles.jsmpp [org.apache.servicemix.bundles.jsmpp/2.1.0.4] via the following dependency chain:

custom-smpp [custom-smpp/1.2.0]
            import: (osgi.wiring.package=org.jsmpp.bean)
             |
            export: osgi.wiring.package: org.jsmpp.bean; uses:=org.jsmpp.util
            export: osgi.wiring.package=org.jsmpp.util
          org.apache.servicemix.bundles.jsmpp [org.apache.servicemix.bundles.jsmpp/2.1.0.4]

          at org.apache.felix.resolver.ResolverImpl.checkDynamicPackageSpaceConsistency(ResolverImpl.java:1188)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at org.apache.felix.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:1086)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at org.apache.felix.resolver.ResolverImpl.checkDynamicPackageSpaceConsistency(ResolverImpl.java:1402)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at org.apache.felix.resolver.ResolverImpl.checkPackageSpaceConsistency(ResolverImpl.java:1086)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:260)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at io.fabric8.agent.region.SubsystemResolver.resolve(SubsystemResolver.java:190)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at io.fabric8.agent.service.Deployer.deploy(Deployer.java:255)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at io.fabric8.agent.service.Agent.provision(Agent.java:348)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at io.fabric8.agent.service.Agent.provision(Agent.java:194)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:642)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:256)[io.fabric8:fabric-agent:1.2.0.redhat-133]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_79]
          at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_79]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
          at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.