glassfish
  1. glassfish
  2. GLASSFISH-18751

wsgen and wsimport do not work due to tool.jar not found error

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 4.0_b75
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      run those command will show some messages, but we couldn't find them in
      glassfish workspace:

      C:\glassfish3\glassfish\bin>wsgen
      JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually th
      is means you are running JRE, not JDK. Please use the java command in JDK 5.0 or
      later (not JRE.)

      • This command executes com.sun.tools.ws.WsGen could not find iWsGen.java in
        source code
        -------------------------------------------------

      C:\glassfish3\glassfish\bin>wsimport
      JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually th
      is means you are running JRE, not JDK. Please use the java command in JDK 5.0 or
      later (not JRE.)

      -same, could not find com.sun.tools.ws.WsImport.java
      -------------------------------------------------

      C:\glassfish3\glassfish\bin>schemagen
      JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually th
      is means you are running JRE, not JDK. Please use the java command in JDK 5.0 or
      later (not JRE.)

      -same, could not find com.sun.tools.jxc.SchemaGeneratorFacade.java

        Activity

        Hide
        Lukas Jungmann added a comment - - edited

        Is asadmin.bat working?
        if you run 'echo %PATH%' what is printed out?
        if you run 'echo %JAVA_HOME%' what is printed out?
        if you run 'where java.*' what is printed out?
        if you run 'where wsimport.*' what is printed out?

        Show
        Lukas Jungmann added a comment - - edited Is asadmin.bat working? if you run 'echo %PATH%' what is printed out? if you run 'echo %JAVA_HOME%' what is printed out? if you run 'where java.*' what is printed out? if you run 'where wsimport.*' what is printed out?
        Hide
        tak09 added a comment -

        Hi Lukas,

        asadmin is working. Please see below for the outputs.

        Microsoft Windows [Version 6.1.7601]
        Copyright (c) 2009 Microsoft Corporation. All rights reserved.

        C:\>where asadmin.bat
        C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\asadmin.bat

        C:\>asadmin start-domain
        Waiting for domain1 to start ...............................
        Successfully started the domain : domain1
        domain Location: C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\domains\domain1
        Log File: C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\domains\domain1\logs\server
        .log
        Admin Port: 4848
        Command start-domain executed successfully.

        C:\>echo %PATH%
        C:\SFWCLNT\JDBC\fjjdbc\bin;C:\Program Files\CollabNet\Subversion Client;C:\Program Files (x86)\Commo
        n Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Window
        sPowerShell\v1.0\;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\CA\SharedComponen
        ts\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\S
        ubscriptionLicense\;C:\Program Files\CA\eTrustITM;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Li
        b;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Bin;C:\Program Files (x86)\Enterprise Vault\EVClie
        nt\;C:\Program Files (x86)\Mozilla Firefox;C:\Program Files\Java\jdk1.7.0_17\bin;c:\ant\bin;C:\Progr
        am Files (x86)\Gow\bin;c:\ntutil\bin;c:\usr\bin;C:\Program Files (x86)\Hidemaru;C:\Program Files\Tor
        toiseSVN\bin;C:\SFWCLNT\ESQL\BIN;C:\Windows\ESQL\BIN;C:\SFWCM\CM\BIN;C:\glassfish\glassfish-4.0-b81-
        03_20_2013\glassfish4\glassfish\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\SeleniumIEdriver;C
        :\Program Files\TortoiseGit\bin

        C:\>echo %JAVA_HOME%
        C:\Program Files\Java\jdk1.7.0_17

        C:\>where java.*
        C:\Windows\System32\java.exe
        C:\Program Files\Java\jdk1.7.0_17\bin\java.exe

        C:\>where wsimport.*
        C:\Program Files\Java\jdk1.7.0_17\bin\wsimport.exe
        C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport
        C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport.bat

        C:\>where wsgen.*
        C:\Program Files\Java\jdk1.7.0_17\bin\wsgen.exe
        C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsgen
        C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsgen.bat

        C:\>

        Show
        tak09 added a comment - Hi Lukas, asadmin is working. Please see below for the outputs. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\>where asadmin.bat C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\asadmin.bat C:\>asadmin start-domain Waiting for domain1 to start ............................... Successfully started the domain : domain1 domain Location: C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\domains\domain1 Log File: C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\domains\domain1\logs\server .log Admin Port: 4848 Command start-domain executed successfully. C:\>echo %PATH% C:\SFWCLNT\JDBC\fjjdbc\bin;C:\Program Files\CollabNet\Subversion Client;C:\Program Files (x86)\Commo n Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Window sPowerShell\v1.0\;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\CA\SharedComponen ts\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\S ubscriptionLicense\;C:\Program Files\CA\eTrustITM;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Li b;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Bin;C:\Program Files (x86)\Enterprise Vault\EVClie nt\;C:\Program Files (x86)\Mozilla Firefox;C:\Program Files\Java\jdk1.7.0_17\bin;c:\ant\bin;C:\Progr am Files (x86)\Gow\bin;c:\ntutil\bin;c:\usr\bin;C:\Program Files (x86)\Hidemaru;C:\Program Files\Tor toiseSVN\bin;C:\SFWCLNT\ESQL\BIN;C:\Windows\ESQL\BIN;C:\SFWCM\CM\BIN;C:\glassfish\glassfish-4.0-b81- 03_20_2013\glassfish4\glassfish\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\SeleniumIEdriver;C :\Program Files\TortoiseGit\bin C:\>echo %JAVA_HOME% C:\Program Files\Java\jdk1.7.0_17 C:\>where java.* C:\Windows\System32\java.exe C:\Program Files\Java\jdk1.7.0_17\bin\java.exe C:\>where wsimport.* C:\Program Files\Java\jdk1.7.0_17\bin\wsimport.exe C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport.bat C:\>where wsgen.* C:\Program Files\Java\jdk1.7.0_17\bin\wsgen.exe C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsgen C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsgen.bat C:\>
        Hide
        Lukas Jungmann added a comment -

        Thanks!

        So it's clear that on your path there is JDK/bin first, glassfish/bin second - if you change the order, does it help?

        btw: one thing I've just noticed and cannot check it immediately - you run C:\>C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport.bat - if you do 'cd C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin' and then call wsimport - does it change anything?

        Show
        Lukas Jungmann added a comment - Thanks! So it's clear that on your path there is JDK/bin first, glassfish/bin second - if you change the order, does it help? btw: one thing I've just noticed and cannot check it immediately - you run C:\>C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport.bat - if you do 'cd C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin' and then call wsimport - does it change anything?
        Hide
        tak09 added a comment -

        I changed the order of path. It is now glassfish/bin first, then JDK/bin.

        Please see the output.

        Microsoft Windows [Version 6.1.7601]
        Copyright (c) 2009 Microsoft Corporation. All rights reserved.

        C:\>echo %PATH%
        C:\SFWCLNT\JDBC\fjjdbc\bin;C:\Program Files\CollabNet\Subversion Client;C:\Program Files (x86)\Commo
        n Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Window
        sPowerShell\v1.0\;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\CA\SharedComponen
        ts\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\S
        ubscriptionLicense\;C:\Program Files\CA\eTrustITM;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Li
        b;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Bin;C:\Program Files (x86)\Enterprise Vault\EVClie
        nt\;C:\Program Files (x86)\Mozilla Firefox;C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glas
        sfish\bin;C:\Program Files\Java\jdk1.7.0_17\bin;c:\ant\bin;C:\Program Files (x86)\Gow\bin;c:\ntutil\
        bin;c:\usr\bin;C:\Program Files (x86)\Hidemaru;C:\Program Files\TortoiseSVN\bin;C:\SFWCLNT\ESQL\BIN;
        C:\Windows\ESQL\BIN;C:\SFWCM\CM\BIN;C:\Program Files (x86)\QuickTime\QTSystem\;C:\SeleniumIEdriver;C
        :\Program Files\TortoiseGit\bin

        C:\>wsimport
        JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually this means you are run
        ning JRE, not JDK. Please use the java command in JDK 5.0 or later (not JRE.)

        C:\>C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport.bat
        JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually this means you are run
        ning JRE, not JDK. Please use the java command in JDK 5.0 or later (not JRE.)

        C:\>cd C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\

        C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin>wsimport
        JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually this means you are run
        ning JRE, not JDK. Please use the java command in JDK 5.0 or later (not JRE.)

        C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin>

        Show
        tak09 added a comment - I changed the order of path. It is now glassfish/bin first, then JDK/bin. Please see the output. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\>echo %PATH% C:\SFWCLNT\JDBC\fjjdbc\bin;C:\Program Files\CollabNet\Subversion Client;C:\Program Files (x86)\Commo n Files\NetSarang;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\Window sPowerShell\v1.0\;C:\Program Files\CA\SharedComponents\ScanEngine;C:\Program Files\CA\SharedComponen ts\CAUpdate\;C:\Program Files\CA\SharedComponents\ThirdParty\;C:\Program Files\CA\SharedComponents\S ubscriptionLicense\;C:\Program Files\CA\eTrustITM;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Li b;C:\Program Files (x86)\Borland\StarTeam SDK 9.3\Bin;C:\Program Files (x86)\Enterprise Vault\EVClie nt\;C:\Program Files (x86)\Mozilla Firefox;C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glas sfish\bin;C:\Program Files\Java\jdk1.7.0_17\bin;c:\ant\bin;C:\Program Files (x86)\Gow\bin;c:\ntutil\ bin;c:\usr\bin;C:\Program Files (x86)\Hidemaru;C:\Program Files\TortoiseSVN\bin;C:\SFWCLNT\ESQL\BIN; C:\Windows\ESQL\BIN;C:\SFWCM\CM\BIN;C:\Program Files (x86)\QuickTime\QTSystem\;C:\SeleniumIEdriver;C :\Program Files\TortoiseGit\bin C:\>wsimport JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually this means you are run ning JRE, not JDK. Please use the java command in JDK 5.0 or later (not JRE.) C:\>C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\wsimport.bat JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually this means you are run ning JRE, not JDK. Please use the java command in JDK 5.0 or later (not JRE.) C:\>cd C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin\ C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin>wsimport JDK's tools.jar was not found in C:\Program Files\Java\lib\tools.jar. Usually this means you are run ning JRE, not JDK. Please use the java command in JDK 5.0 or later (not JRE.) C:\glassfish\glassfish-4.0-b81-03_20_2013\glassfish4\glassfish\bin>
        Hide
        tak09 added a comment -

        When are you fixing this one? I have downloaded Glassfish b87 04_25_2013 but this bug is not fixed yet.

        Show
        tak09 added a comment - When are you fixing this one? I have downloaded Glassfish b87 04_25_2013 but this bug is not fixed yet.

          People

          • Assignee:
            Lukas Jungmann
            Reporter:
            tak09
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: