File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes weblogic exception when XML, XSL is processed!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "weblogic exception when XML, XSL is processed!!" Watch "weblogic exception when XML, XSL is processed!!" New topic
Author

weblogic exception when XML, XSL is processed!!

SaiPrasad Jukalkar
Ranch Hand

Joined: Feb 20, 2001
Posts: 79
1. iam using weblogic6.0
2. JDK version is - "1.3.0-C"
Description of the Exception:
i am calling a JSP form through weblogic6.0, the JSP form creates a Java Object which uses the Oracles XML parsers and Oracles JDBC drivers to query the data from database and generate an XML file,
The XML file and an XSL file present on the disk is used to transform into a pdf file using the Formatting objects(fop), while transforming i get the runtime (stack trace) error "java.lang.NoSuchMethodError
at org.apache.xpath.patterns.NodeTest.execute (NodeTest.java:403)
at org.apache.xpath.axes.PredicatedNodeTest.acceptNode(PredicatedNodeTest.java:388)
at org.apache.xpath.axes.DescendantIterator.nextNode(DescendantIterator.java:239)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:428)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemples.java:193)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2202)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2085)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1219)
at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2942)
at java.lang.Thread.run(Thread.java:484)
using renderer org.apache.fop.render.pdf.PDFRenderer
using element mapping org.apache.fop.fo.StandardElementMapping
using element mapping org.apache.fop.svg.SVGElementMapping
using element mapping org.apache.fop.extensions.ExtensionElementMapping
using property list org.apache.fop.fo.StandardPropertyListMapping
using property list org.apache.fop.svg.SVGPropertyListMapping
using property list org.apache.fop.extensions.ExtensionPropertyListMapping
building formatting object tree
FATAL ERROR:The root element is required in a well-formed document.
2 Next exception is when iam trying to email the pdf file.
javax.mail.NoSuchProviderException: No provider for Address type: rfc822
at javax.mail.Session.getTransport(Session.java:475)
at javax.mail.Transport.send0(Transport.java:154)
at javax.mail.Transport.send(Transport.java:154)
at CaseIDXml.postMail(CaseIDXml.java:128)
at CaseIDXml.CreatePDFReport(caseIDXml.java:78)
at jsp_servlet._shiftleader._jspService(_shiftleader.java:85)
......
In my opinion the problem could be the weblogic server is unable to find the jar files required by java classes i have created. i would like to know when should i put all the jar files(xalan.jar, xerces.jar, fop.jar, bsf.jar etc).
i appreciate if you could give me a solution.
thanx in advance.
saiprasad.

JSP
Scott Huddleston
Greenhorn

Joined: Jun 28, 2001
Posts: 12
You have to change the CLASSPATH in the startWebLogic.sh. Make the first entry the path to the xerces.jar (which you may have to download). Secondly, you have to change the java command-line in the same script to include:

-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
Then you should be in business
SaiPrasad Jukalkar
Ranch Hand

Joined: Feb 20, 2001
Posts: 79
hi scott,
thanks for the reply, i found solution for this problem.
thnx
saiprasad
prathibha, ar
Greenhorn

Joined: Jun 22, 2001
Posts: 13
Hai Saiprasad,
Even I am having the same problem as u had. I read in the forum that you were able to solve the problem which u were facing.
The following is the description of the problem.
I am writing the xml file reading a simple text file. This xml file is parsed through a parser using Schema Validation(XSD).
But this works fine in the command prompt. But if I call this class from a JSP it gives the following error.
I am using JAXP 1.1. parser and tomcat3.2.1 and JDK1.3.1 and SAX parser
I have placed all the recent jar files which I had in the jdk1.3.1/lib directory in the
jakarta-tomcat/lib directory.
Once I removed tomcat and installed freshly also inorder to avoid old jar files.
But still it is giving following error
Unhandled error! You might want to consider having an error page to report such
errors more gracefully
java.lang.NoSuchMethodError
at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java:1132)
at org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
Validator.java:1197)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
tScanner.java:1862)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1005)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
at org.apache.xerces.validators.common.XMLValidator.resolveSchemaGrammar
(XMLValidator.java:2728)
at org.apache.xerces.validators.common.XMLValidator.bindNamespacesToElem
entAndAttributes(XMLValidator.java:2610)
at org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
Validator.java:1152)
at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
tScanner.java:1862)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1005)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
at xmljava.ValidateWithSchemaJAXPmain.Validate(ValidateWithSchemaJAXPmai
n.java:72)
at xmljava.Write_XML.Write_XMLFile(Write_XML.java:79)
at jsp._0002fjsp_0002fvalidatexml_0002ejspvalidatexml_jsp_4._jspService(
_0002fjsp_0002fvalidatexml_0002ejspvalidatexml_jsp_4.java:92)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspSer
vlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:2
61)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.ja
va:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559
)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
n(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.j
ava:338)
at java.lang.Thread.run(Thread.java:484)

Can u please tell me the steps which I have to take in order to solve this problem
Thanks and Regards
prathibha

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: weblogic exception when XML, XSL is processed!!