WebObjects & WOnder Examples

I have tried some examples today, but a lot won’t work. Damn.

Movies

This example you can find on ~/WODevelopment/WonderSource/Examples/Misc/Movies. After the import of the project into Eclipse I started it as WOApplication. Choose the class er.movies.Application as start point. The console window displays an exception:

java.lang.NoClassDefFoundError: er/corebusinesslogic/ERCoreUserInterface

Seems to be simple, add a WebObjects library to the build path of the project: ERCoreBusinessLogic. Restart the application. The next exception:

java.lang.ClassNotFoundException: er.directtoweb.ERDirectToWeb

Now add the library ERDirectToWeb to the project. Restart the application. Repeat that x times, or simply add the following libraries to the project too:


ERJavaMail
JavaDirectToWeb
JavaEOProject
JavaDTWGeneration

Now, the application starts. But there is a warning:

Your application is not running on a supported development platform. AutoLaunch will not work.

This means, you have to copy the visible URL into a browser’s address line to see the example. Very annoying. Google provides a solution:

public boolean _isSupportedDevelopmentPlatform() {
	boolean result = super._isSupportedDevelopmentPlatform();
	if (!result) {
		result = System.getProperty("os.name").equals("Linux");
	}
	return result;
}

The warning will be replaced with another warning (WTF?):

Unable to locate /usr/bin/open on your computer, AutoOpen launch will not work

Seems that Ant will open a browser by calling the statement above. Try to symlink Firefox:

# su -
# ln -s /usr/bin/firefox /usr/bin/open
# exit

Restart the application and (surprise, surprise!) the Firefox displays the Movies application!

Leave a Reply