Can't start Servoy Server on Mac OS X Server

I get the following Java exception with trying to start the Application Server (sudo ./servoy_server.sh):

Loading servoy.properties from /Applications/Servoy/servoy.properties
Loading - Done
Using RMI registry on port 1099
Exception during startup processing
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.servoy.j2db.server.b.if(Unknown Source)
        at com.servoy.j2db.server.ApplicationServer.startWebServer(Unknown Sour
        at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletResponse
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:1
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
[...]
        ... 7 more

I am running Servoy 2.2.3 release on Mac OS X Server 10.4.3.

There is a small chance this issue may be related to the other issue I posted today, where port 8080 is already in use on the machine.

It seems the library servlet.jar is not in your class path (=lib dir)…how do you start the server?

From /Applications/Servoy :

sudo ./servoy_server.sh

Does it also error if you don’t sudo? Personaly I also don’t think it is a good idea to run applications as root user.

Yes, I get an error with the same stack trace without running it as sudo.

I don’t think it’s generally a good idea to run programs as root, either, but I wanted to eliminate permissions as a source of trouble.

Allright, I’m pleading now - I absolutely cannot get Servoy Server to start on Mac OS X Server 10.4.4!

Is anyone else running Servoy Server on Mac OS X Server? Is this supported?

I have copied onto our server the entire folder of a working Servoy installation from my machine, running Mac OS X 10.4.4 (not server), where Servoy Server will startup without incident from the command line (./servoy_server.sh) or in Developer (with “Start data and HTTP services…” checked). Once copied to the server, neither method will startup Servoy Server. I get a java.lang.NoClassDefFoundError: javax/servlet/ServletResponse on the command line, no matter what I try. So, to me, it is obviously a configuration issue with our server. And yes, servlet.jar is clearly in the Servoy/lib folder.

There is an installation of Tomcat that comes with Mac OS X Server. It is not running, but I have no problem getting it to startup if necessary. Perhaps I could copy the Servoy Server files into the built-in Tomcat’s webapps/ROOT directory and run it from there? I have no idea what jar’s from the lib directory to copy, however.

But also, perhaps the built-in Tomcat is what’s causing Servoy Server to fail? I mean anything it would change in the Java installation, of course; it’s never running when I try to start Servoy Server, and I’ve set Servoy to use a different port.

Again, any help anyone can provide would be much appreciated - particularly feedback from anyone running on Mac OS X Server. I am out of ideas here, our client licenses are going to waste, and the boss is pushing for access to the solution already…

amisle:
Allright, I’m pleading now - I absolutely cannot get Servoy Server to start on Mac OS X Server 10.4.4!

Is anyone else running Servoy Server on Mac OS X Server? Is this supported?

I have copied onto our server the entire folder of a working Servoy installation from my machine, running Mac OS X 10.4.4 (not server), where Servoy Server will startup without incident from the command line (./servoy_server.sh) or in Developer (with “Start data and HTTP services…” checked). Once copied to the server, neither method will startup Servoy Server. I get a java.lang.NoClassDefFoundError: javax/servlet/ServletResponse on the command line, no matter what I try. So, to me, it is obviously a configuration issue with our server. And yes, servlet.jar is clearly in the Servoy/lib folder.

There is an installation of Tomcat that comes with Mac OS X Server. It is not running, but I have no problem getting it to startup if necessary. Perhaps I could copy the Servoy Server files into the built-in Tomcat’s webapps/ROOT directory and run it from there? I have no idea what jar’s from the lib directory to copy, however.

But also, perhaps the built-in Tomcat is what’s causing Servoy Server to fail? I mean anything it would change in the Java installation, of course; it’s never running when I try to start Servoy Server, and I’ve set Servoy to use a different port.

Again, any help anyone can provide would be much appreciated - particularly feedback from anyone running on Mac OS X Server. I am out of ideas here, our client licenses are going to waste, and the boss is pushing for access to the solution already…

Hi, we have quite a few customers running Servoy on Mac OS X server. In fact very recently I personally installed Servoy on Server 10.4.4 without any problems. Your errors sound very strange, I think there is something wrong on OS or Java level with your system. What do you get if you type java -version in a terminal window? Can you try switching to Java 1.5 on the server?

java -version reports:

java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-232)
Java HotSpot(TM) Client VM (build 1.4.2-54, mixed mode)

This is exactly the same as on my Mac OS X client machine.

I will try switching to Java 1.5 later today. I assume I use Java Preferences.app in /Applications/Utilities/Java?

Solved. The only solution turned out to be a clean install of Mac OS X Server; I was using an upgrade installation before, and apparently something necessary wasn’t quite there. See my other post for full details.