OK, so I think I have resolved this particular problem by removing the version 
information from the 

                map.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, 
"com.bt.test;version=1.0.0,javax.servlet,javax.servlet.http;version=2.5");

in my host application to make it:

                map.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, 
"com.bt.test;version=1.0.0,javax.servlet,javax.servlet.http");

Mind you, still can't get my bridge to work, just getting ServiceUnavailable. 
Will investigate further.....



-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: 06 April 2011 17:21
To: [email protected]
Subject: webconsole and servlet api bundle versions

Hello all,

I'm trying to deploy the latest version of webconsole (3.1.8) into my embedded 
felix application and I am struggling with the version of servlet api needed.

1. I have tried not supplying any additional bundles and relying on the Serlvet 
container (jetty) that has a 2.5 version:

ERROR: Bundle org.apache.felix.webconsole [4] Error starting 
file:/home/adrian/work/jetty-6.1.15/bundle/org.apache.felix.webconsole-3.1.8.jar
 (org.osgi.framework.BundleException: Activator start error in bundle 
org.apache.felix.webconsole [4].)
java.lang.LinkageError: loader constraint violation: loader (instance of 
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) previously 
initiated loading for a different type with name "javax/servlet/ServletConfig"
        at java.lang.ClassLoader.defineClass1(Native Method)




2. I have tried using com.springsource.javax.servlet-2.5.0.jar. This appears to 
load ok, but when I try and access the console from my browser I see:

2011-04-06 17:18:50.114::WARN:  Error for /felix/system/console
java.lang.LinkageError: loader constraint violation: when resolving method 
"javax.servlet.ServletRequestEvent.<init>(Ljavax/servlet/ServletContext;Ljavax/servlet/ServletRequest;)V"
 the class loader (instance of 
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) of the current 
class, org/apache/felix/http/base/internal/DispatcherServlet, and the class 
loader (instance of 
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) for resolved 
class, javax/servlet/ServletRequestEvent, have different Class objects for the 
type javax/servlet/ServletContext used in the signature
        at 
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:62)

3. Using com.springsource.javax.servlet-2.4.0.jar gives:

ERROR: Bundle org.apache.felix.webconsole [5] Error starting 
file:/home/adrian/work/jetty-6.1.15/bundle/org.apache.felix.webconsole-3.1.8.jar
 (org.osgi.framework.BundleException: Activator start error in bundle 
org.apache.felix.webconsole [5].)
java.lang.LinkageError: loader constraint violation: loader (instance of 
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) previously 
initiated loading for a different type with name "javax/servlet/ServletConfig"
        at java.lang.ClassLoader.defineClass1(Native Method)

Any help appreciated.

Thanks

Adrian Smith


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to