glassfish
  1. glassfish
  2. GLASSFISH-18729

set VMARGS=-version cause appclient to fail

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.0_b34
    • Fix Version/s: None
    • Component/s: standalone_client
    • Labels:
      None
    • Environment:

      Windows 7

      Description

      If VMARGS=-version is set, appclient fails with "Error occurred during initialization of VM". It is difficult for a user to find the cause of the problem.

      C:\eclipsews\glassfishfeedback\4801\bin>set VMARGS=-version

      C:\eclipsews\glassfishfeedback\4801\bin>appclient -client .\client\warehouseClient.jar
      Error occurred during initialization of VM
      java.lang.Error: java.lang.ClassNotFoundException: org.glassfish.appclient.client.acc.agent.ACCAgent
      ClassLoader
      at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1356)
      at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1319)
      Caused by: java.lang.ClassNotFoundException: org.glassfish.appclient.client.acc.agent.ACCAgentClassL
      oader
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at java.lang.SystemClassLoaderAction.run(ClassLoader.java:2071)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1344)
      at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1319)

        Activity

        Hide
        Tim Quinn added a comment -

        While I agree that this is a bug, it seems very minor to me and I have changed the priority accordingly.

        The appclient command attempts to emulate the java command as much as possible. In doing so, it passes any non-ACC-specific options through to the java command it generates to actually launch the app client container. The -version option is not an ACC-specific option, as indicated in the documentation and the appclient help and usage output. So this option is passed on to the generated java command.

        The help for the java command states that the -version option will display the version and then exit the JVM, without running the program.

        Although the way the appclient script behaves now with -version is certainly not good, most users will have no reason to try this.

        We might fix this at some point but it is a very low frequency problem and there is an easy workaround - don't specify the -version option!

        Show
        Tim Quinn added a comment - While I agree that this is a bug, it seems very minor to me and I have changed the priority accordingly. The appclient command attempts to emulate the java command as much as possible. In doing so, it passes any non-ACC-specific options through to the java command it generates to actually launch the app client container. The -version option is not an ACC-specific option, as indicated in the documentation and the appclient help and usage output. So this option is passed on to the generated java command. The help for the java command states that the -version option will display the version and then exit the JVM , without running the program. Although the way the appclient script behaves now with -version is certainly not good, most users will have no reason to try this. We might fix this at some point but it is a very low frequency problem and there is an easy workaround - don't specify the -version option!

          People

          • Assignee:
            Tim Quinn
            Reporter:
            tak09
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: