| how to get jars loaded by tomcat plugin when using help with RCP? [message #438547] |
Thu, 20 October 2005 12:05  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06191 seconds