I'm trying to get felix.http.jetty working but I faced several issues with the
latest version of Felix.
First, the servlet-api bundle does not provide the JavaServlet capability. So I
had to create a fragment saying that it does!
Then, after resolving all dependencies, I got this error below.
Any of you guys have faced this issue? Seems like a bug in Felix?!
Regards,
Renato
2015-10-27 23:32:16.846:WARN:oejuc.AbstractLifeCycle:FelixStartLevel: FAILED
org.eclipse.jetty.server.Server@194bb959: java.lang.LinkageError: loader
constraint violation: loader (instance of
org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) previously
initiated loading for a different type with name
"org/eclipse/jetty/util/component/LifeCycle$Listener"
java.lang.LinkageError: loader constraint violation: loader (instance of
org/apache/felix/framework/BundleWiringImpl$BundleClassLoaderJava5) previously
initiated loading for a different type with name
"org/eclipse/jetty/util/component/LifeCycle$Listener"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
g! ERROR: Bundle org.apache.felix.http.jetty [28] Error starting
file:/home/renato/programming/java/osgi-run/osgi-run-test/declarative-services-demo/build/osgi/bundle/org.apache.felix.http.jetty-3.1.2.jar
(org.osgi.framework.BundleException: Activator start error in bundle
org.apache.felix.http.jetty [28].)
at
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:187)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67)
at
org.apache.felix.http.jetty.internal.JettyService.initializeJetty(JettyService.java:269)
at
org.apache.felix.http.jetty.internal.JettyService.startJetty(JettyService.java:201)
at
org.apache.felix.http.jetty.internal.JettyService.start(JettyService.java:134)
at
org.apache.felix.http.jetty.internal.JettyActivator.doStart(JettyActivator.java:60)
at
org.apache.felix.http.base.internal.AbstractActivator.start(AbstractActivator.java:41)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:745)
java.lang.LinkageError: org/eclipse/jetty/util/component/LifeCycle$Listener
at
org.eclipse.jetty.util.component.AbstractLifeCycle.setFailed(AbstractLifeCycle.java:213)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
at
org.apache.felix.http.jetty.internal.JettyService.initializeJetty(JettyService.java:269)
at
org.apache.felix.http.jetty.internal.JettyService.startJetty(JettyService.java:201)
at
org.apache.felix.http.jetty.internal.JettyService.start(JettyService.java:134)
at
org.apache.felix.http.jetty.internal.JettyActivator.doStart(JettyActivator.java:60)
at
org.apache.felix.http.base.internal.AbstractActivator.start(AbstractActivator.java:41)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
at
org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:745)
ERROR: Cannot create MetaType providing ManagedService; not providing Metatype
information but just accepting configuration
> Building 96% > :declarative-services-demo:runOsgilb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (5.4.0)
1|Active | 1|animal-sniffer-annotations (1.9.0)
2|Active | 1|Apache Commons FileUpload (1.3.1)
3|Active | 1|Commons IO (2.2.0)
4|Active | 1|components (1.0.0)
5|Active | 1|Guava: Google Core Libraries for Java (18.0.0)
6|Active | 1|Java Servlet API (3.1.0)
7|Active | 1|Jetty :: Http Utility (9.2.12.v20150709)
8|Active | 1|Jetty :: IO Utility (9.2.12.v20150709)
9|Active | 1|Jetty :: JMX Management (9.2.12.v20150709)
10|Active | 1|Jetty :: Security (9.2.12.v20150709)
11|Active | 1|Jetty :: Server Core (9.2.12.v20150709)
12|Active | 1|Jetty :: Servlet Handling (9.2.12.v20150709)
13|Active | 1|Jetty :: Utilities (9.2.12.v20150709)
14|Active | 1|Jetty :: Webapp Application Support (9.2.12.v20150709)
15|Active | 1|Jetty :: XML utilities (9.2.12.v20150709)
16|Active | 1|json (20150729.0.0)
17|Active | 1|jsr305 (3.0.0)
18|Active | 1|message-consumer (1.0.0)
19|Active | 1|message-producer (1.0.0)
20|Active | 1|messaging-api,Simple Messaging API (1.0.0)
21|Active | 1|Apache Felix Configuration Admin Service (1.8.8)
22|Active | 1|Apache Felix EventAdmin (1.4.4)
23|Active | 1|Apache Felix Gogo Command (0.14.0)
24|Active | 1|Apache Felix Gogo Runtime (0.12.1)
25|Active | 1|Apache Felix Gogo Shell (0.10.0)
26|Active | 1|Apache Felix Http API (3.0.0)
27|Active | 1|Apache Felix Http Base (3.0.2)
28|Resolved | 1|Apache Felix Http Jetty (3.1.2)
29|Active | 1|Apache Felix Declarative Services (2.0.2)
30|Active | 1|Apache Felix Web Management Console (4.2.14)
31|Resolved | 1|servlet-api-fragment (1.0.0)
> Date: Mon, 26 Oct 2015 12:19:04 -0700
> From: [email protected]
> To: [email protected]
> Subject: Re: WebSockets usage
>
> Thomas:
>
> This is interesting, because I am using the Jetty solution.
>
> Is your servlet actually being registered? If it is, did you have to make
> any changes in the code in order to achieve this?
>
> In particular, is that start() function in the servlet being called at any
> time while you are running Felix? In my project, it is *not* being called,
> so that direct registration is not happening. In other words, when I set
> breakpoints in that function and run Felix in debug mode, the breakpoints
> are never reached. Are you seeing the same thing when setting breakpoints in
> your start() function and runing Felix in the debugger? Or are your
> breakpoints being reached? Are you able to connect to your Websocket class?
>
>
>
> --
> View this message in context:
> http://apache-felix.18485.x6.nabble.com/WebSockets-usage-tp5012240p5015312.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>