Hello,

I'm trying to port StatCVS to maven2 and had some success ... well, if I 
invoke
StatCVS as a subprocess.

But I want to invoke StatCVS directly, too. Now, I'm stuck while invoking 
StatCVS
from Java. When I try, I get this error:

saxFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
...
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider 
org.apache.xerc
es.jaxp.SAXParserFactoryImpl could not be instantiated: 
java.lang.NullPointerExc
eption
        at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
        at 
de.berlios.statcvs.xml.output.HTMLRenderer.create(HTMLRenderer.java:98)

The code looks like this:

    SAXParserFactory x = new 
org.apache.xerces.jaxp.SAXParserFactoryImpl();
    System.out.println("saxFactory="+x.getClass().getName());

    x = SAXParserFactory.newInstance(); // <-- This is line 98
    System.out.println("saxFactory="+x.getClass().getName());

So basically, when I instantiate the SAXParserFactoryImpl directly, it 
works
which means that Xerces is in the classpath. When I use
javax.xml.parsers.SAXParserFactory.newInstance() (as I should), I get a 
NPE but
the classname is the same in both cases!

When I run this code within Eclipse, it works. Therefore, I assume that 
maven
somehow breaks this but I have no idea what could cause this.

Any ideas?

Best Regards,

-- 
Aaron Digulla

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to