gij/XML problem

Jakob Praher jpraher@yahoo.de
Sat Jun 4 14:08:00 GMT 2005


Hi Daniel,

though I am no GNU jaxp expert, some pointers from my side :

Am Samstag, den 04.06.2005, 02:19 -0700 schrieb Daniel Qarras:
> Hi all,

> 
> gij -cp ./lib/myapp.jar:./lib/log4j.jar:./lib/jdom.jar
> -Dgnu.gcj.precompiled.db.path=lib/myapp.db
> com.domain.myapp.MyApp foo.xml
> log4j:ERROR Could not parse input source
> [org.xml.sax.InputSource@4395a0].
> gnu.xml.dom.ls.DomLSException: Protocol handler not
> found: dummy

wild guess: looks like log4j is referring to an url like "dummy:/..."
which get wrapped inside a InputSource (which can be anything form
InputStream to URL ) and the "dummy" handler can not be resolved.

this has something to do with java.net.URL when constructing an URL like

try {

URL u = new URL( "dummy://..." );
/* this involves resolving the Connection through the URLStreamHandler*/
URLConnection uc = u.openConnection( ); 
InputStream is = uc.getInputStream( );

} catch( MalfordmedURLException mue ) {
	...
}

the URL class tries to find an URLConnection for the protocol.

so in short:
check to see what URL is used - what is the System ID you pass to
InputSource.

try a simple gnu jaxp example for parsing an xml document - do you get
any errors there?

Which which InputSource are u
calling ..log4j.xml.DOMConfiguration.doConfigure?


just some pointers.

>    at
> gnu.xml.dom.ls.DomLSParser.doParse(org.w3c.dom.ls.LSInput)
> (/home/test/gcc/lib/libgcj.so.6.0.0)
>    at
> gnu.xml.dom.ls.DomLSParser.parse(org.w3c.dom.ls.LSInput)
> (/home/test/gcc/lib/libgcj.so.6.0.0)
>    at
> gnu.xml.dom.DomDocumentBuilder.parse(org.xml.sax.InputSource)
> (/home/test/gcc/lib/libgcj.so.6.0.0)
>    at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(org.xml.sax.InputSource,
> org.apache.log4j.spi.LoggerRepository)
> (/home/test/gcjtest/lib/log4j.jar.so)
> ...
> 
> 
> 1)
> http://developer.classpath.org/mediation/ClasspathShowcase
> 
> 
> Thanks,
> Dan.
> 
> 
> 
> 
> 		
> __________________________________ 
> Discover Yahoo! 
> Find restaurants, movies, travel and more fun for the weekend. Check it out! 
> http://discover.yahoo.com/weekend.html 
> 
-- 
Jakob Praher <jpraher@yahoo.de>



More information about the Java mailing list