• 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: Mike Schrag <email@hidden>
  • Date: Wed, 12 Mar 2008 11:19:26 -0400

Every time I have seen this bug it is a result of the bug I submitted for NSBundle where embedded frameworks get processed as part of the application bundle, so it's a grab-bag as to which Session you get. I don't know if that patch made it in, though.

Are you seeing this in development mode or when not embedding frameworks? I don't know that I've ever seen it in other cases ...

ms

On Mar 12, 2008, at 8:31 AM, Mr. Pierre Frisch wrote:

This bug has not been reported -:) and I missed it. I would need quite a bit more information. Could you include the Info.plist and the classpath for the culprit?

Thank you

Pierre
--
Pierre Frisch
email@hidden


On Mar 12, 2008, at 5:21, David LeBer wrote:


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

_______________________________________________ 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


  • Follow-Ups:
    • Re: Class 'Session' exists but is not a subclass of WOSession?
      • From: David Avendasora <email@hidden>
References: 
 >Re: Class 'Session' exists but is not a subclass of WOSession? (From: David Avendasora <email@hidden>)
 >Re: Class 'Session' exists but is not a subclass of WOSession? (From: David LeBer <email@hidden>)
 >Re: Class 'Session' exists but is not a subclass of WOSession? (From: "Mr. Pierre Frisch" <email@hidden>)

  • Prev by Date: Re: NSMutableArray conflict
  • Next by Date: Re: Bug of the ComponentContent UTF-8
  • 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