karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jefoy1101 <jefoy1...@gmail.com>
Subject Re: deploying a war with dependencies in bundled jars
Date Wed, 07 Jan 2015 18:47:15 GMT
I tried to get the war-spring install on my local machine , but im getting
the same issue

015-01-07 12:47:01,535 | INFO  | raf-3.0.2/deploy | fileinstall                     
| 7 - org.apache.felix.fileinstall - 3.4.2 | Started bundle:
file:/mss-root/mss/apache-karaf-3.0.2/deploy/war-spring.war
2015-01-07 12:47:01,544 | WARN  | pool-7-thread-1  | AbstractLifeCycle               
| 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 |
FAILED helloworld: java.lang.NoClassDefFoundError:
org/springframework/web/context/WebApplicationContext
java.lang.NoClassDefFoundError:
org/springframework/web/context/WebApplicationContext
	at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.7.0_21]
	at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)[:1.7.0_21]
	at java.lang.Class.getConstructor0(Class.java:2723)[:1.7.0_21]
	at java.lang.Class.newInstance0(Class.java:345)[:1.7.0_21]
	at java.lang.Class.newInstance(Class.java:327)[:1.7.0_21]
	at
org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:1075)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:957)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:514)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:222)[86:org.ops4j.pax.web.pax-web-jetty:3.1.2]
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:202)[86:org.ops4j.pax.web.pax-web-jetty:3.1.2]
	at
org.ops4j.pax.web.service.internal.HttpServiceStarted.end(HttpServiceStarted.java:1032)[85:org.ops4j.pax.web.pax-web-runtime:3.1.2]
	at
org.ops4j.pax.web.service.internal.HttpServiceProxy.end(HttpServiceProxy.java:422)[85:org.ops4j.pax.web.pax-web-runtime:3.1.2]
	at
org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.end(RegisterWebAppVisitorWC.java:341)[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:678)[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]
Caused by: java.lang.ClassNotFoundException:
org.springframework.web.context.WebApplicationContext not found by
spring-webmvc [212]
	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)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_21]
	... 42 more
2015-01-07 12:47:01,546 | WARN  | pool-7-thread-1  | AbstractLifeCycle               
| 77 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.15.v20140411 |
FAILED
HttpServiceContext{httpContext=WebAppHttpContext{org.ops4j.pax.web.samples.spring
- 213}}: java.lang.NoClassDefFoundError:
org/springframework/web/context/WebApplicationContext
java.lang.NoClassDefFoundError:
org/springframework/web/context/WebApplicationContext
	at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.7.0_21]
	at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)[:1.7.0_21]
	at java.lang.Class.getConstructor0(Class.java:2723)[:1.7.0_21]
	at java.lang.Class.newInstance0(Class.java:345)[:1.7.0_21]
	at java.lang.Class.newInstance(Class.java:327)[:1.7.0_21]
	at
org.eclipse.jetty.servlet.ServletContextHandler$Context.createServlet(ServletContextHandler.java:1075)
	at
org.eclipse.jetty.servlet.ServletHolder.newInstance(ServletHolder.java:957)
	at
org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:514)
	at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:344)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:791)
	at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
	at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
	at
org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doStart(HttpServiceContext.java:222)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[77:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
	at
org.ops4j.pax.web.service.jetty.internal.JettyServerImpl$1.start(JettyServerImpl.java:202)[86:org.ops4j.pax.web.pax-web-jetty:3.1.2]
	at
org.ops4j.pax.web.service.internal.HttpServiceStarted.end(HttpServiceStarted.java:1032)[85:org.ops4j.pax.web.pax-web-runtime:3.1.2]
	at
org.ops4j.pax.web.service.internal.HttpServiceProxy.end(HttpServiceProxy.java:422)[85:org.ops4j.pax.web.pax-web-runtime:3.1.2]
	at
org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.end(RegisterWebAppVisitorWC.java:341)[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:678)[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]
Caused by: java.lang.ClassNotFoundException:
org.springframework.web.context.WebApplicationContext not found by
spring-webmvc [212]
	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)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)[:1.7.0_21]
	... 42 more
^C

karaf@root()> find-class WebApplicationContext

spring-osgi-web (211)
org/springframework/osgi/web/context/support/OsgiBundleXmlWebApplicationContext.class

OPS4J Pax Web - Samples - Spring OSGi (213)
org/springframework/osgi/web/context/support/OsgiBundleXmlWebApplicationContext.class
karaf@root()>


It's like it is looking for the class but It cannot find the class even
though it's there, is this something related with class loader?




--
View this message in context: http://karaf.922171.n3.nabble.com/deploying-a-war-with-dependencies-in-bundled-jars-tp4037488p4037667.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message