Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » virgo 3.6.2 java.lang.NoClassDefFoundError: javax/servlet/Servlet(can't find javax.servlet.Servlet in virgo 3.6.2)
virgo 3.6.2 java.lang.NoClassDefFoundError: javax/servlet/Servlet [message #1100542] Tue, 03 September 2013 04:27 Go to next message
qing paul is currently offline qing paul
Messages: 3
Registered: September 2013
Location: ShangHai
Junior Member
index.php/fa/16108/0/Hi Everyone,
I met a strange issue in the virgo 3.6.2. however, this issue can't show in 3.5.0. it is great if someone can give me some suggestions. the issue occur in the spring beans init in the blurprint. the log message is as following:

[2013-09-02 15:26:16.937] ERROR region-dm-14 org.eclipse.virgo.medic.eventlog.default AG0000E Application context creation failure for bundle 'com.hp.atom.wssupport' version '3.1.0.SNAPSHOT'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name '.org.eclipse.gemini.blueprint.service.importer.support.OsgiServiceCollectionProxyFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: javax/servlet/Servlet
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1441)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:581)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:60)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:325)
at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:290)
at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/Servlet
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.privateGetPublicMethods(Class.java:2557)
at java.lang.Class.getMethods(Class.java:1410)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:413)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.eclipse.gemini.blueprint.config.internal.adapter.OsgiServiceLifecycleListenerAdapter.retrieveTarget(OsgiServiceLifecycleListenerAdapter.java:96)
at org.eclipse.gemini.blueprint.config.internal.adapter.OsgiServiceLifecycleListenerAdapter.unbind(OsgiServiceLifecycleListenerAdapter.java:278)
at org.eclipse.gemini.blueprint.service.importer.support.internal.util.OsgiServiceBindingUtils.callListenersUnbind(OsgiServiceBindingUtils.java:67)
at org.eclipse.gemini.blueprint.service.importer.support.internal.collection.OsgiServiceCollection.afterPropertiesSet(OsgiServiceCollection.java:328)
at org.eclipse.gemini.blueprint.service.importer.support.OsgiServiceCollectionProxyFactoryBean$1.run(OsgiServiceCollectionProxyFactoryBean.java:211)
at org.eclipse.gemini.blueprint.service.importer.support.AbstractServiceImporterProxyFactoryBean.getObject(AbstractServiceImporterProxyFactoryBean.java:103)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 15 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.servlet.Servlet
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 38 common frames omitted

however, I can load this class in the osgi console through the clhas and clload command. the javax.servlet packages info is as following:
osgi> packages javax.servlet
javax.servlet; version="2.6.0"<javax.servlet_3.0.0.v201112011016 [109]>
com.springsource.bsh_2.0.0.b4 [84] imports
com.springsource.org.codehaus.groovy_1.7.3 [96] imports
com.springsource.org.h2_1.0.71 [98] imports
javax.el_2.2.0.v201108011116 [107] imports
javax.servlet.jsp_2.2.0.v201112011158 [110] imports
javax.xml.rpc_1.1.0.v201005080400 [111] imports
org.eclipse.virgo.web.servlet.adapter_3.6.2.RELEASE [119] imports
org.springframework.orm_3.1.0.RELEASE [128] imports
org.springframework.web_3.1.0.RELEASE [131] imports
org.eclipse.gemini.web.core_2.2.2.RELEASE [133] imports
org.eclipse.gemini.web.tomcat_2.2.2.RELEASE [134] imports
org.eclipse.virgo.web.core_3.6.2.RELEASE [135] imports
org.eclipse.virgo.web.dm_3.6.2.RELEASE [136] imports
org.eclipse.virgo.web.servlet.adapter_3.6.2.RELEASE [138] imports
org.apache.catalina_7.0.35.v201302131125 [141] imports
org.apache.tomcat.api_7.0.35.v201302120746 [148] imports
osgi.enterprise_4.2.0.v201108120515 [151] imports
javax.servlet; version="3.0.0"<org.eclipse.virgo.web.servlet.adapter_3.6.2.RELEASE [119]>
javax.el_2.2.0.v201108011116 [107] imports
javax.servlet.jsp_2.2.0.v201112011158 [110] imports
javax.xml.rpc_1.1.0.v201005080400 [111] imports
org.springframework.orm_3.1.0.RELEASE [128] imports
org.springframework.web_3.1.0.RELEASE [131] imports
org.eclipse.gemini.web.core_2.2.2.RELEASE [133] imports
org.eclipse.gemini.web.tomcat_2.2.2.RELEASE [134] imports
org.eclipse.virgo.web.core_3.6.2.RELEASE [135] imports
org.eclipse.virgo.web.dm_3.6.2.RELEASE [136] imports
org.apache.catalina_7.0.35.v201302131125 [141] imports
org.apache.tomcat.api_7.0.35.v201302120746 [148] imports
osgi.enterprise_4.2.0.v201108120515 [151] imports
javax.servlet; version="3.0.0"<org.eclipse.virgo.web.servlet.adapter_3.6.2.RELEASE [138]>

osgi> clhas javax.servlet.Servlet

Bundles containing [javax/servlet/Servlet.class]:
109 javax.servlet
/javax/servlet/Servlet.class

osgi> clload javax.servlet.Servlet

Successfully loaded [javax.servlet.Servlet] from:
133 org.eclipse.gemini.web.core
[provided by 109 javax.servlet]
240 org.apache.servicemix.specs.jsr311-api-1.1.1
[provided by 109 javax.servlet]
215 com.jolbox.bonecp
[provided by 109 javax.servlet]
211 com.hp.atom.jackrabbit-all
[provided by 109 javax.servlet]
138 org.eclipse.virgo.web.servlet.adapter
[provided by 109 javax.servlet]
180 com.hp.atom.management_client
[provided by 109 javax.servlet]
192 com.hp.atom.repodumper
[provided by 109 javax.servlet]
109 javax.servlet
107 javax.el
[provided by 109 javax.servlet]
96 com.springsource.org.codehaus.groovy
[provided by 109 javax.servlet]
175 com.hp.atom.wssupport
[provided by 109 javax.servlet]
247 org.springframework.web.servlet
[provided by 109 javax.servlet]
236 org.apache.santuario.xmlsec
[provided by 109 javax.servlet]
237 org.apache.servicemix.bundles.opensaml
[provided by 109 javax.servlet]
218 com.springsource.javax.servlet.jsp.jstl
[provided by 109 javax.servlet]
98 com.springsource.org.h2
[provided by 109 javax.servlet]
234 org.apache.cxf.bundle-minimal
[provided by 109 javax.servlet]
203 com.hp.atom.ium_jars
[provided by 109 javax.servlet]
193 com.hp.atom.raptor
[provided by 109 javax.servlet]
128 org.springframework.orm
[provided by 109 javax.servlet]
224 com.springsource.org.apache.commons.jxpath
[provided by 109 javax.servlet]
136 org.eclipse.virgo.web.dm
[provided by 109 javax.servlet]
167 com.hp.atom.persistence
[provided by 109 javax.servlet]
156 com.hp.atom.classloader
[provided by 109 javax.servlet]
204 com.hp.atom.repository_server
[provided by 109 javax.servlet]
119 org.eclipse.virgo.web.servlet.adapter
[provided by 109 javax.servlet]
134 org.eclipse.gemini.web.tomcat
[provided by 109 javax.servlet]
141 org.apache.catalina
[provided by 109 javax.servlet]
67 org.eclipse.osgi.services
[provided by 109 javax.servlet]
110 javax.servlet.jsp
[provided by 109 javax.servlet]
185 com.hp.atom.rule_engine
[provided by 109 javax.servlet]
162 com.hp.atom.codec
[provided by 109 javax.servlet]
233 org.apache.commons.configuration
[provided by 109 javax.servlet]
242 org.jboss.netty
[provided by 109 javax.servlet]
151 osgi.enterprise
[provided by 109 javax.servlet]
84 com.springsource.bsh
[provided by 109 javax.servlet]
179 com.hp.atom.central_management
[provided by 109 javax.servlet]
111 javax.xml.rpc
[provided by 109 javax.servlet]
148 org.apache.tomcat.api
[provided by 109 javax.servlet]
131 org.springframework.web
[provided by 109 javax.servlet]
135 org.eclipse.virgo.web.core
[provided by 109 javax.servlet]
osgi>


the wssupport bundle's infomation as following:
osgi> b 175
com.hp.atom.wssupport_3.1.0.SNAPSHOT [175]
Id=175, Status=RESOLVED Data Root=C:\virgo-tomcat-server-3.6.2\work\org.eclipse.osgi\bundles\175\data
"No registered services."
No services in use.
Exported packages
com.hp.atom.wssupport.i18n; version="0.0.0"[exported]
Imported packages
javax.ws.rs; version="1.1.1"<org.apache.servicemix.specs.jsr311-api-1.1.1_1.9.0 [240]>
org.apache.cxf.jaxrs.provider.aegis; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.helpers; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.interceptor.security; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.resource; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.xml.sax; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
org.apache.cxf.phase; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.servlet; version="2.6.0"<javax.servlet_3.0.0.v201112011016 [109]>
org.apache.cxf.transport.servlet; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.aegis.databinding; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.springframework.core.io; version="3.1.0.RELEASE"<org.springframework.core_3.1.0.RELEASE [125]>
org.apache.cxf.io; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.xml.parsers; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
javax.security.auth; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
org.w3c.dom; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
com.hp.atom.kernel; version="0.0.0"<com.hp.atom.kernel_3.1.0.SNAPSHOT [154]>
org.apache.cxf.configuration.security; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.aegis; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.springframework.jmx.export.annotation; version="3.1.0.RELEASE"<org.springframework.context_3.1.0.RELEASE [124]>
org.apache.cxf.common.security; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.xml.transform.stream; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
javax.xml.validation; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
org.osgi.service.http; version="1.2.1"<stale>
org.apache.cxf.jaxrs.provider.json; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.jaxrs.provider; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.security.auth.login; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
org.apache.cxf.frontend; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.common.classloader; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
com.hp.atom.kernel.metadata; version="0.0.0"<com.hp.atom.kernel_3.1.0.SNAPSHOT [154]>
org.apache.cxf.jaxrs; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.message; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.jaxb; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
com.hp.atom.commons.context; version="0.0.0"<com.hp.atom.commons_3.1.0.SNAPSHOT [155]>
com.hp.atom.kernel.config; version="0.0.0"<com.hp.atom.kernel_3.1.0.SNAPSHOT [154]>
com.hp.atom.kernel.util; version="0.0.0"<com.hp.atom.kernel_3.1.0.SNAPSHOT [154]>
org.apache.cxf.jaxws; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
com.hp.atom.kernel.logging; version="0.0.0"<com.hp.atom.kernel_3.1.0.SNAPSHOT [154]>
org.osgi.service.blueprint.container; version="1.0.0"<org.eclipse.gemini.blueprint.core_1.0.2.RELEASE [75]>
org.apache.cxf.transport; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
com.hp.atom.commons.container; version="0.0.0"<com.hp.atom.commons_3.1.0.SNAPSHOT [155]>
com.hp.atom.kernel.i18n; version="0.0.0"<com.hp.atom.kernel_3.1.0.SNAPSHOT [154]>
javax.ws.rs.core; version="1.1.1"<org.apache.servicemix.specs.jsr311-api-1.1.1_1.9.0 [240]>
org.apache.cxf.interceptor; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.security.auth.callback; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
org.apache.cxf.service.factory; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.transport.http; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
com.hp.usage.i18n; version="0.0.0"<com.hp.atom.ium_jars_3.1.0.SNAPSHOT [203]>
org.apache.cxf.security; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.databinding; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
com.hp.atom.commons.resource; version="0.0.0"<com.hp.atom.commons_3.1.0.SNAPSHOT [155]>
org.slf4j; version="1.7.2"<stale>
org.eclipse.gemini.blueprint.service; version="1.0.2.RELEASE"<org.eclipse.gemini.blueprint.core_1.0.2.RELEASE [75]>
org.apache.cxf.aegis.type; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.xml.transform; version="0.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
com.hp.atom.commons.wssupport; version="0.0.0"<com.hp.atom.commons_3.1.0.SNAPSHOT [155]>
org.apache.cxf.common.i18n; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.xml.bind; version="2.0.0"<org.eclipse.osgi_3.8.1.v20120830-144521 [0]>
org.apache.cxf.endpoint; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
org.apache.cxf.transport.servlet.servicelist; version="2.6.2"<org.apache.cxf.bundle-minimal_2.6.2 [234]>
javax.servlet.http; version="2.6.0"<javax.servlet_3.0.0.v201112011016 [109]>
org.eclipse.gemini.blueprint.compendium.config; version="1.0.2.RELEASE"<org.eclipse.gemini.blueprint.core_1.0.2.RELEASE [75]>
org.eclipse.gemini.blueprint.blueprint.config; version="1.0.2.RELEASE"<org.eclipse.gemini.blueprint.core_1.0.2.RELEASE [75]>
org.eclipse.gemini.blueprint.config; version="1.0.2.RELEASE"<org.eclipse.gemini.blueprint.core_1.0.2.RELEASE [75]>
org.osgi.service.blueprint; version="[1.0.0,2.0.0)"<unwired><optional>
No fragment bundles
Named class space
com.hp.atom.wssupport; bundle-version="3.1.0.SNAPSHOT"[provided]
No required bundles


osgi>
the war bundle's structure is as following:
index.php/fa/16108/0/

[Updated on: Wed, 04 September 2013 21:54]

Report message to a moderator

Re: virgo 3.6.2 java.lang.NoClassDefFoundError: javax/servlet/Servlet [message #1101172 is a reply to message #1100542] Wed, 04 September 2013 01:10 Go to previous messageGo to next message
qing paul is currently offline qing paul
Messages: 3
Registered: September 2013
Location: ShangHai
Junior Member
no one know it?
Re: virgo 3.6.2 java.lang.NoClassDefFoundError: javax/servlet/Servlet [message #1101835 is a reply to message #1101172] Wed, 04 September 2013 22:08 Go to previous message
qing paul is currently offline qing paul
Messages: 3
Registered: September 2013
Location: ShangHai
Junior Member
it can skip this issue if I removed the fold of OSGI-INFO and ATOM-INFO.
Previous Topic:can not deploy CXF 1.3.1 on Virgo 3.5
Next Topic:Redeploying WAR in pickup reloads all WAR bundles
Goto Forum:
  


Current Time: Fri Aug 22 03:56:04 EDT 2014

Powered by FUDForum. Page generated in 0.06906 seconds