You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Chris Sterritt <st...@mrj.com> on 2000/02/18 16:10:46 UTC

Xerces-J and Oracle 8i

Hello,

	I haven't been able to coerce :-) Oracle 8i into loading Xerces-J
to use as my XML parser.  Has anyone managed to get Oracle to load
Xerces-J (for use as a java stored procedure) and do DOM parsing?

	Thanks very much,
	--chris sterritt



Re: Xerces-J and Oracle 8i

Posted by Chris Sterritt <st...@mrj.com>.
Hello,

A while back I wrote:

> | I haven't been able to coerce :-) Oracle 8i into loading Xerces-J
> | to use as my XML parser.  Has anyone managed to get Oracle to load
> | Xerces-J (for use as a java stored procedure) and do DOM parsing?


On Fri, 18 Feb 2000, Steve Muench replied:

> What errors are you getting?

Before I get to that, I should explain that we're using Oracle 8.1.6 and
Xerces-J 1.0.2.

The code, roughly, is (typed in since the machine this is on isn't on the 
net):


// DOMTest.java
import java.io.*;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import org.apache.xerces.parsers.DOMParser;

public class DOMTest
{
	public static String parseAndPrint (File clob)
	{
		Document doc = null;
		DOMParser parser = null;
		InputSource inps = null;
		String res = null;

		try
		{
			System.out.println ("Start: get new DOMParser");
			parser = new DOM Parser ();
			System.out.println ("End: get new DOMParser");
		}
		catch (Exception e)
		{
			System.err.println ("new DOMParser error: " + e);
			e.printStackTrace ();
		}

	//rest of code...

	}
}

	This runs fine when compiled with java outside Oracle, and parses
just fine. My first problem, not being able to load Xerces into oracle
with the 'loadjava' command, went away (either with Oracle 8.1.6 or Xerces
1.0.2) and isn't an issue.

	I can also 'loadjava' the DOMTest.java code, and it resolves just
fine.  	However, when I try to invoke it, I get:

Start: get new DOMParser
new DOMParser error: java.lang.NullPointerException
at org.apache.xerces.utils.SymbolCache.addSymbolToCache(SymbolCache.java:176)
at org.apache.xerces.utils.StringPool.addSymbol(StringPool.java:417)
at org.apache.xerces.framework.XMLDTDScanner.init(XMLDTDScanner.java:331)
at org.apache.xerces.framework.XMLDTDScanner.<init>(XMLDTDScanner.java:234)
at org.apache.xerces.validators.dtd.DTDValidator.<init>(DTDValidator.java:308)
at org.apache.xerces.framework.XMLParser.<init>(XMLParser.java:261)
at org.apache.xerces.parsers.DOMParser.<init>(DOMParser.java:225)
at DOMTest.parseAndPrint ...etc...

	Anyone see a bug from the Xerces point of view?

> The Oracle XML Parser for Java V2 loads fine
> with just the:
> 
>   $ loadjava -user scott/tiger xmlparserv2.jar
> 
> This should be the same for any Java JAR archive

Thanks for spouting the company line :-).  Seriously, I tried Oracle's
parser, and it works.  However, could you PLEASE beat your lawyers about
the head and shoulders for the user agreement we have to get our customers
to sign?  They can't sell it, fine, but the CAN'T PUBLISH BENCHMARKS?!?!?!
What kind of nonsense is that?

	Thanks,
	--chris sterritt



Re: Xerces-J and Oracle 8i

Posted by Steve Muench <sm...@us.oracle.com>.
What errors are you getting?

The Oracle XML Parser for Java V2 loads fine
with just the:

  $ loadjava -user scott/tiger xmlparserv2.jar

This should be the same for any Java JAR archive

You can select from the USER_ERRORS view to 
see the errors you got after the fact.

__________________________________________________________
Steve Muench, Lead XML Evangelist / Consulting Product Mgr
Oracle Corp, Business Components for Java Development Team
http://technet.oracle.com/tech/xml
----- Original Message ----- 
From: "Chris Sterritt" <st...@mrj.com>
To: <xe...@xml.apache.org>
Sent: Friday, February 18, 2000 7:10 AM
Subject: Xerces-J and Oracle 8i


| Hello,
| 
| I haven't been able to coerce :-) Oracle 8i into loading Xerces-J
| to use as my XML parser.  Has anyone managed to get Oracle to load
| Xerces-J (for use as a java stored procedure) and do DOM parsing?
| 
| Thanks very much,
| --chris sterritt
| 
| 
|