[jdom-interest] OC4J & JDOM
ian beer
beer_ian at hotmail.com
Tue Oct 8 04:59:46 PDT 2002
hi all,
am trying to use Jdom in my app which is running on oc4j, despite setting
the system property as described in jason hunters article, i cannot
instantiate a SAXBuilder object.
can anyone help?????
]
try{
builder = new SAXBuilder("oracle.xml.parser.v2.SAXParser");
doc=builder.build("C:\\java work\\logs\\Oct2002.xml");
}//try
catch(Exception ex){
ex.printStackTrace();
}
this is the code i am trying but am getting the following exception
org.jdom.JDOMException: SAX feature
'http://apache.org/xml/features/allow-java-e ncodings' not recognized.: SAX
feature 'http://apache.org/xml/features/allow-jav a-encodings' not
recognized.
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:323)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:445)
at jdomoc4j.test.init(test.java:21)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.
java:1993)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.
java:4334)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp
lication.java:2533)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:616)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:107)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:802)
at java.lang.Thread.run(Thread.java:484)
Root cause: org.xml.sax.SAXNotRecognizedException: SAX feature
'http://apache.or g/xml/features/allow-java-encodings' not recognized.
at oracle.xml.parser.v2.NonValidatingParser.setFeature(NonValidatingPars
er.java:1763)
at oracle.xml.parser.v2.SAXParser.setFeature(SAXParser.java:266)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:240)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:445)
at jdomoc4j.test.init(test.java:21)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.
java:1993)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.
java:4334)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp
lication.java:2533)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:616)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:107)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:802)
at java.lang.Thread.run(Thread.java:484)
and this code
System.setProperty("javax.xml.parsers.SAXParserFactory","oracle.xml.jaxp.JXSAXParserFactory");
try{
builder = new SAXBuilder();
doc=builder.build("C:\\java work\\logs\\Oct2002.xml");
}//try
catch(Exception ex){
ex.printStackTrace();
}
gives the following
org.jdom.JDOMException: SAX2 driver class
org.apache.xerces.parsers.SAXParser no
t found: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:323)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:445)
at jdomoc4j.test.init(test.java:21)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.
java:1993)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.
java:4334)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp
lication.java:2533)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:616)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:107)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:802)
at java.lang.Thread.run(Thread.java:484)
Root cause: java.lang.ClassNotFoundException:
org.apache.xerces.parsers.SAXParse
r
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory
.java:118)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:237)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:445)
at jdomoc4j.test.init(test.java:21)
at javax.servlet.GenericServlet.init(GenericServlet.java:44)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.
java:1993)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.
java:4334)
at com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp
lication.java:2533)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:616)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:107)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:802)
at java.lang.Thread.run(Thread.java:484)
can some one please help, i need to be able to instantiate the SAXBuilder
class and cant!!!! what am i doing wrong????
I am deploying this code within a servlet to OC4J
cheers in advance
Ian
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the jdom-interest
mailing list