关于OSGI实例中Spring-DM中HelloWorldWeb的运行出现错误,跪求指导
错误为:!ENTRY org.apache.jasper 4 0 2012-01-25 23:23:30.132
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "org.apache.jasper_5.5.17.v201101211617 [47]" could not be resolved. Reason: Missing Constraint: Import-Package: javax.servlet.jsp; version="[2.0.0,2.1.0)"
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1311)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY HelloWorldWeb 4 0 2012-01-25 23:23:30.137
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "HelloWorldWeb_1.0.0.qualifier [51]" could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.jasper; version="0.0.0"
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1311)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
我的MANIFEST.MF配置文件中为:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: HelloWorldWeb
Bundle-SymbolicName: HelloWorldWeb
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: javax.servlet;version="2.5.0",
javax.servlet.http;version="2.5.0",
org.apache.jasper;version="5.5.17", org.osgichina.demo.timeservice,
org.springframework.osgi.context;version="1.1.3",
org.springframework.osgi.context.support;version="1.1.3",
org.springframework.osgi.extender;version="1.1.3",
org.springframework.osgi.web.context.support;version="1.1.3"
Require-Bundle: org.springframework.bundle.osgi.io;bundle-version="1.1.3",
org.springframework.bundle.spring.beans;bundle-version="2.5.5",
org.springframework.bundle.spring.core;bundle-version="2.5.5",
org.apache.commons.logging;bundle-version="1.0.4",
org.springframework.bundle.spring.context;bundle-version="2.5.5",
org.springframework.bundle.osgi.core;bundle-version="1.1.3"
很明显我已经加入了jasper这个jar包,有哪位大哥玩OSGI的还请问,这个是怎么回事?是因为缺少javax.servlet.jsp这个jar包的引入吗?但是书中的例子中并没有要引入此包,而且就算我在配置文件中引入,又会报别的包,在引入也是有问题,太让人费解了。
--------------------编程问答-------------------- Tomcat 5版本太低了,版本改大点,
或改用Jetty --------------------编程问答-------------------- 请问我这个用的tomcat是spring-dm 1.1.3包中自带的,如何改大 ,我用spring-dm2包是不是就可以了呢?但是官网上不知为何 下载不了2的。 --------------------编程问答-------------------- 改大,具体版本号不确定的时候,可以将版本号去掉,如
org.apache.jasper, org.osgichina.demo.timeservice, --------------------编程问答-------------------- 遇到同样问题!
补充:Java , Java EE