WebObjects 5.0: WORedirect "attempt to load the application failed" Errors

This document discusses errors that may occur when using the WORedirect class in a WebObjects 5 application, and provides a workaround.
Symptom

When using the WORedirect class in WebObjects 5 applications, "attempt to load the application failed" errors occur and the following messages appear:

java.lang.NoClassDefFoundError: com/webobjects/appserver/WORedirect
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)



Solution

The WORedirect class (com.webobjects.appserver.WORedirect) has been misplaced in the JavaWOExtensions jar file. Add the JavaWOExtensions framework to the project and recompile.

The path to the framework is:


Mac OS X
/System/Library/Frameworks/JavaWOExtensions.framework

Windows
$NEXT_ROOT/Library/Frameworks/JavaWOExtensions.framework

This issue is expected to be addressed in a future version of WebObjects.

Published Date: Feb 18, 2012