Re: WebObjects jar frameworks and classpaths
Re: WebObjects jar frameworks and classpaths
- Subject: Re: WebObjects jar frameworks and classpaths
- From: John Pollard <email@hidden>
- Date: Mon, 19 Jan 2009 15:38:19 +0000
Chuck,
On 15 Jan 2009, at 19:19, Chuck Hill wrote:
Another very helpful guy on the Rome list said this:
[START QUOTE]
... it would seem to be a classloading bug. The code we use to load
the plugin is effectively this:
Class clazz = Class.forName(_propertyValues[i], true,
Thread.currentThread().getContextClassLoader())
Where does that get called from? When? I'd guess that
Thread.currentThread() would be a WOWorkerThread and it should be
able load that class if it is in a framework.
Not from anywhere unusual, just a DirectAction method.
For now I have had to throw everything back into /Library/Java/
Extensions to make things work.
I have to think how much time I've spent trying to take some jars
(previously jasper reports, now rome) out of /L/J/E and into jar
frameworks!
OK, so it might be a class loading error after all. Is there
anything else in /Library/Java/Extensions that might have a
dependancy to/from the jars you are moving? If you put those jars
in /Library/WebObjects/Extensions, does it make any difference?
The two jars in a library are the rome jar and jdom. The jdom jar is
also used by the jasper (reports) jar.
I did try moving the jasper jar to /Library/WebObjects/Extensions but
each project reported that it was missing a required library '/Library/
WebObjects/Extensions/jasperreports-3.0.0.jar' (i.e. its previous
location) despite me cleaning all projects, f5'ing and restarting
eclipse. A search for the jar being mentioned in any file in any
project came up with a couple of .classpath entries which I removed
but couldn't shake the problem reports.
Note that putting that jasper jar in the same WO framework as the rome
jar, together with jdom, did not resolve the problem.
I think I will have to leave everything in /Library/Java/Extension
Thanks for your help.
John
Chuck
On 8 Jan 2009, at 14:01, John Pollard wrote:
Lachlan,
Many thanks for your reply. I have updated to the latest Eclipse
3.4.1 and the latest WOLips nightly, but that does not resolve
this issue. I am also posting to the rome mailing list to try
from that angle, but a nightly build of the latest rome jar
didn't help either.
I also tried adding the two jars to my application directly,
cutting out the framework, but got the same outcome.
The rome jar only depends on the jdom dar, so shouldn't be too
complicated. I will post back if I eventually find the reason
for this.
John
On 6 Jan 2009, at 23:31, Lachlan Deck wrote:
Hi John,
On 07/01/2009, at 12:18 AM, John Pollard wrote:
A bit off topic, but I am struggling to make sense of this.
Simply put I want to understand why I can't put a couple of
jars into a WO framework and have the code still work as it
does when the same jars are in /Library/Java/Extensions.
Not really off topic. This is a classpath issue.
Created a new WebObjects framework.
Manually moved two jar files (rome-1.0RC1.jar and jdom.jar)
out of /Library/Java/Extensions into the new framework
project's /Libraries sub folder
Good.
In Java Build Path properties, Libraries tab, Add Jars.. to
add them in, then in the Order and Export tab tick them
Good.
In the app project, add the new framework as a dependency
Eclipse shows no compile time problems, so why the runtime
error:
[java.lang.NoClassDefFoundError] com/sun/syndication/io/
ModuleGenerator
I will be very grateful for any pointers to help me solve this
one; in particular why/when Eclipse is happy at compile time,
but actually the classes are not found when run.
Are you running WOLips nightly and Eclipse 3.4.x? If not you
might need to update WOLips/Eclipse to get the fix that I think
went in late November.
The class that is not found is definitely in the rome jar.
Search the archives for Transitive. It's a transitive
dependency problem.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden