• 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: Wrong Session class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrong Session class


  • Subject: Re: Wrong Session class
  • From: Ted Archibald <email@hidden>
  • Date: Tue, 14 Feb 2012 11:21:06 -0600

I tried that as well and I got the same original error.

On Tue, Feb 14, 2012 at 8:44 AM, John Huss <email@hidden> wrote:
You could also just tell WO explicitly where your classes are.  You can do this in your Application's main method:

_NSUtilities.setClassForName(Main.class, Main.class.getSimpleName());
_NSUtilities.setClassForName(Session.class, Session.class.getSimpleName());
_NSUtilities.setClassForName(DirectAction.class, DirectAction.class.getSimpleName());

John

On Mon, Feb 13, 2012 at 9:55 PM, Chuck Hill <email@hidden> wrote:
Read carefully.  The first is for Session.java, the second is for Main.java.  Either make the default action a direction action and in defaultAction() return the fully qualified name of the Main component, or, in Application override pageForNameWithContext() (or whatever it is is called) and if the parameter is null, call it again with the fully qualified name of the Main component.

And as Mike said,  your classpath is messed up.  Wonder should prevent this. Do you have jars in /Library/Java/Extensions?


Chuck


On 2012-02-13, at 7:49 PM, Ted Archibald wrote:

> No, this is the stack trace I get:
>
> <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
> java.lang.IllegalArgumentException: <com.atl.AccountsReceivable_v1.Application> Class 'Session' exists (interface org.jabsorb.client.Session) but is not a subclass of WOSession.
> [2012-2-13 18:33:34 CST] <WorkerThread2> java.lang.IllegalArgumentException: <com.atl.AccountsReceivable_v1.Application> Class 'Session' exists (interface org.jabsorb.client.Session) but is not a subclass of WOSession.
>       at com.webobjects.appserver.WOApplication._sessionClass(WOApplication.java:1934)
>       at com.webobjects.appserver.WOApplication.createSessionForRequest(WOApplication.java:1973)
>       at er.extensions.appserver.ERXApplication.createSessionForRequest(ERXApplication.java:2276)
>       at com.webobjects.appserver.WOApplication._initializeSessionInContext(WOApplication.java:2110)
>       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:1687)
>       at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2021)
>       at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1986)
>       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:637)
>
>
> If I override _sessionClass() this is the stack trace I get:
>
> Feb 13 21:45:54 AccountsReceivable_v1.0[59088] WARN  NSLog  - <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request:
> java.lang.IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'Main' exists but is not a subclass of WOComponent.
> [2012-2-13 21:45:54 CST] <WorkerThread0> java.lang.IllegalArgumentException: <com.webobjects.appserver._private.WOComponentDefinition> Class 'Main' exists but is not a subclass of WOComponent.
>       at com.webobjects.appserver._private.WOComponentDefinition._componentClass(WOComponentDefinition.java:496)
>       at com.webobjects.appserver._private.WOComponentDefinition.componentClass(WOComponentDefinition.java:504)
>       at com.webobjects.appserver._private.WOComponentDefinition._componentInstanceInContext(WOComponentDefinition.java:510)
>       at com.webobjects.appserver._private.WOComponentDefinition.componentInstanceInContext(WOComponentDefinition.java:642)
>       at com.webobjects.appserver.WOApplication.pageWithName(WOApplication.java:2332)
>       at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:284)
>       at com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
>       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:1687)
>       at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2021)
>       at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1986)
>       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:637)
>
>
> On Mon, Feb 13, 2012 at 8:04 PM, Chuck Hill <email@hidden> wrote:
> Is the Session class name in the stack trace correct?  If it is correct, your app .jar is missing something.  If it is not correct, the _sessionClass has the wrong signature or is in the wrong class.
>
>
> Chuck
>
>
> On 2012-02-13, at 4:36 PM, Ted Archibald wrote:
>
> > I'm currently having this same issue on a project I haven't touched in months.  I haven't changed wonder, nothing changed in the class path.  There's no obvious reason what's going on, and overriding _sessionClass doesn't fix the problem, cleaning the project didn't help, restarting the computer didn't help, deleting the run configurations didn't help.
> >
> > What Profiler settings did you change?
> >
> > On Tue, Jun 7, 2011 at 7:45 AM, Jean Pierre Malrieu <email@hidden> wrote:
> > Changing compiler settings back and forth seemed to clean it up. Thanks.
> >
> > JPM
> >
> > Le 7 juin 2011 à 14:39, Mike Schrag a écrit :
> >
> >> your classpath is messed up ...
> >>
> >> On Jun 7, 2011, at 8:37 AM, Jean Pierre Malrieu wrote:
> >>
> >>>
> >>> Le 7 juin 2011 à 14:23, Mike Schrag a écrit :
> >>>
> >>>> not sure what changed in your app, but it's basically just guessing wrong on the session class .. you can override _session() in your WOApplication subclass and return the exact class you expect it to be.
> >>>
> >>> if I put the following method in my Application
> >>>
> >>>     @Override
> >>>     protected Class _sessionClass() {
> >>>             return com.educlab.iep.Session.class;
> >>>     }
> >>>
> >>> I receive the following exception:
> >>>
> >>> Application: SaisieIEP
> >>> Error: java.lang.IllegalStateException exception
> >>> Reason:
> >>> java.lang.IllegalStateException: An Exception occurred while generating the Exception page 'WOExceptionPage'. This is most likely due to an error in 'WOExceptionPage' itself or WebObjects encountered an uncaught exception while creating a Session object.
> >>>
> >>>
> >>> Below are the logs of the original Exception which occured in com.educlab.iep.Application, then the later Exception in WOExceptionPage.
> >>>
> >>> Original Exception:
> >>> java.lang.ClassNotFoundException: com.educlab.iep.Session
> >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> >>> at java.security.AccessController.doPrivileged(Native Method)
> >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> >>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> >>> at com.educlab.iep.Application._sessionClass(Application.java:122)
> >>> at com.webobjects.appserver.WOApplication.createSessionForRequest(WOApplication.java:1973)
> >>> at er.extensions.appserver.ERXApplication.createSessionForRequest(ERXApplication.java:2239)
> >>> at com.webobjects.appserver.WOApplication._initializeSessionInContext(WOApplication.java:2110)
> >>> at com.webobjects.appserver.WOContext.session(WOContext.java:369)
> >>> at com.webobjects.appserver.WOContext.componentActionURL(WOContext.java:1208)
> >>> at com.webobjects.appserver.WOContext._componentActionURL(WOContext.java:1255)
> >>> at er.extensions.components._private.ERXWOForm.appendAttributesToResponse(ERXWOForm.java:421)
> >>> at com.webobjects.appserver._private.WOHTMLDynamicElement._appendOpenTagToResponse(WOHTMLDynamicElement.java:493)
> >>> at er.extensions.components._private.ERXWOForm.appendToResponse(ERXWOForm.java:449)
> >>> at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
> >>> at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
> >>> at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
> >>> at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574)
> >>> at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543)
> >>> at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538)
> >>> at com.webobjects.appserver.WODirectAction.defaultAction(WODirectAction.java:119)
> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>> at java.lang.reflect.Method.invoke(Method.java:597)
> >>> at com.webobjects.appserver.WODirectAction.performActionNamed(WODirectAction.java:144)
> >>> at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:259)
> >>> at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
> >>> at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:124)
> >>> at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
> >>> at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
> >>> at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949)
> >>> 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:680)
> >>>
> >>>
> >>> WOExceptionPage Exception:
> >>> java.lang.NoClassDefFoundError: com/educlab/iep/Session
> >>> at com.educlab.iep.Application._sessionClass(Application.java:122)
> >>> at com.webobjects.appserver.WOApplication.createSessionForRequest(WOApplication.java:1973)
> >>> at er.extensions.appserver.ERXApplication.createSessionForRequest(ERXApplication.java:2239)
> >>> at com.webobjects.appserver.WOApplication._initializeSessionInContext(WOApplication.java:2110)
> >>> at com.webobjects.appserver.WOContext.session(WOContext.java:369)
> >>> at com.webobjects.appserver.WOContext.componentActionURL(WOContext.java:1208)
> >>> at com.webobjects.appserver._private.WOHyperlink._appendComponentActionURLToResponse(WOHyperlink.java:183)
> >>> at com.webobjects.appserver._private.WOHyperlink.appendAttributesToResponse(WOHyperlink.java:219)
> >>> at er.extensions.components._private.ERXHyperlink.appendAttributesToResponse(ERXHyperlink.java:98)
> >>> at com.webobjects.appserver._private.WOHTMLDynamicElement._appendOpenTagToResponse(WOHTMLDynamicElement.java:493)
> >>> at com.webobjects.appserver._private.WOHyperlink._appendOpenTagToResponse(WOHyperlink.java:133)
> >>> at com.webobjects.appserver._private.WOHTMLDynamicElement.appendToResponse(WOHTMLDynamicElement.java:443)
> >>> at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
> >>> at com.webobjects.appserver._private.WOConditional.appendToResponse(WOConditional.java:94)
> >>> at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
> >>> at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
> >>> at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
> >>> at com.webobjects.appserver._private.WOComponentReference.appendToResponse(WOComponentReference.java:135)
> >>> at com.webobjects.appserver._private.WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126)
> >>> at com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODynamicGroup.java:136)
> >>> at com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:1122)
> >>> at com.webobjects.appserver.WOComponent._appendPageToResponse(WOComponent.java:1574)
> >>> at com.webobjects.appserver.WOComponent._generateResponseInContext(WOComponent.java:1543)
> >>> at com.webobjects.appserver.WOComponent.generateResponse(WOComponent.java:1538)
> >>> at com.webobjects.woextensions.WOExceptionPage.generateResponse(WOExceptionPage.java:38)
> >>> at com.webobjects.appserver.WOApplication._handleError(WOApplication.java:3095)
> >>> at com.webobjects.appserver.WOApplication.handleException(WOApplication.java:3245)
> >>> at er.extensions.appserver.ERXApplication.handleException(ERXApplication.java:1768)
> >>> at er.extensions.appserver.ERXApplication.handleActionRequestError(ERXApplication.java:1701)
> >>> at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:271)
> >>> at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest(WOActionRequestHandler.java:158)
> >>> at er.extensions.appserver.ERXDirectActionRequestHandler.handleRequest(ERXDirectActionRequestHandler.java:124)
> >>> at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
> >>> at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
> >>> at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949)
> >>> 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:680)
> >>
> >
> > Tout ce que l'on apprend à un enfant, on l'empêche de l'inventer ou de le découvrir.
> > J. Piaget
> >
> >
> >
> >
> >
> >  _______________________________________________
> > 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/gvc/practical_webobjects
>
>
>
>
>
>
>
>
>

--
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/gvc/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



 _______________________________________________
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: Wrong Session class
      • From: Ted Archibald <email@hidden>
References: 
 >Re: Wrong Session class (From: Ted Archibald <email@hidden>)
 >Re: Wrong Session class (From: Ted Archibald <email@hidden>)
 >Re: Wrong Session class (From: John Huss <email@hidden>)

  • Prev by Date: Re: Wrong Session class
  • Next by Date: Re: error in deploy: ReferenceError: Can't find variable: AUP
  • Previous by thread: Re: Wrong Session class
  • Next by thread: Re: Wrong Session class
  • Index(es):
    • Date
    • Thread