Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to get jars loaded by tomcat plugin when using help with RCP?
how to get jars loaded by tomcat plugin when using help with RCP? [message #438547] Thu, 20 October 2005 12:05 Go to next message
Eclipse UserFriend
I am having trouble with Tomcat not being able to load the Xerces
parser; the ClassLoader can't find the Xerces parser class, but the
Xerces JAR files are contained in a plugin which is include in both the
product/run configuration.

Other plugins in my RCP application can see these JAR files and
succesfully load the Xerces parser, but the Tomcat plugin can't seem to
find it.

I set the context class loader in the display thread like this when my
app starts:

Thread.currentThread().setContextClassLoader(getClass()
.getClassLoader());


When running with the debugger, I can see that it uses the Eclipse
classloader to try to resolve the class, but it is pointed to the tomcat
bundle where it does not find the class. At other times, during the
execution of the application, it can successfully load the xerces class
because the classloader is pointed to the plugin that contains the jar file.

Any idea?

Thanks,

Francis
Re: how to get jars loaded by tomcat plugin when using help with RCP? [message #438560 is a reply to message #438547] Thu, 20 October 2005 20:47 Go to previous messageGo to next message
Eclipse UserFriend
I was able to fix this by adding the following line to the tomcat plugin
manifest file:

Eclipse-BuddyPolicy: global

Francis


Francis Upton wrote:
> I am having trouble with Tomcat not being able to load the Xerces
> parser; the ClassLoader can't find the Xerces parser class, but the
> Xerces JAR files are contained in a plugin which is include in both the
> product/run configuration.
>
> Other plugins in my RCP application can see these JAR files and
> succesfully load the Xerces parser, but the Tomcat plugin can't seem to
> find it.
>
> I set the context class loader in the display thread like this when my
> app starts:
>
> Thread.currentThread().setContextClassLoader(getClass()
> .getClassLoader());
>
>
> When running with the debugger, I can see that it uses the Eclipse
> classloader to try to resolve the class, but it is pointed to the tomcat
> bundle where it does not find the class. At other times, during the
> execution of the application, it can successfully load the xerces class
> because the classloader is pointed to the plugin that contains the jar
> file.
>
> Any idea?
>
> Thanks,
>
> Francis
Re: how to get jars loaded by tomcat plugin when using help with RCP? [message #438582 is a reply to message #438560] Thu, 20 October 2005 21:28 Go to previous messageGo to next message
Eclipse UserFriend
Sigh, I thought that fixed it, and it did when running the RCP app
within the IDE, but when I deployed it and tried to run it on its own,
it still fails.

Any ideas?

Francis Upton wrote:
> I was able to fix this by adding the following line to the tomcat plugin
> manifest file:
>
> Eclipse-BuddyPolicy: global
>
> Francis
>
>
> Francis Upton wrote:
>
>> I am having trouble with Tomcat not being able to load the Xerces
>> parser; the ClassLoader can't find the Xerces parser class, but the
>> Xerces JAR files are contained in a plugin which is include in both
>> the product/run configuration.
>>
>> Other plugins in my RCP application can see these JAR files and
>> succesfully load the Xerces parser, but the Tomcat plugin can't seem
>> to find it.
>>
>> I set the context class loader in the display thread like this when my
>> app starts:
>>
>> Thread.currentThread().setContextClassLoader(getClass()
>> .getClassLoader());
>>
>>
>> When running with the debugger, I can see that it uses the Eclipse
>> classloader to try to resolve the class, but it is pointed to the
>> tomcat bundle where it does not find the class. At other times,
>> during the execution of the application, it can successfully load the
>> xerces class because the classloader is pointed to the plugin that
>> contains the jar file.
>>
>> Any idea?
>>
>> Thanks,
>>
>> Francis
Re: how to get jars loaded by tomcat plugin when using help with RCP? [message #438585 is a reply to message #438582] Fri, 21 October 2005 03:50 Go to previous message
Eclipse UserFriend
Actually, it did fix it, the problem was I needed to do a "-clean" as
the arg to my application when I started it and then everything was fine.

Francis Upton wrote:
> Sigh, I thought that fixed it, and it did when running the RCP app
> within the IDE, but when I deployed it and tried to run it on its own,
> it still fails.
>
> Any ideas?
>
> Francis Upton wrote:
>
>> I was able to fix this by adding the following line to the tomcat
>> plugin manifest file:
>>
>> Eclipse-BuddyPolicy: global
>>
>> Francis
>>
>>
>> Francis Upton wrote:
>>
>>> I am having trouble with Tomcat not being able to load the Xerces
>>> parser; the ClassLoader can't find the Xerces parser class, but the
>>> Xerces JAR files are contained in a plugin which is include in both
>>> the product/run configuration.
>>>
>>> Other plugins in my RCP application can see these JAR files and
>>> succesfully load the Xerces parser, but the Tomcat plugin can't seem
>>> to find it.
>>>
>>> I set the context class loader in the display thread like this when
>>> my app starts:
>>>
>>> Thread.currentThread().setContextClassLoader(getClass()
>>> .getClassLoader());
>>>
>>>
>>> When running with the debugger, I can see that it uses the Eclipse
>>> classloader to try to resolve the class, but it is pointed to the
>>> tomcat bundle where it does not find the class. At other times,
>>> during the execution of the application, it can successfully load the
>>> xerces class because the classloader is pointed to the plugin that
>>> contains the jar file.
>>>
>>> Any idea?
>>>
>>> Thanks,
>>>
>>> Francis
Previous Topic:view in view
Next Topic:Export a rcp product via command line
Goto Forum:
  


Current Time: Mon Nov 10 13:25:49 EST 2025

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

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

Back to the top