11 Replies Latest reply: May 26, 2006 9:30 PM by Andrew Sacamano RSS

    WSTools Errors

    Manish Parikh Newbie

      jboss-4.0.4.GA with jdk 1.5

      Running WSTools from the command line , I get

      log4j:WARN No appenders could be found for logger (org.jboss.ws.tools.WSTools).
      log4j:WARN Please initialize the log4j system properly.
      Exception in thread "main" org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
      at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
      at org.jboss.ws.tools.config.ToolsSchemaConfigReader.readConfig(ToolsSchemaConfigReader.java:131)
      at org.jboss.ws.tools.WSTools.readToolsConfiguration(WSTools.java:139)
      at org.jboss.ws.tools.WSTools.generate(WSTools.java:79)
      at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.(SaxJBossXBParser.java:69)
      at org.jboss.xb.binding.UnmarshallerImpl.(UnmarshallerImpl.java:57)
      at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
      ... 4 more
      Caused by: java.lang.NullPointerException
      at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
      at java.security.AccessController.doPrivileged(Native Method)


      From the ant task , I get

      java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      at org.apache.tools.ant.Main.runBuild(Main.java:668)
      at org.apache.tools.ant.Main.startAnt(Main.java:187)
      at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      Caused by: java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
      at org.jboss.util.xml.JBossEntityResolver.(JBossEntityResolver.java:58)
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.(SaxJBossXBParser.java:76)


      Please advise.

        • 1. Re: WSTools Errors
          lholmquist Newbie

          I also get this error. i am running jdk 1.4

          • 2. Re: WSTools Errors
            Ramzi Maalej Newbie

            Upgrade to jdk1.5

            • 3. Re: WSTools Errors
              Alessio Soldano Newbie

               

              "parikhm" wrote:
              jboss-4.0.4.GA with jdk 1.5

              From the ant task , I get

              java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
              at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
              at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
              at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
              at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
              at org.apache.tools.ant.Main.runBuild(Main.java:668)
              at org.apache.tools.ant.Main.startAnt(Main.java:187)
              at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
              at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
              Caused by: java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
              at org.jboss.util.xml.JBossEntityResolver.<clinit>(JBossEntityResolver.java:58)
              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:76)


              Please advise.


              Did you include {your_jboss_home}/thirdparty/oswego-concurrent/lib/concurrent.jar in your classpath before invoking wstools?

              Ale


              • 5. Re: WSTools Errors
                Manish Parikh Newbie

                 

                "thomas.diesler@jboss.com" wrote:
                http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWSFAQClientJars


                Thomas,

                I did follow this wiki's instructions and I still get the error.


                Ant Snippets

                <!-- WSTools Classpath -->












                <!-- Define a taskdef for the wstools ant task -->








                • 6. Re: WSTools Errors
                  Jason Greene Master

                  There was a quoting problem with the shell script:
                  http://jira.jboss.com/jira/browse/JBWS-953

                  You can download the fixed version here:
                  http://anonsvn.jboss.org/repos/jbossws/branches/jbossws-1.0/src/main/etc/wstools.sh

                  -Jason

                  • 7. Re: WSTools Errors
                    Manish Parikh Newbie

                    I am trying to the ant task wstools and getting the following error :

                    java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
                     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
                     at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                     at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                     at org.apache.tools.ant.Main.runBuild(Main.java:668)
                     at org.apache.tools.ant.Main.startAnt(Main.java:187)
                     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
                     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
                    Caused by: java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
                     at org.jboss.util.xml.JBossEntityResolver.<clinit>(JBossEntityResolver.java:58)
                     at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:76)
                     at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:57)
                     at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
                     at org.jboss.ws.tools.config.ToolsSchemaConfigReader.readConfig(ToolsSchemaConfigReader.java:131)
                     at org.jboss.ws.tools.WSTools.readToolsConfiguration(WSTools.java:139)
                     at org.jboss.ws.tools.WSTools.generate(WSTools.java:79)
                     at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
                     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
                     at org.apache.tools.ant.Task.perform(Task.java:364)
                     at org.apache.tools.ant.Target.execute(Target.java:341)
                     at org.apache.tools.ant.Target.performTasks(Target.java:369)
                     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
                     ... 7 more


                    Please advise.

                    • 8. Re: WSTools Errors
                      Jason Greene Master

                      Right,

                      The ant task question was answered by Thomas with the FAQ entry.
                      http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWSFAQClientJars

                      You need those jars in your ant task classpath. Make sure you include concurrent and jbossretro since you are not using the ejb3 profile.

                      <!-- Define a taskdef for the wstools ant task -->
                      <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
                       <classpath refid="jbossws.client.classpath"/>
                       <classpath path="${build.classes}"/>
                      </taskdef>
                      


                      -Jason

                      • 9. Re: WSTools Errors
                        Manish Parikh Newbie

                        Jason,

                        I do have the jars in the task classpath

                        
                         <!-- WSTools Classpath -->
                         <path id="wstools.classpath">
                         <fileset dir="${jboss.home}/client">
                         <include name="activation.jar"/>
                         <include name="commons-logging.jar"/>
                         <include name="javassist.jar"/>
                         <include name="jbossall-client.jar"/>
                         <include name="jbossws14-client.jar"/>
                         <include name="log4j.jar"/>
                         <include name="mail.jar"/>
                         <include name="jbossretro-rt.jar"/>
                         <include name="jboss-backport-concurrent.jar"/>
                         </fileset>
                         </path>
                        
                         <!-- Define a taskdef for the wstools ant task -->
                         <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
                         <classpath refid="wstools.classpath" />
                         </taskdef>
                        
                        
                         <target name="generate-ws-sources" description="Generate the deployment resources.">
                        
                         <wstools dest="${build.src.metadata}/META-INF"
                         config="${src.metadata}/webservices/hello/wstools-config.xml"/>
                        
                         </target>
                        



                        Thanks. Please advise.



                        • 10. Re: WSTools Errors
                          Andrew Sacamano Newbie

                           

                          "parikhm" wrote:
                          jboss-4.0.4.GA with jdk 1.5

                          Running WSTools from the command line , I get

                          log4j:WARN No appenders could be found for logger (org.jboss.ws.tools.WSTools).
                          log4j:WARN Please initialize the log4j system properly.
                          Exception in thread "main" org.jboss.xb.binding.JBossXBRuntimeException: Failed to create a new SAX parser
                          at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100)
                          at org.jboss.ws.tools.config.ToolsSchemaConfigReader.readConfig(ToolsSchemaConfigReader.java:131)
                          at org.jboss.ws.tools.WSTools.readToolsConfiguration(WSTools.java:139)
                          at org.jboss.ws.tools.WSTools.generate(WSTools.java:79)
                          at org.jboss.ws.tools.WSTools.main(WSTools.java:61)
                          Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
                          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:69)
                          at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:57)
                          at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
                          ... 4 more
                          Caused by: java.lang.NullPointerException
                          at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
                          at java.security.AccessController.doPrivileged(Native Method)


                          From the ant task , I get

                          java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
                          at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
                          at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
                          at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
                          at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
                          at org.apache.tools.ant.Main.runBuild(Main.java:668)
                          at org.apache.tools.ant.Main.startAnt(Main.java:187)
                          at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
                          at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
                          Caused by: java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
                          at org.jboss.util.xml.JBossEntityResolver.<clinit>(JBossEntityResolver.java:58)
                          at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:76)


                          Please advise.


                          I was getting this same error on windows - it seemed to be related to trying to use more than one item in the -cp option (I tried both colons and semicolons to delimit the items). Once I moved all the requires classes into a single classes directory, and just referenced that, this problem went away.

                          I know this sounds crazy, but it seemd to work.

                          Also, I couldn't fine the WSTools source in the JBoss source distro, or (I think) on ther 4.0.4 tag of CVS. Any suggestions where I can find it?

                          THanks

                          • 11. Re: WSTools Errors
                            Andrew Sacamano Newbie

                            Ah - nevermind about the source code - I found it in the Wiki...

                            For anyone else looking, search for jbossws subversion source in the wiki. The trick is that JBossWS is part of the jboss trunk (JDK 1.5) backported to JDK 1.4 as a thirdparty jar for inclusion in 4.0.4.