Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Class loading issues under Tomcat (Servlet Bridge)
Class loading issues under Tomcat (Servlet Bridge) [message #111710] Tue, 10 June 2008 20:10 Go to next message
Eclipse UserFriend
Originally posted by: mingerman.metatomix.com

I have been running into some class loading problems (it appears to be class
loading) when running our code under the servlet bridge inside Tomcat.
These problems do not present themselves when running a stand alone OSGi
stack when we embed Jetty. The most recent stack trace is:

> java.lang.NoSuchMethodError:
> GregorSamsa.createDocument(Lcom/sun/org/apache/xalan/interna l/xsltc/DOM;Lcom/s
> un/org/apache/xml/internal/dtm/
> DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/ SerializationHandl
> er;I)V
> at GregorSamsa.template$dot$4()
> at GregorSamsa.applyTemplates()
> at GregorSamsa.template$dot$3()
> at GregorSamsa.applyTemplates()
> at GregorSamsa.transform()
> ....

Like I said, runs under OSGi, but not inside the servlet bridge. Any help
would be appreciated...

--
Mark M. Ingerman
Senior Architect
Metatomix
www.metatomix.com
781 907-6746
Re: Class loading issues under Tomcat (Servlet Bridge) [message #111740 is a reply to message #111710] Wed, 11 June 2008 01:19 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Hi Mark,

Two questions...
Is your application embedding it's own copy of Xalan or are you just using
JAXP?
In your WAR file--> WEB-INF/eclipse/launch.ini what is the value of
osgi.parentClassloader?

-Simon

"Mark Ingerman" <mingerman@metatomix.com> wrote in message
news:C47457FC.4927%mingerman@metatomix.com...
>I have been running into some class loading problems (it appears to be
>class
> loading) when running our code under the servlet bridge inside Tomcat.
> These problems do not present themselves when running a stand alone OSGi
> stack when we embed Jetty. The most recent stack trace is:
>
>> java.lang.NoSuchMethodError:
>> GregorSamsa.createDocument(Lcom/sun/org/apache/xalan/interna l/xsltc/DOM;Lcom/s
>> un/org/apache/xml/internal/dtm/
>> DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/ SerializationHandl
>> er;I)V
>> at GregorSamsa.template$dot$4()
>> at GregorSamsa.applyTemplates()
>> at GregorSamsa.template$dot$3()
>> at GregorSamsa.applyTemplates()
>> at GregorSamsa.transform()
>> ....
>
> Like I said, runs under OSGi, but not inside the servlet bridge. Any help
> would be appreciated...
>
> --
> Mark M. Ingerman
> Senior Architect
> Metatomix
> www.metatomix.com
> 781 907-6746
>
Re: Class loading issues under Tomcat (Servlet Bridge) [message #111756 is a reply to message #111740] Wed, 11 June 2008 17:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mingerman.metatomix.com

Simon,

Hi.

1) Altough we have the xlan JAR in another bundle, this bundle does not
reference it directly or indirectly, so it was getting loaded from the
JRE/parent loader.

2) The osgi.parentClassloader is currently set to FWK, but we have tried
other settings (CCL and BOOT).

Thanks.


On 6/10/08 9:19 PM, in article g2n96q$ju2$1@build.eclipse.org, "Simon Kaegi"
<simon_kaegi@ca.ibm.com> wrote:

> Hi Mark,
>
> Two questions...
> Is your application embedding it's own copy of Xalan or are you just using
> JAXP?
> In your WAR file--> WEB-INF/eclipse/launch.ini what is the value of
> osgi.parentClassloader?
>
> -Simon
>
> "Mark Ingerman" <mingerman@metatomix.com> wrote in message
> news:C47457FC.4927%mingerman@metatomix.com...
>> I have been running into some class loading problems (it appears to be
>> class
>> loading) when running our code under the servlet bridge inside Tomcat.
>> These problems do not present themselves when running a stand alone OSGi
>> stack when we embed Jetty. The most recent stack trace is:
>>
>>> java.lang.NoSuchMethodError:
>>> GregorSamsa.createDocument(Lcom/sun/org/apache/xalan/interna l/xsltc/DOM;Lcom
>>> /s
>>> un/org/apache/xml/internal/dtm/
>>> DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/ SerializationHan
>>> dl
>>> er;I)V
>>> at GregorSamsa.template$dot$4()
>>> at GregorSamsa.applyTemplates()
>>> at GregorSamsa.template$dot$3()
>>> at GregorSamsa.applyTemplates()
>>> at GregorSamsa.transform()
>>> ....
>>
>> Like I said, runs under OSGi, but not inside the servlet bridge. Any help
>> would be appreciated...
>>
>> --
>> Mark M. Ingerman
>> Senior Architect
>> Metatomix
>> www.metatomix.com
>> 781 907-6746
>>
>
>

--
Mark M. Ingerman
Senior Architect
Metatomix
www.metatomix.com
781 907-6746
Re: Class loading issues under Tomcat (Servlet Bridge) [message #111779 is a reply to message #111756] Wed, 11 June 2008 21:57 Go to previous message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
Hi Mark,

If you can avoid it I would suggest not using "fwk" as you're leaking all of
the servers classes into your OSGi framework which will ultimately give you
portability problems.

I instead I would try setting:
osgi.parentClassloader=app
osgi.contextClassLoaderParent=app

Normally I would suggest "ext" however many app servers will over-ride the
default JAXP settings with libraries they put on the application or system
class loader. With that said, "boot" is usually fine with tomcat and is the
default and so is the closest thing to running with the embedded Jetty
implementation.

-Simon

"Mark Ingerman" <mingerman@metatomix.com> wrote in message
news:C4757DFE.495E%mingerman@metatomix.com...
> Simon,
>
> Hi.
>
> 1) Altough we have the xlan JAR in another bundle, this bundle does not
> reference it directly or indirectly, so it was getting loaded from the
> JRE/parent loader.
>
> 2) The osgi.parentClassloader is currently set to FWK, but we have tried
> other settings (CCL and BOOT).
>
> Thanks.
>
>
> On 6/10/08 9:19 PM, in article g2n96q$ju2$1@build.eclipse.org, "Simon
> Kaegi"
> <simon_kaegi@ca.ibm.com> wrote:
>
>> Hi Mark,
>>
>> Two questions...
>> Is your application embedding it's own copy of Xalan or are you just
>> using
>> JAXP?
>> In your WAR file--> WEB-INF/eclipse/launch.ini what is the value of
>> osgi.parentClassloader?
>>
>> -Simon
>>
>> "Mark Ingerman" <mingerman@metatomix.com> wrote in message
>> news:C47457FC.4927%mingerman@metatomix.com...
>>> I have been running into some class loading problems (it appears to be
>>> class
>>> loading) when running our code under the servlet bridge inside Tomcat.
>>> These problems do not present themselves when running a stand alone OSGi
>>> stack when we embed Jetty. The most recent stack trace is:
>>>
>>>> java.lang.NoSuchMethodError:
>>>> GregorSamsa.createDocument(Lcom/sun/org/apache/xalan/interna l/xsltc/DOM;Lcom
>>>> /s
>>>> un/org/apache/xml/internal/dtm/
>>>> DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/ SerializationHan
>>>> dl
>>>> er;I)V
>>>> at GregorSamsa.template$dot$4()
>>>> at GregorSamsa.applyTemplates()
>>>> at GregorSamsa.template$dot$3()
>>>> at GregorSamsa.applyTemplates()
>>>> at GregorSamsa.transform()
>>>> ....
>>>
>>> Like I said, runs under OSGi, but not inside the servlet bridge. Any
>>> help
>>> would be appreciated...
>>>
>>> --
>>> Mark M. Ingerman
>>> Senior Architect
>>> Metatomix
>>> www.metatomix.com
>>> 781 907-6746
>>>
>>
>>
>
> --
> Mark M. Ingerman
> Senior Architect
> Metatomix
> www.metatomix.com
> 781 907-6746
>
Previous Topic:Bridge.war in Sun One
Next Topic:Running Jetty as a Workbench service
Goto Forum:
  


Current Time: Fri Apr 19 23:37:07 GMT 2024

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

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

Back to the top