• 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: Class 'Session' exists but is not a subclass of WOSession?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class 'Session' exists but is not a subclass of WOSession?


  • Subject: Re: Class 'Session' exists but is not a subclass of WOSession?
  • From: David LeBer <email@hidden>
  • Date: Wed, 12 Mar 2008 08:21:54 -0400


On 12-Mar-08, at 7:51 AM, David Avendasora wrote:

This bug does not yet seem to be fixed in WO 5.4.1. Does anyone know the Radar number so I can add to it?

I'm getting it on a new project using the WOApplication template, but not every time I run it. The first few times it ran fine, but then it started failing on both the Main component not extending WOComponent and Session not extending WOSession.

The fix below works for Session, but it is still grabbing the wrong Main class (org.apache.log4j.chainsaw.Main) even after I moved it from Components to the same package as Application.

Any ideas?

This is not really a fix, just a brute force hack.

If you are using Wonder this will get things working again:

ERXPatcher.setClassForName(com.codeferous.nameone.ui.Main.class, "Main");


;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org

On Jan 3, 2008, at 3:25 PM, Aaron Thompson wrote:

Thanks, that did the trick!

Aaron Thompson

On Jan 3, 2008, at 2:00 PM, Chuck Hill wrote:


On Jan 2, 2008, at 10:17 PM, Aaron Thompson wrote:

Hi, I'm building a webapp from the WOnderApplication project template, but I'm getting a rather confusing error when I try to debug. This is with WO 5.4, OS X 10.5, and WOLips/WOnder nightly. Here's the error:

NSLog - <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
java.lang.IllegalArgumentException: <org.myapp.Application> Class 'Session' exists (interface org.apache.axis.session.Session) but is not a subclass of WOSession.
[2008-1-3 6:1:7 CST] <WorkerThread0> java.lang.IllegalArgumentException: <org.myapp.Application> Class 'Session' exists (interface org.apache.axis.session.Session) but is not a subclass of WOSession.
at com .webobjects .appserver.WOApplication._sessionClass(WOApplication.java:1925)
at com .webobjects .appserver .WOApplication.createSessionForRequest(WOApplication.java:1964)
at er .extensions .ERXApplication.createSessionForRequest(ERXApplication.java:1555)
at com .webobjects .appserver .WOApplication._initializeSessionInContext(WOApplication.java:2101)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java: 319)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369)
at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:442)
at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1678)
at er.extensions.ERXApplication.dispatchRequest(ERXApplication.java: 1322)
at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:613)


I feel like it's some sort of classpath issue, but I couldn't find any org.apache.axis.session.Session imports or anything, and both my Application and Session classes don't have any funny code in them. Any ideas?


I am pretty this is the result of bugs in NSBundle. I think they should be fixed when 5.4.1 is released. Someone posted a hack recently. I think it was adding this to Application:

protected Class _sessionClass()
{
	return your.own.Session.class;
}

Chuck




_______________________________________________
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: Class 'Session' exists but is not a subclass of WOSession?
      • From: "Mr. Pierre Frisch" <email@hidden>
References: 
 >Re: Class 'Session' exists but is not a subclass of WOSession? (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: Proble with tutorial
  • Next by Date: Re: Proble with tutorial
  • Previous by thread: Re: Class 'Session' exists but is not a subclass of WOSession?
  • Next by thread: Re: Class 'Session' exists but is not a subclass of WOSession?
  • Index(es):
    • Date
    • Thread