#67 genConfig.sh fails with parse error

All
closed-fixed
nobody
None
5
2013-12-20
2012-08-08
Sam
No

This commandline:
----
# cat /proc/17740/cmdline
/opt/jdk/bin/java-Dcom.sun.management.jmxremote.port=9875-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.login.config=virgo-kernel-Dcom.sun.management.jmxremote.access.file=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/org.eclipse.virgo.kernel.jmxremote.access.properties-Djavax.net.ssl.keyStore=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/keystore-Djavax.net.ssl.keyStorePassword=changeit-Dcom.sun.management.jmxremote.ssl=true-Dcom.sun.management.jmxremote.ssl.need.client.auth=false-XX:+HeapDumpOnOutOfMemoryError-XX:ErrorFile=/opt/virgo-tomcat-server-3.5.0.RELEASE/serviceability/error.log-XX:HeapDumpPath=/opt/virgo-tomcat-server-3.5.0.RELEASE/serviceability/heap_dump.hprof-Djava.security.auth.login.config=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/org.eclipse.virgo.kernel.authentication.config-Dorg.eclipse.virgo.kernel.authentication.file=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/org.eclipse.virgo.kernel.users.properties-Djava.io.tmpdir=/opt/virgo-tomcat-server-3.5.0.RELEASE/work/tmp-Dorg.eclipse.virgo.kernel.home=/opt/virgo-tomcat-server-3.5.0.RELEASE-Dorg.eclipse.virgo.kernel.config=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration-Dosgi.java.profile=file:/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/java6-server.profile-Declipse.ignoreApp=true-Dosgi.install.area=/opt/virgo-tomcat-server-3.5.0.RELEASE-Dosgi.configuration.area=/opt/virgo-tomcat-server-3.5.0.RELEASE/work-Dssh.server.keystore=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/hostkey.ser-Dosgi.frameworkClassPath=,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.annotation_1.1.0.v201108011116.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.transaction_1.1.1.v201105210645.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.osgi_3.8.0.v20120508-2119.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.kernel.authentication_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.kernel.shutdown_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.console_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.extensions.equinox_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.launcher_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/plugins/org.eclipse.osgi_3.8.0.v20120508-2119.jar-classpath:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.annotation_1.1.0.v201108011116.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.transaction_1.1.1.v201105210645.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.osgi_3.8.0.v20120508-2119.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.kernel.authentication_3.5.0.RELEASE.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.kernel.shutdown_3.5.0.RELEASE.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.console_3.5.0.RELEASE.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.extensions.equinox_3.5.0.RELEASE.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.launcher_3.5.0.RELEASE.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/plugins/org.eclipse.osgi_3.8.0.v20120508-2119.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/plugins/org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jarorg.eclipse.equinox.launcher.Main-noExit
----
causes genconfig.sh to fail with the following output:
----
# ./genConfig.sh 17740
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.13) (6b18-1.8.13-0+squeeze2)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
YAJSW: yajsw-stable-11.02
OS : Linux/2.6.32-5-amd64/amd64
JVM : Sun Microsystems Inc./1.6.0_18
Aug 8, 2012 6:24:11 PM org.apache.commons.vfs2.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
************* GENERATING YAJSW CONFIGURATION FOR PID 17740 ***********************

process command line:
/opt/jdk/bin/java -Dcom.sun.management.jmxremote.port=9875 -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.login.config=virgo-kernel -Dcom.sun.management.jmxremote.access.file=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/org.eclipse.virgo.kernel.jmxremote.access.properties -Djavax.net.ssl.keyStore=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/keystore -Djavax.net.ssl.keyStorePassword=changeit -Dcom.sun.management.jmxremote.ssl=true -Dcom.sun.management.jmxremote.ssl.need.client.auth=false -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=/opt/virgo-tomcat-server-3.5.0.RELEASE/serviceability/error.log -XX:HeapDumpPath=/opt/virgo-tomcat-server-3.5.0.RELEASE/serviceability/heap_dump.hprof -Djava.security.auth.login.config=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/org.eclipse.virgo.kernel.authentication.config -Dorg.eclipse.virgo.kernel.authentication.file=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/org.eclipse.virgo.kernel.users.properties -Djava.io.tmpdir=/opt/virgo-tomcat-server-3.5.0.RELEASE/work/tmp -Dorg.eclipse.virgo.kernel.home=/opt/virgo-tomcat-server-3.5.0.RELEASE -Dorg.eclipse.virgo.kernel.config=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration -Dosgi.java.profile=file:/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/java6-server.profile -Declipse.ignoreApp=true -Dosgi.install.area=/opt/virgo-tomcat-server-3.5.0.RELEASE -Dosgi.configuration.area=/opt/virgo-tomcat-server-3.5.0.RELEASE/work -Dssh.server.keystore=/opt/virgo-tomcat-server-3.5.0.RELEASE/configuration/hostkey.ser -Dosgi.frameworkClassPath=,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.annotation_1.1.0.v201108011116.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.transaction_1.1.1.v201105210645.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.osgi_3.8.0.v20120508-2119.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.kernel.authentication_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.kernel.shutdown_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.console_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.extensions.equinox_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.osgi.launcher_3.5.0.RELEASE.jar,file:/opt/virgo-tomcat-server-3.5.0.RELEASE/plugins/org.eclipse.osgi_3.8.0.v20120508-2119.jar -classpath :/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.annotation_1.1.0.v201108011116.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/javax.transaction_1.1.1.v201105210645.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.osgi_3.8.0.v20120508-2119.jar:/opt/virgo-tomcat-server-3.5.0.RELEASE/lib/org.eclipse.virgo.kernel.authentication_3.5.0.RELEASE.jar:/opt/virgo-tomcat-server-3.5.0

creating java configuration file
java.lang.RuntimeException: error parsing java command line
at org.rzo.yajsw.tools.JCLParser.parseInternal(JCLParser.java:203)
at org.rzo.yajsw.tools.JCLParser.<init>(JCLParser.java:22)
at org.rzo.yajsw.tools.JCLParser.parse(JCLParser.java:28)
at org.rzo.yajsw.tools.ConfigGenerator.createJavaConfigFile(ConfigGenerator.java:143)
at org.rzo.yajsw.tools.ConfigGenerator.createConfigFile(ConfigGenerator.java:84)
at org.rzo.yajsw.tools.ConfigGenerator.generate(ConfigGenerator.java:38)
at org.rzo.yajsw.WrapperExe.doGenerate(WrapperExe.java:587)
at org.rzo.yajsw.WrapperExe.executeCommand(WrapperExe.java:232)
at org.rzo.yajsw.WrapperExe.main(WrapperExe.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.rzo.yajsw.boot.WrapperExeBooter.main(WrapperExeBooter.java:43)
-----------------
Output file: /opt/yajsw/yajsw-stable-11.02/bin/../conf/wrapper.conf
-----------------
NOTE: check/edit the following properties in the config file!

wrapper.app.account, wrapper.app.password: either set the password or remove the account
wrapper.java.command
wrapper.working.dir
wrapper.ntservice.name, wrapper.ntservice.displayname, wrapper.ntservice.description
-----------------
----
I am not sure if this causes the error, but the commandline displayed by genconfig is truncated.

Regards,
Sam

Discussion

  • Sam
    Sam
    2012-08-08

    Hmm it seems pasting the output here removes some spaces... just to be clear:

    # cat /proc/17740/cmdline | wc
    0 1 3660

     
  • Sam
    Sam
    2012-08-13

    With 11.03 the commandline that yajsw uses seems to show some weird doubling:
    ------
    echo [cmdline] | wc
    1 42 6145

    cat /proc/20210/cmdline | wc
    0 1 3660
    ------

    Looking more closely at the commandline yajsw seems to be seing it is not just simply doubled: The first part contains the full string as displayed in /proc/.../cmdline, but then a substring of the original cmdline is appended, starting somewhere in the first third of the string, and ending somewhere in the last third. At first glance, it is not obvious to me at all why that specific substring seems to be appended to the commandline.

    Also, genConfig.sh now completes without displaying an error. However the generated configuration contains garbage, namely doubled parameters, and a classpath parameter with an ending containing a large amount of repetitions of the sequence "\u0000". This classpath parameter is exactly the parameter at which the incomplete substring appended to the command line string in yajsw ends.

     
  • rzo
    rzo
    2012-08-13

    thanks for the feedback.
    i suppose i will have to go back to the drawing board.

     
  • Sam
    Sam
    2012-08-20

    Hi

    genconfig.sh runs succesfully now, also bug 3542542 seems to be fixed with this build :)

    Cheers,
    Sam

     
  • rzo
    rzo
    2013-12-20

    • status: open --> closed-fixed
    • Group: --> All