Forum Discussion

philcms1's avatar
philcms1
Occasional Contributor
11 years ago

DOMParser error when using the WS-I testing tools

Hi,

Using SoapUI-4.6.4 on Ubuntu 13.10 64 bits. When trying to use the wsi-test-tools, I am getting the following stack:

Running WSI Analyzer for [PRPClaimServiceSOAPBinding]
directory: /softwares/SmartBear/SoapUI-4.6.4/wsi-test-tools/java/bin
command: [sh, -c, /softwares/SmartBear/SoapUI-4.6.4/wsi-test-tools/java/bin/Analyzer.sh -config /tmp/wsi-analyzer-config5557780121446155076.xml]
Default WSI home directory
Set classpath
Set Java options
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xerces/parsers/DOMParser
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.wsi.xml.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at org.wsi.xml.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
at org.wsi.xml.XMLUtils.parseXML(Unknown Source)
at org.wsi.xml.XMLUtils.parseXML(Unknown Source)
at org.wsi.test.analyzer.config.impl.AnalyzerConfigReaderImpl.readAnalyzerConfig(Unknown Source)
at org.wsi.test.analyzer.config.impl.AnalyzerConfigReaderImpl.readAnalyzerConfig(Unknown Source)
at org.wsi.test.analyzer.config.impl.AnalyzerConfigImpl.parseArgs(Unknown Source)
at org.wsi.test.analyzer.Analyzer.<init>(Unknown Source)
at org.wsi.test.analyzer.BasicProfileAnalyzer.<init>(Unknown Source)
at org.wsi.test.analyzer.BasicProfileAnalyzer.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.DOMParser
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 22 more


FYI, I also had to rename "analyzer.sh" to "Analyzer.sh".

Thanks,
Phil

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Never used this and not sure how you are invoking it.

    May be you want to give a try from command line? Analyser internally calls setenv.sh which sets the classpath and i saw nothing in classpath in your case. The class shown in the error is in xercesImpl.jar

    Yeah what you mentioned is true in 4.6.4 - change in the script name (change of case).
  • Matthew72's avatar
    Matthew72
    New Contributor
    Hi there,

    I've encountered the same issue after installing SoapUI-5.0.0 on Lubuntu 13.10 32bit and Ubuntu 13.10 64bit as well.

    I had to rename analyzer.sh to Analyzer.sh on both computers. But after that I'm getting the same NoClassDefFoundError Exception as described above...

    How can I solve this exception?

    Thanks in advance

    Cheers, Matthew
  • Matthew72's avatar
    Matthew72
    New Contributor
    Hi all,

    Would you like to install soapui 5.0.0 on ubuntu or lubuntu? Then the following tutorial might help you to achieve that goal.

    First of all, you have to get the right version of the linux installer: In the case you've got a 64 bit operating system you need to get the 64 bit shell script, otherwise the 32 bit one.

    Secondly, you might need to get root privileges (sudo) to start the installer script. After the installation script has finished with success, please ensure that you are still the owner of your home directory (sudo chown -R $USER:$GROUP ~).

    Thirdly, you have to change the name of some files. The soapui installer has changed the names to lower case letters of all copied files. This is causing issues, e.g. when you try to check if your wsdl is WS-I compliant. Im my case, I had to change the following filenames:

    * $SOAPUI_HOME/wsi-test-tools/java/bin/Analyzer.sh
    * $SOAPUI_HOME/wsi-test-tools/java/lib/xercesImpl.jar
    * $SOAPUI_HOME/wsi-test-tools/java/lib/xmlParserAPIs.jar
    * $SOAPUI_HOME/wsi-test-tools/common/profiles/SSBP10_BP11_TAD.xml
    * $SOAPUI_HOME/wsi-test-tools/common/schemas/wsdlSoap.xsd

    However, if you are encountering strange issues with soapui using linux as os please read the faultmessage and logfiles thorougly and check the names of all mentioned files, probably it's just an issue with lower case letters in the filename ...

    Best regards