Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » OSGI bundle start fail,erro:java.lang.ClassNotFoundException: org.xml.sax.EntityResolver
OSGI bundle start fail,erro:java.lang.ClassNotFoundException: org.xml.sax.EntityResolver [message #860785] Sat, 28 April 2012 07:47 Go to next message
lai zuhong is currently offline lai zuhongFriend
Messages: 2
Registered: April 2012
Junior Member
webframe.jar is web bundle,in my eclipse development environment,this jar can start and deploy successfully. jdk is 1.6.

my eclipse run enviorment inculde bundles:
spring-osgi-web-extender-1.2.1.jar
javax.servlet.jsp_2.0.0.v200806031607.jar
javax.servlet_2.5.0.v200910301333.jar
org.apache.commons.el_1.0.0.v201004212143.jar
org.apache.commons.logging_1.0.4.v201005080501.jar
org.apache.jasper_5.5.17.v201004212143.jar
org.apache.log4j_1.2.15.v201005080500.jar
org.eclipse.equinox.ds_1.2.0.v20100507.jar
org.eclipse.equinox.util_1.0.200.v20100503.jar
org.eclipse.osgi.services_3.2.100.v20100503.jar
org.eclipse.osgi.util_3.2.100.v20100503.jar
org.springframework.aop-2.5.6.SEC01.jar
org.springframework.beans-2.5.6.SEC01.jar
org.springframework.context-2.5.6.SEC01.jar
org.springframework.core-2.5.6.SEC01.jar
org.springframework.web-2.5.6.SEC01.jar
spring-osgi-core-1.2.1.jar
spring-osgi-extender-1.2.1.jar
spring-osgi-io-1.2.1.jar
spring-osgi-web-1.2.1.jar
catalina.osgi-5.5.23-SNAPSHOT.jar
catalina.start.osgi-1.0.0.jar
com.springsource.org.aopalliance-1.0.0.jar
webframe_1.0.0.jar


but out of eclipse dev enviorment,
webframe.jar start failed!jdk is the same 1.6

my enviorment is:
(1)config.ini:
eclipse.ignoreApp=true
osgi.syspath=.
osgi.clean=true
osgi.startLevel=6
osgi.bundles.defaultStartLevel=4

osgi.bundles=\
reference:file:bundles/spring-osgi-web-extender-1.2.1.jar@start,\
reference:file:bundles/javax.servlet.jsp_2.0.0.v200806031607.jar@start,\
reference:file:bundles/javax.servlet_2.5.0.v200910301333.jar@start,\
reference:file:bundles/org.apache.commons.el_1.0.0.v201004212143.jar@start,\
reference:file:bundles/org.apache.commons.logging_1.0.4.v201005080501.jar@start,\
reference:file:bundles/org.apache.jasper_5.5.17.v201004212143.jar@start,\
reference:file:bundles/org.apache.log4j_1.2.15.v201005080500.jar@start,\
reference:file:bundles/org.eclipse.equinox.ds_1.2.0.v20100507.jar@start,\
reference:file:bundles/org.eclipse.equinox.util_1.0.200.v20100503.jar@start,\
reference:file:bundles/org.eclipse.osgi.services_3.2.100.v20100503.jar@start,\
reference:file:bundles/org.eclipse.osgi.util_3.2.100.v20100503.jar@start,\
reference:file:bundles/org.springframework.aop-2.5.6.SEC01.jar@start,\
reference:file:bundles/org.springframework.beans-2.5.6.SEC01.jar@start,\
reference:file:bundles/org.springframework.context-2.5.6.SEC01.jar@start,\
reference:file:bundles/org.springframework.core-2.5.6.SEC01.jar@start,\
reference:file:bundles/org.springframework.web-2.5.6.SEC01.jar@start,\
reference:file:bundles/spring-osgi-core-1.2.1.jar@start,\
reference:file:bundles/spring-osgi-extender-1.2.1.jar@5:start,\
reference:file:bundles/spring-osgi-io-1.2.1.jar@start,\
reference:file:bundles/spring-osgi-web-1.2.1.jar@start,\
reference:file:bundles/catalina.osgi-5.5.23-SNAPSHOT.jar@start,\
reference:file:bundles/catalina.start.osgi-1.0.0.jar@start,\
reference:file:bundles/com.springsource.org.aopalliance-1.0.0.jar@start,\
reference:file:plugins/webframe_1.0.0.jar@start

(2)run.bat:
java -jar equinox.jar -console

(3)exceute run.bat,error:

info: Root WebApplicationContext: initialization started
2012-4-28 13:45:41 org.springframework.web.context.ContextLoader initWebApplicat
ionContext
erro: Context initialization failed
java.lang.NoClassDefFoundError: org/xml/sax/EntityResolver
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:7
Cool
at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:249)
at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:74
0)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)

at org.springframework.osgi.web.deployer.tomcat.TomcatWarDeployer.startC
atalinaContext(TomcatWarDeployer.java:144)
at org.springframework.osgi.web.deployer.tomcat.TomcatWarDeployer.startD
eployment(TomcatWarDeployer.java:133)
at org.springframework.osgi.web.deployer.support.AbstractWarDeployer.dep
loy(AbstractWarDeployer.java:93)
at org.springframework.osgi.web.extender.internal.activator.WarLoaderLis
tener$DeploymentManager$DeployTask.doRun(WarLoaderListener.java:257)
at org.springframework.osgi.web.extender.internal.activator.WarLoaderLis
tener$DeploymentManager$BaseTask.run(WarLoaderListener.java:215)
at org.springframework.scheduling.timer.DelegatingTimerTask.run(Delegati
ngTimerTask.java:66)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.ClassNotFoundException: org.xml.sax.EntityResolver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(Bundl
eLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.
java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(De
faultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 21 more
2012-4-28 13:45:41 org.apache.catalina.core.StandardContext listenerStart

but webframe.jar start failed!
why?
org.xml.sax.EntityResolver is in rt.jar. rt.jar is a jdk jar,cannot loda rt.jar when start?
How I do?
Re: OSGI bundle start fail,erro:java.lang.ClassNotFoundException: org.xml.sax.EntityResolver [message #860943 is a reply to message #860785] Sat, 28 April 2012 09:32 Go to previous message
lai zuhong is currently offline lai zuhongFriend
Messages: 2
Registered: April 2012
Junior Member
I have got it.

webframe.jar's MANIFEST.MF add

Import-Package:
org.xml.sax,
org.xml.sax.ext,
org.xml.sax.helpers
Previous Topic:Cannot find a file in my bundle
Next Topic:ServletBridge Enterprise Ready?
Goto Forum:
  


Current Time: Tue Oct 26 06:56:27 GMT 2021

Powered by FUDForum. Page generated in 0.01764 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top