首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java相关 >

OSGI中登记web服务报错

2012-12-14 
OSGI中注册web服务报错!在通过HttpService注册jspServlet时,老是报错,哪位兄台知道。org.osgi.framework.Bu

OSGI中注册web服务报错!
在通过HttpService注册jspServlet时,老是报错,哪位兄台知道。
org.osgi.framework.BundleException: Exception in com.stulife.example.web.HTTPContextResgistryActivator.start() of bundle computeWeb.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.eclipse.equinox.http.servlet.ServletContextImpl.getServlet(Ljava/lang/String;)Ljavax/servlet/Servlet;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/equinox/http/servlet/ServletContextImpl, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for interface javax/servlet/ServletContext have different Class objects for the type javax/servlet/Servlet used in the signature
at org.eclipse.equinox.http.HttpListener.getServletContext(HttpListener.java:373)
at org.eclipse.equinox.http.HttpListener.registerServlet(HttpListener.java:327)
at org.eclipse.equinox.http.HttpService.registerServlet(HttpService.java:54)
at com.stulife.example.web.HTTPContextResgistryActivator.start(HTTPContextResgistryActivator.java:56)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
... 14 more
Nested Exception:
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.eclipse.equinox.http.servlet.ServletContextImpl.getServlet(Ljava/lang/String;)Ljavax/servlet/Servlet;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/equinox/http/servlet/ServletContextImpl, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for interface javax/servlet/ServletContext have different Class objects for the type javax/servlet/Servlet used in the signature


at org.eclipse.equinox.http.HttpListener.getServletContext(HttpListener.java:373)
at org.eclipse.equinox.http.HttpListener.registerServlet(HttpListener.java:327)
at org.eclipse.equinox.http.HttpService.registerServlet(HttpService.java:54)
at com.stulife.example.web.HTTPContextResgistryActivator.start(HTTPContextResgistryActivator.java:56)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
at java.lang.Thread.run(Thread.java:619)
Nested Exception:
java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.eclipse.equinox.http.servlet.ServletContextImpl.getServlet(Ljava/lang/String;)Ljavax/servlet/Servlet;" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/eclipse/equinox/http/servlet/ServletContextImpl, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for interface javax/servlet/ServletContext have different Class objects for the type javax/servlet/Servlet used in the signature
at org.eclipse.equinox.http.HttpListener.getServletContext(HttpListener.java:373)
at org.eclipse.equinox.http.HttpListener.registerServlet(HttpListener.java:327)
at org.eclipse.equinox.http.HttpService.registerServlet(HttpService.java:54)
at com.stulife.example.web.HTTPContextResgistryActivator.start(HTTPContextResgistryActivator.java:56)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:272)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandProvider._start(FrameworkCommandProvider.java:253)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.osgi.framework.internal.core.FrameworkCommandInterpreter.execute(FrameworkCommandInterpreter.java:155)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.docommand(FrameworkConsole.java:303)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.console(FrameworkConsole.java:288)
at org.eclipse.osgi.framework.internal.core.FrameworkConsole.run(FrameworkConsole.java:224)
at java.lang.Thread.run(Thread.java:619)
[最优解释]
帮顶
[其他解释]
同样的问题,帮顶
[其他解释]
会不会是导入的包出错了
或者是绑定了重复不需要的包

热点排行