Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » servlet linkage error when using servlet bridge
servlet linkage error when using servlet bridge [message #93233] Mon, 30 July 2007 04:54 Go to next message
Eclipse UserFriend
Originally posted by: dkrebs.tibco.com

Hi,
This one is totally killing me. I'm trying to run the servlet bridge
framework in tomcat6 and have traced down the issue to this part of the
log file, I get the general idea that its complaining about different
class versions of the servlet class but don't know how to fix the problem,
any ideas would be appreciated. - Duncan


used by: java.lang.LinkageError: loader constraint violation: when
resolving method
" org.eclipse.equinox.servletbridge.BridgeServlet.registerServ letDelegate(Ljavax/servlet/http/HttpServlet;)V "
the class loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current
class, org/eclipse/equinox/http/servletbridge/internal/Activator, and the
class loader (instance of org/apache/catalina/loader/WebappClassLoader)
for resolved class, org/eclipse/equinox/servletbridge/BridgeServlet, have
different Class objects for the type javax/servlet/http/HttpServlet used
in the signature
at
org.eclipse.equinox.http.servletbridge.internal.Activator.st art(Activator.java:28)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
... 8 moreused by: java.lang.LinkageError: loader constraint violation:
when resolving method
" org.eclipse.equinox.servletbridge.BridgeServlet.registerServ letDelegate(Ljavax/servlet/http/HttpServlet;)V "
the class loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current
class, org/eclipse/equinox/http/servletbridge/internal/Activator, and the
class loader (instance of org/apache/catalina/loader/WebappClassLoader)
for resolved class, org/eclipse/equinox/servletbridge/BridgeServlet, have
different Class objects for the type javax/servlet/http/HttpServlet used
in the signature
at
org.eclipse.equinox.http.servletbridge.internal.Activator.st art(Activator.java:28)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
... 8 more
Re: servlet linkage error when using servlet bridge [message #93266 is a reply to message #93233] Mon, 30 July 2007 13:10 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Do you have the javax.servlet (or org.eclipse.equinox.servlet.api) bundle in
your install?
You shouldn't have this with the servletbridge. The javax.servlet packages
are exposed with a framework extension bundle called
org.eclipse.equinox.servlletbridge.extensionbundle.

HTH
-Simon

"Duncan Krebs" <dkrebs@tibco.com> wrote in message
news:6bdf9602fa7fed6c679c38225a3237ae$1@www.eclipse.org...
> Hi, This one is totally killing me. I'm trying to run the servlet bridge
> framework in tomcat6 and have traced down the issue to this part of the
> log file, I get the general idea that its complaining about different
> class versions of the servlet class but don't know how to fix the problem,
> any ideas would be appreciated. - Duncan
>
> used by: java.lang.LinkageError: loader constraint violation: when
> resolving method
> " org.eclipse.equinox.servletbridge.BridgeServlet.registerServ letDelegate(Ljavax/servlet/http/HttpServlet;)V "
> the class loader (instance of
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current
> class, org/eclipse/equinox/http/servletbridge/internal/Activator, and the
> class loader (instance of org/apache/catalina/loader/WebappClassLoader)
> for resolved class, org/eclipse/equinox/servletbridge/BridgeServlet, have
> different Class objects for the type javax/servlet/http/HttpServlet used
> in the signature
> at
> org.eclipse.equinox.http.servletbridge.internal.Activator.st art(Activator.java:28)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
> ... 8 moreused by: java.lang.LinkageError: loader constraint violation:
> when resolving method
> " org.eclipse.equinox.servletbridge.BridgeServlet.registerServ letDelegate(Ljavax/servlet/http/HttpServlet;)V "
> the class loader (instance of
> org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current
> class, org/eclipse/equinox/http/servletbridge/internal/Activator, and the
> class loader (instance of org/apache/catalina/loader/WebappClassLoader)
> for resolved class, org/eclipse/equinox/servletbridge/BridgeServlet, have
> different Class objects for the type javax/servlet/http/HttpServlet used
> in the signature
> at
> org.eclipse.equinox.http.servletbridge.internal.Activator.st art(Activator.java:28)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:999)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:993)
> ... 8 more
>
Re: servlet linkage error when using servlet bridge [message #93297 is a reply to message #93266] Mon, 30 July 2007 14:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dkrebs.tibco.com

Simon,
Thanks for the post, I had a lib bundle that contained the API and was
able to get it figured out. On a high level I think running OSGI in a
servlet container is great, especially because I've been able to wrap the
web.xml as extension points and also break my UI into extension points. I
just get nervous when things don't work in the servlet container because I
don't know of a way to debug an OSGI app while in tomcat for example,
hopefully this will take care of it though, if not some tutorials on class
loading might help. - Duncan

Simon Kaegi wrote:

> Do you have the javax.servlet (or org.eclipse.equinox.servlet.api) bundle in
> your install?
> You shouldn't have this with the servletbridge. The javax.servlet packages
> are exposed with a framework extension bundle called
> org.eclipse.equinox.servlletbridge.extensionbundle.

> HTH
> -Simon
Re: servlet linkage error when using servlet bridge [message #93312 is a reply to message #93297] Mon, 30 July 2007 15:40 Go to previous message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Thankfully you can debug an OSGi webapp just like any other webapp.
Just attach with Eclipse as you would normally and place break points in
useful places and it should just work.

-Simon

"Duncan Krebs" <dkrebs@tibco.com> wrote in message
news:2c7fa8bdd09cee065e004dd75c9c8a09$1@www.eclipse.org...
> Simon, Thanks for the post, I had a lib bundle that contained the API and
> was able to get it figured out. On a high level I think running OSGI in a
> servlet container is great, especially because I've been able to wrap the
> web.xml as extension points and also break my UI into extension points. I
> just get nervous when things don't work in the servlet container because I
> don't know of a way to debug an OSGI app while in tomcat for example,
> hopefully this will take care of it though, if not some tutorials on class
> loading might help. - Duncan
>
> Simon Kaegi wrote:
>
>> Do you have the javax.servlet (or org.eclipse.equinox.servlet.api) bundle
>> in your install?
>> You shouldn't have this with the servletbridge. The javax.servlet
>> packages are exposed with a framework extension bundle called
>> org.eclipse.equinox.servlletbridge.extensionbundle.
>
>> HTH
>> -Simon
>
>
>
Previous Topic:JMS/ActiveMQ Equinox OSGi bundle
Next Topic:dependency injection hooks
Goto Forum:
  


Current Time: Wed Apr 24 17:42:56 GMT 2024

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

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

Back to the top