Apple Enterprise - NeXTanswers Support Archive

Search NeXTanswers for:

NT to Unix Porting Problems

Creation Date:
June 22, 1998
Solaris, NT, WebObjects, OPENSTEP

Q: My custom EOF subclasses work fine on Windows NT, but when I compile on Solaris I get run-time failures.

A: When writing a subclass of CustomObject under WebObjects 3.5.1, you should be sure that your class defines a constructor that takes the following three arguments:

EditingContext ec, ClassDescription cd, GlobalID id

If this constructor is missing, the application will still run on Windows NT, but will fail on Solaris systems with the WebObjects Java patch installed. The easiest way to implement this method is simply to call the superclass:

public MyCustomEOClass (EditingContext ec, ClassDescription cd,
GlobalID id) {
super (ec,cd,id);

To save time, you can modify the EOModeler Java Template to always create this constructor.

I have an application that compiles and runs correctly on Windows NT. I've ported it to Solaris and it compiles correctly, but when I run it I get the error message:

Cannot find class or component named <MyCustomScriptedComponent> in runtime or in a loadable bundle.

Why does this error occur on one platform but not the other?

A: Carefully check the capitalization of your component when it is defined and called. This problem can occur when porting a WebObjects or OPENSTEP application from Solaris to Windows NT as a side effect of the fact that Solaris is case sensitive, while Windows NT is not. Thus, if a component called "MySuperGreatObject" is called in your application as "MySupergreatObject", it will compile and run correctly on Windows NT. On Solaris, however, you will get a run-time error. Since Mach and HP-UX are also case-sensitive, improper capitalization may cause run-time or link-time errors on those platforms as well.

OpenStep | Alliances | Training | Tech Support | Where to Buy