Thanks Mike,

I would like to cheat, but where and how I can set this? The class _NSUtilities is final...

Greetings,
Georg
When you are embedding frameworks, the order of the classes in the applications NSBundle is effectively random (at this point, anyway). I'm guessing this is what you're seeing. The order of classloading with embedding does not respect classpath ordering. I just stumbled onto this exact problem yesterday with "Main" getting loaded from ERIMAdaptor when I embedded the Wonder frameworks.

You might be able to cheat with _NSUtilities.setClassForName(MySession.class, "Session"); as a stop-gap. We need to address this "officially", though and see if it's possible to change the way NSBundle stores that order.

On Oct 11, 2006, at 3:08 PM, Georg von Bülow wrote:

Hi,

I get the following strange error message when trying to run a .woa through terminal (or JavaMonitor).

/java.lang.IllegalArgumentException: <br.nist.nust.prontuario.basico.Application> Class 'Session' exists (class javax.mail.Session) but is not a subclass of WOSession.../

True, there is a Session.class in ERJavaMail, which I use as an embedded Framework. But the generated classpath looks quite normal, i.e. first appears the jar of the application (Prontuario) and later the one of the embedded frameworks:

/Generated classpath:
/Library/WebObjects/Applications/Prontuario.woa/Contents/Resources/Java/prontuario.jar
...[more stuff]
/Library/WebObjects/Applications/Prontuario.woa/Contents/Frameworks/Library/Frameworks/ERJavaMail.framework/Resources/Java/mail-1.3.jar
...[more stuff]/

My Session class is in the same package as my Application (br.nist.nust.prontuario.basico). Any idea why WOApplication looks up Session.class from the Framework? Shouldn´t it look first in the same package as my Application.class is? Should I configure this somewhere??

Now what confuses me even more, is that I have a quite similiar app which also uses ERJavaMail and runs whithout problems. I checked and compared the two apps many times but I didn´t see any obvious differences which could explain this (the other app (Acidente) has an acidente.jar and the Application.class is in the package br.nist.acidente.basico).

I´m using WO 5.3.1/Mac, and build with WOLips. Ah, and I use WONDER.

Any hint would be greatly apreciated, I´m just running out of ideas...

Thanks in advance,
Georg

--\o/ Georg von Bülow, Moleque de Idéias Educação e Tecnologia Ltda
|  Phone: 55-21-2710-0178 E-mail: [EMAIL PROTECTED]
/ \ http://www.moleque.com.br   Niterói - Rio de Janeiro - Brasil


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/georg%40moleque.com.br

This email sent to [EMAIL PROTECTED]



--
\o/ Georg von Bülow, Moleque de Idéias Educação e Tecnologia Ltda
|  Phone: 55-21-2710-0178 E-mail: [EMAIL PROTECTED]
/ \ http://www.moleque.com.br   Niterói - Rio de Janeiro - Brasil


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to