IBM Support

PK45126: STOPSERVER ANT API CASED JAVA CLASS IS NOT FOUND

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Here is my test result.
    
    Sample test script:-
    --------------------
    <project name="MyProject" default="all">
            <description>Stop/Start Server</description>
            <property name="wasHome"  location="C:/Program
    Files/IBM/WAS61/WebSphere/AppServer"/>
            <taskdef name="wsStopServer"
    classname="com.ibm.websphere.ant.tasks.StopServer"
    classpath="C:/Program
    Files/IBM/WAS61/WebSphere/AppServer/plugins/com.ibm.ws.runtime_6
    .1.0.jar
    "/>
            <taskdef name="wsStartServer"
    classname="com.ibm.websphere.ant.tasks.StartServer"
    classpath="C:/Program
    Files/IBM/WAS61/WebSphere/AppServer/plugins/com.ibm.ws.runtime_6
    .1.0.jar
    "/>
    <target name="stopserver1">
          <echo message="Stopping Server1...."/>
              <wsStopServer server="server1" username="wasadmin"
    password="wasadmin"/>
    </target>
    <target name="startserver1">
          <echo message="Starting Server1...."/>
              <wsStartServer server="server1"/>
    </target>
    </project>
    
    Output: error:
    --------------
    
    C:\Program Files\IBM\WAS61\WebSphere\AppServer\bin>ws_ant.bat -f
    C:\L2_Test\stop-start.xml stopserver1
    Buildfile: C:\L2_Test\stop-start.xml
    
    stopserver1:
         [echo] Stopping Server1....
    [stopServer] The java class is not found:
    Files\IBM\WAS61\WebSphere\AppServer\profiles\Dmgr01\configuratio
    n
    -Dcom.ibm.SSL.ConfigURL=file:C:\Program
    [stopServer] Java Result: 1
    
    The problem is not with the spaces in the directory but rather
    with this variable defined in the profiles setupCmdLine.bat
    file:
    
    SET OSGI_INSTALL=-Dosgi.install.area="%WAS_HOME%"
    
    with this is translated into an actual value the argument looks
    something like this:
    
    "C:\Program
    Files\IBM\WAS61\WebSphere\AppServer\java\jre\bin\java.exe"
    "-Dosgi.install.area=C:\Program
    Files\IBM\WAS61\WebSphere\AppServer\" [etc]
    
    The problem is the \" at the end of the string - this causes the
    functionality that parses the JVM arguments to fail.
    -D arguments would look like this:
    
    "C:\Program
    Files\IBM\WAS61\WebSphere\AppServer\java\jre\bin\java.exe"
    "-Dosgi.install.area=C:/Program
    Files/IBM/WAS61/WebSphere/AppServer/" [etc]
    
    when any of the Ant tasks are run via ws_ant.
    

Local fix

  • Possible workaround would be shorter the path, or remove the
    slash.
    
    1) Removing the trailing slash
    2) switch the slashes to forward slashes
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All users of IBM WebSphere Application       *
    *                 Server version 6.1 ws_ant on the Microsoft   *
    *                 Windows operating system.                    *
    ****************************************************************
    * PROBLEM DESCRIPTION: When using ws_ant to run an Ant file    *
    *                      the Java Virtual Machine (JVM) may fail *
    *                                                              *
    *                      to launch stating that it cannot find   *
    *                      a class file that looks like a          *
    *                      directory name.                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When using ws_ant to run an Ant file the JVM may fail with an
    error similar to:
    
    [echo] Stopping Server1....
    [stopServer] The java class is not found:
    Files\IBM\WAS61\WebSphere\AppServer\profiles\Dmgr01\
    configuration
    -Dcom.ibm.SSL.ConfigURL=file:C:\Program
    [stopServer] Java Result: 1
    
    A few of the JVM system properties that are constructed for
    the underlying launch are directories that end with a
    backwards slash.  If the system property contains a space then
    Ant will automatically put quotes around the system property;
    However, if the value of the system property ends with a
    backward slash, resulting in a system property like
    "-Darg=C:\sample directory\", then the JVM will not be able to
    process the system property.
    

Problem conclusion

  • The fix for this APAR is to ensure that, on Microsoft Windows,
    the system properties use a forward slash for JVM System
    Properties that contain a directory as the value.
    
    The fix for this APAR is currently targeted for inclusion in
    WebSphere Application Server fixpack 6.1.0.11.
    Please refer to the Recommended Updates page for delivery
    information:
    http://www.ibm.com/support/docview.wss?uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK45126

  • Reported component name

    WEBSPH APP SERV

  • Reported component ID

    5724J0800

  • Reported release

    61W

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2007-05-14

  • Closed date

    2007-05-14

  • Last modified date

    2007-05-14

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Modules/Macros

  • ANTTASKS
    

Fix information

  • Fixed component name

    WEBSPH APP SERV

  • Fixed component ID

    5724J0800

Applicable component levels

  • R61A PSY

       UP

  • R61H PSY

       UP

  • R61I PSY

       UP

  • R61P PSY

       UP

  • R61S PSY

       UP

  • R61W PSY

       UP

  • R61Z PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 December 2021