[SOLVED.kinda] Re: Upgrading to Latest Wonder + DirectAction NoClassDefFoundError
[SOLVED.kinda] Re: Upgrading to Latest Wonder + DirectAction NoClassDefFoundError
- Subject: [SOLVED.kinda] Re: Upgrading to Latest Wonder + DirectAction NoClassDefFoundError
- From: George Domurot <email@hidden>
- Date: Thu, 30 Jun 2011 06:30:55 -0700
After sleeping on this, and attempting to hunt down other possible fixes,
I editing ERXApplication.dispatchRequestImmediately(WORequest request), adding a catch:
catch(NoClassDefFoundError noClassDefFoundError) {
return handleActionRequestError(request, null, "You're requesting a class or action that is either not avilable or incorectly cased", null, null, null, null, null);
}
While this does *fix* the error, is there something else that should actually be done?
It doesn't feel right to edit ERXApplication.
(I'd love to hear from the Wonder gods officially.)
-G
On Jun 29, 2011, at 10:16 PM, George Domurot wrote:
> I upgraded to the latest Wonder Git repo this past weekend. And, an interesting situation occurs when hitting a URL that has a typo in the action class or method names.
>
> For example:
>
> .../wa/person ... attempts to load a model Person object, results in NoClassDefFoundError
>
> triggered at this point:
>
> at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
> at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
>
> However,
>
> .../wa/Person ... is ignored as expected, since I suppose it finds the Person class and opts to ignore it since it's of no use/wrong type.
>
> The same error occurs if you attempt to load:
>
> ../wa/directAction/doSomething ... since DirectAction exists
>
> Jun 29 22:01:54 App[57419] WARN NSLog - <WOWorkerThread id=3 socket=null> Throwable occurred: java.lang.NoClassDefFoundError: com/domain/app/directAction (wrong name: com/domain/app/DirectAction)
> [2011-6-29 22:1:54 PDT] <WorkerThread3> java.lang.NoClassDefFoundError: com/domain/app/directAction (wrong name: com/domain/app/DirectAction)
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> 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 java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
> at com.webobjects.foundation._NSUtilities._searchForClassInPackages(_NSUtilities.java:415)
> at com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:373)
> at com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:335)
> at com.webobjects.appserver._private.WOBundle.lookForClassInAllBundles(WOBundle.java:92)
> at com.webobjects.appserver._private.WOActionRequestHandler._actionClassForName(WOActionRequestHandler.java:70)
> at com.webobjects.appserver._private.WOActionRequestHandler.getRequestActionClassAndNameForPath(WOActionRequestHandler.java:389)
> at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest(WOActionRequestHandler.java:226)
> 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)
>
> Interesting too, none of the standard Application level exception handling methods get called for a graceful response.
>
> I noticed a related post by Pascal last year without a noted solution:
> http://wiki.objectstyle.org/confluence/display/WOL/mail/6717622
>
> Any known fixes?
>
> Thanks,
> George _______________________________________________
> 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