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)

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?

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

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?

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.