• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WO doesn´t find correct "Session" class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WO doesn´t find correct "Session" class


  • Subject: Re: WO doesn´t find correct "Session" class
  • From: Georg von Bülow <email@hidden>
  • Date: Wed, 11 Oct 2006 17:37:39 -0300

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@hidden
/ \ 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 (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



--
\o/ Georg von Bülow, Moleque de Idéias Educação e Tecnologia Ltda
|  Phone: 55-21-2710-0178 E-mail: email@hidden
/ \ 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 (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: WO doesn´t find correct "Session" class
      • From: Chuck Hill <email@hidden>
References: 
 >WO doesn´t find correct "Session" class (From: Georg von Bülow <email@hidden>)
 >Re: WO doesn´t find correct "Session" class (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Detecting eo changes when they happen
  • Next by Date: Re: WO doesn´t find correct "Session" class
  • Previous by thread: Re: WO doesn´t find correct "Session" class
  • Next by thread: Re: WO doesn´t find correct "Session" class
  • Index(es):
    • Date
    • Thread