On 25 feb 2008, at 14:00, Aurélien Minet wrote:

Hi,

I am trying to deploy an app. The program runs nicely in Eclipse, so do an ant intall from the contextual menu. However, starting from JavaMonitor or from the Commandline does not start the app:

mainserver:/Library/WebObjects/Applications/immix2.woa root# java -version mainserver:/Library/WebObjects/Applications/immix2.woa root# ./ immix2

That won't work. You need to pass all the options from JavaMonitor. See the box titled "With the current settings, this instance will be started with the following arguments:". I ditch - NSProjectSearchPath () so as to avoid having to escape it.

Arguments you add in JavaMonitor could be passed directly in command line and you may add the ones that are added by JavaMonitor / WOTaskd : WOPort WOApplicationName ....

For testing purpose I generaly try ./MyApp -WOPort 1999 in the same enviroment the WOTaskd is running just to see if the application starts (used especialy to get Class not found exception). But right now your problem seams to be shell only related. The file immix2 is just a script file, look a the end, you will find eval exec ... in your case it tries to run '${jvm} -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory="/System" -DWOLocalRootDirectory="" - DWOUserDirectory="/Library/WebObjects/Applications/immix2.woa" - DWOEnvClassPath="" -DWOApplicationClass=Application - DWOPlatform=MacOS -Dcom.webobjects.pid=9871 -classpath WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap' as the output shows.

The problem is around "${jvm} -XX:NewSize=2m " , the var ${jvm} is maybe empty or not set (as your printenv shows), so after the evaluation the command 'exec' receive "-XX:NewSize" in arguments and it doesn't understand -X (normal behavior). So you have to look why JAVA_EXECUTABLE is set to ${jvm} and why $ {jvm} is not set... Normaly JAVA_EXECUTABLE takes the value of $ {JVM_EXECUTABLE} which is initialized at 'java' if it's not set in the environment.

Regards

Aurelien

ps: applications starting shell scripts may have changed in 5.4 (I don't know), my explanation is based on 5.3
ps2: post immix2 file if the problem remains.


The problem appears in the MacOSClasspath.txt and the MacOSXServerClasspath.txt. Inside was the line with ${jvm} instead of java. I discovered that the line was important after I rebooted in 10.4.x, got a whole slew of updates, rebooted, downloaded the last WOLips and then happened to get exactly the same error if I constructed a WonderD2W application. A normal Wonder App would not have this ${jvm} but a plain java on the first line. Replacing if with java solved the problem. I don't know where this comes from, or how this is constructed.

I must say it is one of the most bizarre errors I have found : a commented line that causes trouble. Make me remind of the version of bind where tabs have to be tabs and spaces had to be spaces and good luck to you all...

wrong file:

******************
# JVM              == ${jvm}
# JVMOptions       ==
# JDB              == jdb
# JDBOptions       ==
# ApplicationClass == Application

APPROOT/Resources/Java/
APPROOT/Resources/Java/immixeditor.jar

LOCALROOT/Library/Frameworks/ERAttachment.framework/Resources/Java/ ERAttachment.jar LOCALROOT/Library/Frameworks/ERDirectToWeb.framework/Resources/Java/ ERDirectToWeb.jar LOCALROOT/Library/Frameworks/ERExtensions.framework/Resources/Java/ ERExtensions.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ERJars.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ erxservletadaptor.jar LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ icu4j-3_8_1.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/junit.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ log4j-1.2.14.jar LOCALROOT/Library/Frameworks/ERNeutralLook.framework/Resources/Java/ ERNeutralLook.jar LOCALROOT/Library/Frameworks/ERPrototypes.framework/Resources/Java/ ERPrototypes.jar LOCALROOT/Library/Frameworks/ImmixBL.framework/Resources/Java/ immixbl.jar LOCALROOT/Library/Frameworks/JavaWOExtensions.framework/Resources/Java/ JavaWOExtensions.jar LOCALROOT/Library/Frameworks/PostgresqlPlugIn.framework/Resources/Java/ PostgresqlPlugIn.jar WOROOT/Library/Frameworks/JavaDirectToWeb.framework/Resources/Java/ javadirecttoweb.jar WOROOT/Library/Frameworks/JavaDTWGeneration.framework/Resources/Java/ javadtwgeneration.jar WOROOT/Library/Frameworks/JavaEOAccess.framework/Resources/Java/ javaeoaccess.jar WOROOT/Library/Frameworks/JavaEOControl.framework/Resources/Java/ javaeocontrol.jar WOROOT/Library/Frameworks/JavaEOProject.framework/Resources/Java/ javaeoproject.jar WOROOT/Library/Frameworks/JavaFoundation.framework/Resources/Java/ javafoundation.jar WOROOT/Library/Frameworks/JavaJDBCAdaptor.framework/Resources/Java/ javajdbcadaptor.jar WOROOT/Library/Frameworks/JavaWebObjects.framework/Resources/Java/ javawebobjects.jar
WOROOT/Library/Frameworks/JavaXML.framework/Resources/Java/javaxml.jar
************************
correct file:
******************
# JVM              == java
# JVMOptions       ==
# JDB              == jdb
# JDBOptions       ==
# ApplicationClass == Application

APPROOT/Resources/Java/
APPROOT/Resources/Java/immixeditor.jar

LOCALROOT/Library/Frameworks/ERAttachment.framework/Resources/Java/ ERAttachment.jar LOCALROOT/Library/Frameworks/ERDirectToWeb.framework/Resources/Java/ ERDirectToWeb.jar LOCALROOT/Library/Frameworks/ERExtensions.framework/Resources/Java/ ERExtensions.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ERJars.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ erxservletadaptor.jar LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ icu4j-3_8_1.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/junit.jar
LOCALROOT/Library/Frameworks/ERJars.framework/Resources/Java/ log4j-1.2.14.jar LOCALROOT/Library/Frameworks/ERNeutralLook.framework/Resources/Java/ ERNeutralLook.jar LOCALROOT/Library/Frameworks/ERPrototypes.framework/Resources/Java/ ERPrototypes.jar LOCALROOT/Library/Frameworks/ImmixBL.framework/Resources/Java/ immixbl.jar LOCALROOT/Library/Frameworks/JavaWOExtensions.framework/Resources/Java/ JavaWOExtensions.jar LOCALROOT/Library/Frameworks/PostgresqlPlugIn.framework/Resources/Java/ PostgresqlPlugIn.jar WOROOT/Library/Frameworks/JavaDirectToWeb.framework/Resources/Java/ javadirecttoweb.jar WOROOT/Library/Frameworks/JavaDTWGeneration.framework/Resources/Java/ javadtwgeneration.jar WOROOT/Library/Frameworks/JavaEOAccess.framework/Resources/Java/ javaeoaccess.jar WOROOT/Library/Frameworks/JavaEOControl.framework/Resources/Java/ javaeocontrol.jar WOROOT/Library/Frameworks/JavaEOProject.framework/Resources/Java/ javaeoproject.jar WOROOT/Library/Frameworks/JavaFoundation.framework/Resources/Java/ javafoundation.jar WOROOT/Library/Frameworks/JavaJDBCAdaptor.framework/Resources/Java/ javajdbcadaptor.jar WOROOT/Library/Frameworks/JavaWebObjects.framework/Resources/Java/ javawebobjects.jar
WOROOT/Library/Frameworks/JavaXML.framework/Resources/Java/javaxml.jar
************************
Regards,

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6273852


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list      (Webobjects-deploy@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to