Missing SAX parser with Java 5?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Missing SAX parser with Java 5?

jochen-2

Hi,

I am trying to convert a first program (Apache XML-RPC) from Maven 1 to
Maven 2. After doing eclipse:eclipse, my unit tests run fine within
Eclipse. However, "mvn test" fails with the following exception:

    javax.xml.parsers.FactoryConfigurationError: Provider for
      javax.xml.parsers.SAXParserFactory cannot be found
        at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)

Being a Java 5 user with the builtin com.sun.org.apache.xerces parser, I
have no explanation, what might be wrong. Any ideas? I'll attach the
test report with the system properties, in case that might answer any
questions.

In case you'd like to reproduce the problem: Checkout the
b20050512_streaming branch from
http://svn.apache.org/repos/asf/webservices/xmlrpc/

Regards,

Jochen





<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="22" tests="22" time="0,198" failures="0" name="org.apache.xmlrpc.test.BaseTest">
  <properties>
    <property value="Java(TM) 2 Runtime Environment, Standard Edition" name="java.runtime.name"/>
    <property value="/usr/java/jdk1.5.0_05/jre/lib/i386" name="sun.boot.library.path"/>
    <property value="1.5.0_05-b05" name="java.vm.version"/>
    <property value="Sun Microsystems Inc." name="java.vm.vendor"/>
    <property value="http://java.sun.com/" name="java.vendor.url"/>
    <property value=":" name="path.separator"/>
    <property value="Java HotSpot(TM) Client VM" name="java.vm.name"/>
    <property value="sun.io" name="file.encoding.pkg"/>
    <property value="DE" name="user.country"/>
    <property value="unknown" name="sun.os.patch.level"/>
    <property value="Java Virtual Machine Specification" name="java.vm.specification.name"/>
    <property value="/home/jwi/workspace/ws-xmlrpc-3" name="user.dir"/>
    <property value="1.5.0_05-b05" name="java.runtime.version"/>
    <property value="sun.awt.X11GraphicsEnvironment" name="java.awt.graphicsenv"/>
    <property value="/home/jwi/workspace/ws-xmlrpc-3" name="basedir"/>
    <property value="/usr/java/jdk1.5.0_05/jre/lib/endorsed" name="java.endorsed.dirs"/>
    <property value="i386" name="os.arch"/>
    <property value="/tmp" name="java.io.tmpdir"/>
    <property value="
" name="line.separator"/>
    <property value="Sun Microsystems Inc." name="java.vm.specification.vendor"/>
    <property value="Linux" name="os.name"/>
    <property value="/usr/local/maven-2.0/bin/m2.conf" name="classworlds.conf"/>
    <property value="ISO-8859-1" name="sun.jnu.encoding"/>
    <property value="/usr/java/jdk1.5.0_05/jre/lib/i386/client:/usr/java/jdk1.5.0_05/jre/lib/i386:/usr/java/jdk1.5.0_05/jre/../lib/i386" name="java.library.path"/>
    <property value="Java Platform API Specification" name="java.specification.name"/>
    <property value="49.0" name="java.class.version"/>
    <property value="HotSpot Client Compiler" name="sun.management.compiler"/>
    <property value="2.6.13-1.1532_FC4" name="os.version"/>
    <property value="/home/jwi" name="user.home"/>
    <property value="Europe/Berlin" name="user.timezone"/>
    <property value="sun.print.PSPrinterJob" name="java.awt.printerjob"/>
    <property value="ISO-8859-1" name="file.encoding"/>
    <property value="1.5" name="java.specification.version"/>
    <property value="jwi" name="user.name"/>
    <property value="/usr/local/maven-2.0/core/boot/classworlds-1.1-alpha-2.jar" name="java.class.path"/>
    <property value="1.0" name="java.vm.specification.version"/>
    <property value="32" name="sun.arch.data.model"/>
    <property value="/usr/java/jdk1.5.0_05/jre" name="java.home"/>
    <property value="Sun Microsystems Inc." name="java.specification.vendor"/>
    <property value="de" name="user.language"/>
    <property value="mixed mode, sharing" name="java.vm.info"/>
    <property value="1.5.0_05" name="java.version"/>
    <property value="/usr/java/jdk1.5.0_05/jre/lib/ext" name="java.ext.dirs"/>
    <property value="/usr/java/jdk1.5.0_05/jre/lib/rt.jar:/usr/java/jdk1.5.0_05/jre/lib/i18n.jar:/usr/java/jdk1.5.0_05/jre/lib/sunrsasign.jar:/usr/java/jdk1.5.0_05/jre/lib/jsse.jar:/usr/java/jdk1.5.0_05/jre/lib/jce.jar:/usr/java/jdk1.5.0_05/jre/lib/charsets.jar:/usr/java/jdk1.5.0_05/jre/classes" name="sun.boot.class.path"/>
    <property value="Sun Microsystems Inc." name="java.vendor"/>
    <property value="/usr/local/maven-2.0" name="maven.home"/>
    <property value="/var/maven/repository" name="localRepository"/>
    <property value="/" name="file.separator"/>
    <property value="http://java.sun.com/cgi-bin/bugreport.cgi" name="java.vendor.url.bug"/>
    <property value="little" name="sun.cpu.endian"/>
    <property value="UnicodeLittle" name="sun.io.unicode.encoding"/>
    <property value="gnome" name="sun.desktop"/>
    <property value="" name="sun.cpu.isalist"/>
  </properties>
  <testcase time="0,034" name="testByteParam">
    <error type="javax.xml.parsers.FactoryConfigurationError" message="Provider for javax.xml.parsers.SAXParserFactory cannot be found">javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.SAXParserFactory cannot be found
        at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
        at org.apache.xmlrpc.server.XmlRpcStreamServer.&lt;clinit&gt;(XmlRpcStreamServer.java:51)
        at org.apache.xmlrpc.webserver.WebServer.&lt;init&gt;(WebServer.java:82)
        at org.apache.xmlrpc.webserver.WebServer.&lt;init&gt;(WebServer.java:96)
        at org.apache.xmlrpc.test.WebServerProvider.&lt;init&gt;(WebServerProvider.java:30)
        at org.apache.xmlrpc.test.LiteTransportProvider.&lt;init&gt;(LiteTransportProvider.java:34)
        at org.apache.xmlrpc.test.BaseTest.setUp(BaseTest.java:56)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)
        at org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220)
        at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:204)
        at org.codehaus.surefire.Surefire.run(Surefire.java:153)
        at org.codehaus.surefire.Surefire.run(Surefire.java:77)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
        at org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:303)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
</error>
    <system-out></system-out>
    <system-err></system-err>
  </testcase>
  <testcase time="0,007" name="testByteResult">
    <error type="java.lang.NoClassDefFoundError
        at org.apache.xmlrpc.webserver.WebServer.<init>(WebServer.java" message="


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]