karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <bcanh...@googlemail.com>
Subject Re: deploying a war with dependencies in bundled jars
Date Wed, 07 Jan 2015 07:49:59 GMT
Hi,

I went through this thread again.
Looks like you mixed a couple of different issues here.
Let me sum these up for you so I can find the root cause.

1) War isn't capable of importing a certain package
2) Lib isn't capable of finding appropriate package for amazon client --
according to screenshot
3) War isn't capable of finding appropriate framework class


1) this has been fixed by configuring the maven-bundle-plugin correctly
2) this has been fixed by using the servicemix bundle for amazon sdk
3) this one is new

Now it would be great if you could clear up some things.
a) the manifest you posted previously is it the one from case 1) the war
file or is it one that's supposed to be the library?
b) does your war manifest actually does contain a Import-Package part
containing the required package?

regards, Achim



2015-01-06 22:19 GMT+01:00 jefoy1101 <jefoy1101@gmail.com>:

> I've tried to use your servicemix bundle of aws-java-sdk and right now it
> is
> pointing to that bundles,
>
> But from what I'm seeing on the stacktrace it is not a problem in my jar
> file it is a problem in my war file, the class
> com.pinsightmedia.adgateway.framework.AdMarvelPerfFilter is in my
> framework.war and when I try to find it using class-find AdMarvelPerfFilter
> in the karaf prompt it is finding that class
>
> ploy/adgateway-framework-3.0.1-SNAPSHOT-7UL.war
> 2015-01-06 15:00:22,060 | ERROR | pool-7-thread-1  |
> RegisterWebAppVisitorWC
> | 91 - org.ops4j.pax.web.pax-web-extender-war - 3.1.2 | Registration
> exception. Skipping.
> java.lang.ClassNotFoundException:
> com.pinsightmedia.adgateway.framework.AdMarvelPerfFilter not found by
> com.pinsightmedia.adgateway.framework [170]
>         at
>
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)[org.apache.felix.framework-4.2.1.jar:]
>         at
>
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)[org.apache.felix.framework-4.2.1.jar:]
>         at
>
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)[org.apache.felix.framework-4.2.1.jar:]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_21]
>         at
>
> org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1844)[org.apache.felix.framework-4.2.1.jar:]
>         at
>
> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937)[org.apache.felix.framework-4.2.1.jar:]
>         at
>
> org.ops4j.pax.swissbox.core.BundleClassLoader.findClass(BundleClassLoader.java:176)[84:org.ops4j.pax.web.pax-web-spi:3.1.2]
>         at
>
> org.ops4j.pax.swissbox.core.BundleClassLoader.loadClass(BundleClassLoader.java:194)[84:org.ops4j.pax.web.pax-web-spi:3.1.2]
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_21]
>         at
>
> org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorHS.loadClass(RegisterWebAppVisitorHS.java:244)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:261)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:652)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.register(WebAppPublisher.java:237)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:182)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$WebAppDependencyListener.addingService(WebAppPublisher.java:135)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)[karaf-org.osgi.core.jar:]
>         at
>
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:864)[karaf-org.osgi.core.jar:]
>         at
>
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[karaf-org.osgi.core.jar:]
>         at
>
> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)[karaf-org.osgi.core.jar:]
>         at
>
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)[karaf-org.osgi.core.jar:]
>         at
>
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)[karaf-org.osgi.core.jar:]
>         at
>
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:101)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.WebObserver.deploy(WebObserver.java:213)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.WebObserver$1.doStart(WebObserver.java:175)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.extender.SimpleExtension.start(SimpleExtension.java:58)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> org.ops4j.pax.web.extender.war.internal.extender.AbstractExtender$1.run(AbstractExtender.java:266)[91:org.ops4j.pax.web.pax-web-extender-war:3.1.2]
>         at
>
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_21]
>         at
>
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_21]
>         at
> java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_21]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_21]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_21]
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_21]
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_21]
>         at java.lang.Thread.run(Thread.java:722)[:1.7.0_21]
> ^C
>
> karaf@root()> find-class AdMarvelPerfFilter
>
> Ad Gateway Framework (170)
>
> WEB-INF/classes/com/pinsightmedia/adgateway/framework/AdMarvelPerfFilter.class
> karaf@root()>
>
> Sorry I'm a bit confuse, Here is the updated manisfest
> MANIFEST.MF <http://karaf.922171.n3.nabble.com/file/n4037640/MANIFEST.MF>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/deploying-a-war-with-dependencies-in-bundled-jars-tp4037488p4037640.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Mime
View raw message