System property org.xml.sax.driver not specified

I'm getting the error:
System property org.xml.sax.driver not specified
How do I set this property? Why doesn't it find the default?
I'm using WL6.0
Imports:
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.w3c.dom.Document;
import org.w3c.dom.DOMException;
Code Snippet:
try
File stylesheet = new File("LaborDistHours.xsl");
LaborDistHours ldh = new LaborDistHours("1041410011",
"01-feb-2000", "30-mar-2000");
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
StringReader reportXML = new StringReader( ldh.getReportXML() );
document = builder.parse(new InputSource( reportXML ));
TransformerFactory tFactory = TransformerFactory.newInstance();
StreamSource stylesource = new StreamSource(stylesheet);
Transformer transformer = tFactory.newTransformer(stylesource);
//error occurs here
DOMSource source = new DOMSource(document);
StringWriter reportXLST = new StringWriter();
StreamResult result = new StreamResult(reportXLST);
transformer.transform(source, result);
Steven Ford ([email protected])
"...That we here highly resolve that these dead shall not have died in
vain - that this nation, under God, shall have a new birth of Freedom - and
that Government of the people, by the people and for the people shall not
perish from the earth." Abraham Lincoln

try to look on xml.apache.org for this error. There should be some pages describing how and why setup this property.
Basically, these properties defines factories for javax extensions. javax defines interfaces and providers than supply implementations, so for example you can use different XML parsers implementations (we use Xalan for one OC4J container and original ORACLE parser for other). To bind this together they use some defined mechanism like setting system property of including special manifest file etc. (I don't know about details)
Myrra

Similar Messages

  • Org.xml.sax.SAXException: System property org.xml.sax.driver not specified

    Hi,
    I am running Jdeveloper 9.0.3.1 and using embedded OC4J.
    Getting following error when trying to run the application. Please help me if you can.
    Thanks
    Tareq
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:90)
         at net.sundog.struts.ActionFinderPlugIn.parseHtmlFiles(ActionFinderPlugIn.java:76)
         at net.sundog.struts.ActionFinderPlugIn.searchDirectory(ActionFinderPlugIn.java:64)
         at net.sundog.struts.ActionFinderPlugIn.init(ActionFinderPlugIn.java:50)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1156)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpApplication.loadServlet(HttpApplication.java:1956)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpApplication.findServlet(HttpApplication.java:4355)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2750)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:617)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

    try to look on xml.apache.org for this error. There should be some pages describing how and why setup this property.
    Basically, these properties defines factories for javax extensions. javax defines interfaces and providers than supply implementations, so for example you can use different XML parsers implementations (we use Xalan for one OC4J container and original ORACLE parser for other). To bind this together they use some defined mechanism like setting system property of including special manifest file etc. (I don't know about details)
    Myrra

  • XML parsing -  org.xml.sax.driver not specified

    I am attempmtping to parse my first XML document and get the following excpetion when running my prog.
    org.xml.sax.SAXException: System property org.xml.sax.driver not specified.
    I am following the examples in the O'Reilly Java and XML book but suspect I am missing something obvious.
    This is the offending line of code:
    XMLReader xr = XMLReaderFactory.createXMLReader();
    Any help will be appreciated.

    You need to set a property for your class that invokes your SAX handler. This is the property you need to set
    org.xml.sax.driver=???
    Where ??? is the name of the package where your SAXparser lives.
    for example, my sax driver is in:
    org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
    (see code below)
    Also, a sweet reference is Elliot Rusty Harold's "XML processing with Java", which answered all the practical questions I had -- really! And is free, online.
    http://www.ibiblio.org/xml/books/xmljava/chapters/index.html
    This is the code for main() where my xml handler is invoked
    try
    {  SpiderHandler spiderHandler = new SpiderHandler(testSpider);
       XMLReader reader = XMLReaderFactory.createXMLReader();
       reader.setContentHandler(spiderHandler);
       for (int i=4; i<args.length; i++)
       {   FileReader xmlScript = new FileReader(args);
    System.out.println("Input file number "+i+" named "+args[i]);
    // org.xml.sax.XMLReader.parse(InputSource) interface
    // see org.xml.sax.InputSource class      
    reader.parse(new InputSource(xmlScript));
    catch(Exception e)
    {   System.out.println("Error encountered in parsing from main(). \n");
    e.printStackTrace();
    Luck to you! XML is a joy.

  • Org.xml.sax.SAXParseException: File "..\contents.dtd" not found.

    I have an xml file that has to be parsed in my application, without changing the XML. I don't have the dtd that is mentioned in the XML file.
    The code i am using to parse the xml into a Document is
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(false);
    System.out.println("Factory=" + factory.isValidating());
    DocumentBuilder builder = factory.newDocumentBuilder();
    builder.setEntityResolver(new XMLResolver());
    System.out.println("DocBuilder=" + builder.isValidating());
    Document doc = builder.parse(xml.getInputStream());
    System.out.println("doc=" + doc);
    if (doc == null) {
    return;
    The XML file is
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE contentspace SYSTEM "..\contents.dtd" [
    ]>
    <contentspace validdtd="0.0.2">
    <emscombicategory emscombisubtype="EMSCOLLECTION">
    <default name="lugares" description="lugares"/>
    <emscombi>
    <default name="alemania" description="Alemania"/>
    <commondetails copyrightowner="TME" copyright="COPYRIGHTED" price="" validfrom="" validto="" provider="terramobile" globalcontentid="ECOLL"/>
    <previewedbinarycontent preview="alemania.GIF">
    <binarycontent binarydata="alemania.OTA"/>
    </previewedbinarycontent>
    <emsringtone>
    <default name="alema" description="Himno de Alemania"/>
    <commondetails copyrightowner="TME" copyright="FREE" price="" validfrom="" validto="" provider="terramobile" globalcontentid="TMEEMEL"/>
    <previewedbinarycontent preview="alema.WAV">
    <binarycontent binarydata="alema.OTA"/>
    </previewedbinarycontent>
    <ringtonedetails composer="Tradicional" performer="Tradicional"/>
    </emsringtone>
    <emspicture>
    <default name="birra" description="Cerveza alemana"/>
    <commondetails copyrightowner="TME" copyright="COPYRIGHTED" price="" validfrom="" validto="" provider="terramobile" globalcontentid="TMEEPM"/>
    <emspicturedetails width="32" height="32">
    <previewedbinarycontent preview="birra.GIF">
    <binarycontent binarydata="birra.OTA"/>
    </previewedbinarycontent>
    </emspicturedetails>
    </emspicture>
    </emscombi>
    </emscombicategory>
    </contentspace>
    When i run this through it throws an exception with the message
    org.xml.sax.SAXParseException: File "..\contents.dtd" not found.
    I thought by setting factory.setValidating(false) it would not read the DTD, but it does.
    Is there any way to make the document model NOT attempt to read the DTD ???

    setValidating(false) has no effect on checking against the DTD.
    create your own EntityResolver rather than using new XMLResolver(): in this resolver divert the call to the DTD on an empty XML document.
    i have shown how to do so in another thread, just run a search on this forum (this hint is valid for any question btw)

  • Org.xml.sax.SAXParseException: The encoding "ISO8859-1" is not supported.

    Please help. I am trying to parse an XMl document using de DOMParser:
    try {
    DOMParser parser = new DOMParser();
    parser.parse("myFile.xml");
    document = parser.getDocument();     
    } catch (SAXException e) {
    System.err.println (e);
    } catch (IOException e) {
    System.err.println (e);
    I use the encouding "ISO8859-1" in myFile.xml:
    <?xml version='1.0' encoding='ISO8859-1' ?>
    But if I execute my program I get the following error:
    org.xml.sax.SAXParseException: The encoding "ISO8859-1" is not supported.
    How I can I resolve that?
    Many thanks!
    Yassin

    The Java API documentation (the bit about character encodings) mentions "ISO-8859-1" but not "ISO8859-1". Try that instead?

  • Could not parse deployment descriptor: org.xml.sax.SAXParseException

    I am using Taglib in JSP file .
    I am calling the AbcTagLib from my jsp Login.jsp file.
    The entries for the taglib is there in web.xml file.
    Please see the attachments.
    I am getting the following errors while running my JSP file:
    Parsing of JSP File '/jsp/Login.jsp' failed:
    /jsp/Login.jsp: Could not parse deployment descriptor: org.xml.sax.SAXParseException:
    Could not parse: taglib starting at line 1
    probably occurred due to an error in /jsp/Login.jsp:
    <%@ taglib uri="AbcTagLib" prefix="abc" %>
    Please look in to it and suggest some solution.
    The files are :
    AbcTagLib.tld
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc. //DTD JSP Tag Library 1.1//EN"
    "web-jsptaglib_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>TagLib</shortname>
         <tag>
         <name>label</name>
         <tagclass>com.abc.internet.common.taglib.LiteralTag</tagclass>
         <bodycontent>empty</bodycontent>
         <info>This is a simple tag for ABC</info>
              <attribute>
                   <name>name</name>
                   <required>false</required>
                   <rtexpvalue>false</rtexpvalue>
              </attribute>
         </tag>
         <tag>
         <name>linkAccess</name>
         <tagclass>com.abc.internet.common.taglib.LinkAccessTag</tagclass>
         <bodycontent>JSP</bodycontent>
         <info>this is the tag class for showing the button</info>
         <attribute>
         <name>linkId</name>
         <required>true</required>
         <rtexpvalue>false</rtexpvalue>
         </attribute>
         <attribute>
         <name>flag</name>
         <required>true</required>
         <rtexpvalue>false</rtexpvalue>
         </attribute>
         </tag>
    </taglib>
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
    'file:///D:/bea/wlserver6.0sp1/web-app_2_2.dtd'>
    <web-app>
    <taglib>
    <taglib-uri>AbcTagLib</taglib-uri>
    <taglib-location>/WEB-INF/AmsTagLib.tld</taglib-location>
    </taglib>
    </web-app>
    Login.jsp
    <%@ page language="Java" errorPage="/jsp/AbcJspError.jsp" import="java.util.Vector,com.abc.internet.common.util.UtilFunctions,com.abc.internet.welcome.form.LoginForm,com.abc.internet.common.util.*"%>
    <%@ taglib uri="AbcTagLib" prefix="abc" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <HTML>
    <HEAD>
         <TITLE>LOGIN SCREEN</TITLE>
         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY class="imgSpacerTan" onUnload="javascript:funcCloseErrorWindow();">
    <html:form action="/struts/Login" name="LoginForm" type="com.abc.internet.welcome.form.LoginForm"
    onsubmit="onLogin()">
         <table align="center" cellpadding=0 cellspacing=0 border=0 class="imgSpacerTan">
              <tr>
                   <td align="left">
                        <img border="0" src="../images/logo.gif">
                   </td>
              </tr>
         </table>
         <table align="center" cellpadding=0 cellspacing=0 border=0 class="imgSpacerTan">
              <tr> <td ALIGN="center" class="header" height=30px><font class="fontBlue" >Welcome
    to the</font></td></tr>
              <tr> <td ALIGN="center" class="header" height=30px><font class="fontBlue" >ABC
    System</font></td></tr>
              <tr> <td ALIGN="center" class="header" height=20>  </td></tr>
         </table>
         <table cellpadding=0 cellspacing=0 border=5 bordercolor="#293163" class="deadlineHistoryTablebgcolor"
    align="center">
              <tr class="deadlineHistoryTablebgcolor">
                   <td class="deadlineHistoryTablebgcolor">
                        <table cellpadding=10 cellspacing=10 border=0 width="400" class="deadlineHistoryTablebgcolor"
    align="center">
                             <tr>
                                  <td>
                                       <script language="javascript">
                                            if(navigator.appName.indexOf("Netscape") != -1)
                                                      document.write('<table cellpadding=0 cellspacing=0 border=1 width="400"
    bordercolor="#293163" class="deadlineHistoryTablebgcolor" align="center">');
                                            else
                                                      document.write('<table cellpadding=0 cellspacing=0 border=1 width="400"
    bordercolorlight="#293163" class="deadlineHistoryTablebgcolor" align="center">');
                                       </script>
                                            <tr>
                                                 <td>
                                                      <table cellpadding=7 cellspacing=7 border=0 width="400" bordercolor="#293163"
    class="deadlineHistoryTablebgcolor" align="center">
                                                           <tr>
                                                                <td>
                                                                     <font class="fontBlue">   USER ID       &nbsp:  </font><input
    type="text" name="iv-user">
                                                                </td>
                                                           </tr>
                                                      </table>
                                                 </td>
                                            </tr>
                                       </table>     
                                  </td>
                             </tr>
                             <tr>
                                  <td>
                                       <table cellpadding=0 cellspacing=0 border=1 width="400" class="borderBlue"
    class="deadlineHistoryTablebgcolor" align="center">
                                            <tr>
                                                 <td>
                                                      <table cellpadding=7 cellspacing=7 border=0 width="400" class="borderBlue"
    class="deadlineHistoryTablebgcolor" align="center">
                                                           <tr>
                                                                <td align="center" ><input type="submit" value="Submit" onclick="return
    (onLogin())" ></td>
                                                           </tr>
                                                      </table>
                                                 </td>
                                            </tr>
                                       </table>
                                  </td>
                             </tr>
                        </table>
                   </td>
              </tr>
         </table>
    </html:form>     
    </body>
    </html>
    Thanks

    I am using Taglib in JSP file .
    I am calling the AbcTagLib from my jsp Login.jsp file.
    The entries for the taglib is there in web.xml file.
    Please see the attachments.
    I am getting the following errors while running my JSP file:
    Parsing of JSP File '/jsp/Login.jsp' failed:
    /jsp/Login.jsp: Could not parse deployment descriptor: org.xml.sax.SAXParseException:
    Could not parse: taglib starting at line 1
    probably occurred due to an error in /jsp/Login.jsp:
    <%@ taglib uri="AbcTagLib" prefix="abc" %>
    Please look in to it and suggest some solution.
    The files are :
    AbcTagLib.tld
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc. //DTD JSP Tag Library 1.1//EN"
    "web-jsptaglib_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>TagLib</shortname>
         <tag>
         <name>label</name>
         <tagclass>com.abc.internet.common.taglib.LiteralTag</tagclass>
         <bodycontent>empty</bodycontent>
         <info>This is a simple tag for ABC</info>
              <attribute>
                   <name>name</name>
                   <required>false</required>
                   <rtexpvalue>false</rtexpvalue>
              </attribute>
         </tag>
         <tag>
         <name>linkAccess</name>
         <tagclass>com.abc.internet.common.taglib.LinkAccessTag</tagclass>
         <bodycontent>JSP</bodycontent>
         <info>this is the tag class for showing the button</info>
         <attribute>
         <name>linkId</name>
         <required>true</required>
         <rtexpvalue>false</rtexpvalue>
         </attribute>
         <attribute>
         <name>flag</name>
         <required>true</required>
         <rtexpvalue>false</rtexpvalue>
         </attribute>
         </tag>
    </taglib>
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
    'file:///D:/bea/wlserver6.0sp1/web-app_2_2.dtd'>
    <web-app>
    <taglib>
    <taglib-uri>AbcTagLib</taglib-uri>
    <taglib-location>/WEB-INF/AmsTagLib.tld</taglib-location>
    </taglib>
    </web-app>
    Login.jsp
    <%@ page language="Java" errorPage="/jsp/AbcJspError.jsp" import="java.util.Vector,com.abc.internet.common.util.UtilFunctions,com.abc.internet.welcome.form.LoginForm,com.abc.internet.common.util.*"%>
    <%@ taglib uri="AbcTagLib" prefix="abc" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <HTML>
    <HEAD>
         <TITLE>LOGIN SCREEN</TITLE>
         <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY class="imgSpacerTan" onUnload="javascript:funcCloseErrorWindow();">
    <html:form action="/struts/Login" name="LoginForm" type="com.abc.internet.welcome.form.LoginForm"
    onsubmit="onLogin()">
         <table align="center" cellpadding=0 cellspacing=0 border=0 class="imgSpacerTan">
              <tr>
                   <td align="left">
                        <img border="0" src="../images/logo.gif">
                   </td>
              </tr>
         </table>
         <table align="center" cellpadding=0 cellspacing=0 border=0 class="imgSpacerTan">
              <tr> <td ALIGN="center" class="header" height=30px><font class="fontBlue" >Welcome
    to the</font></td></tr>
              <tr> <td ALIGN="center" class="header" height=30px><font class="fontBlue" >ABC
    System</font></td></tr>
              <tr> <td ALIGN="center" class="header" height=20>  </td></tr>
         </table>
         <table cellpadding=0 cellspacing=0 border=5 bordercolor="#293163" class="deadlineHistoryTablebgcolor"
    align="center">
              <tr class="deadlineHistoryTablebgcolor">
                   <td class="deadlineHistoryTablebgcolor">
                        <table cellpadding=10 cellspacing=10 border=0 width="400" class="deadlineHistoryTablebgcolor"
    align="center">
                             <tr>
                                  <td>
                                       <script language="javascript">
                                            if(navigator.appName.indexOf("Netscape") != -1)
                                                      document.write('<table cellpadding=0 cellspacing=0 border=1 width="400"
    bordercolor="#293163" class="deadlineHistoryTablebgcolor" align="center">');
                                            else
                                                      document.write('<table cellpadding=0 cellspacing=0 border=1 width="400"
    bordercolorlight="#293163" class="deadlineHistoryTablebgcolor" align="center">');
                                       </script>
                                            <tr>
                                                 <td>
                                                      <table cellpadding=7 cellspacing=7 border=0 width="400" bordercolor="#293163"
    class="deadlineHistoryTablebgcolor" align="center">
                                                           <tr>
                                                                <td>
                                                                     <font class="fontBlue">   USER ID       &nbsp:  </font><input
    type="text" name="iv-user">
                                                                </td>
                                                           </tr>
                                                      </table>
                                                 </td>
                                            </tr>
                                       </table>     
                                  </td>
                             </tr>
                             <tr>
                                  <td>
                                       <table cellpadding=0 cellspacing=0 border=1 width="400" class="borderBlue"
    class="deadlineHistoryTablebgcolor" align="center">
                                            <tr>
                                                 <td>
                                                      <table cellpadding=7 cellspacing=7 border=0 width="400" class="borderBlue"
    class="deadlineHistoryTablebgcolor" align="center">
                                                           <tr>
                                                                <td align="center" ><input type="submit" value="Submit" onclick="return
    (onLogin())" ></td>
                                                           </tr>
                                                      </table>
                                                 </td>
                                            </tr>
                                       </table>
                                  </td>
                             </tr>
                        </table>
                   </td>
              </tr>
         </table>
    </html:form>     
    </body>
    </html>
    Thanks

  • Org.xml.sax error content not allowed in prolog

    Hi,
    I am running Jetty 6.x on SUSE and there is a webapp called pyjasper i am trying to run on it. the context maps fine and it displays the content however, when i use the applet in the webapp to create a report (.jasper) it gives me a org.xml.sax Parse exception: content not allowed in prolog.
    A little part of the error is pasted below:
    generating report /tmp/pyJasper/compiled-reports/6390c37d0ea810c7fae3e647c2f86817.jasper
    Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.apache.commons.digester.Digester.parse(Digester.java:1647)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:115)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    2010-03-04 09:15:59.073::WARN: /pyJasper/jasper.py
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:115)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    I am guessing this is some sort of an error in xml parsing. I found couple of solutions on sun java forums but none of them worked for me. Right now I am trying to figure out whether this is being caused by the applet or the java itself.
    Apparently other people who use this applet do not have a problem and they have the exact same files as me. So I am not sure what exactly is causing tihs problem. Bit of a noob.
    Any help would be greatly appreciated.
    THANK YOU VERY MUCH!!!! :)

    Hi thanks you very much for the reply.
    In my message I forgot to mention that I edited my prologs to "<?xml version = "1.0" encoding = "UTF-8"?>" and the jetty.xml that has the server configuration has:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
    I apologize for the clarity of my message. I meant to say that I was wondering whether the problem is with the xm files that java has, or the xml files that are in the pyjasper package that I downloaded?
    I also checked for byte order mark using hex editor to see if those six characters were in front of my xml files. None of the files in the pyjasper package had the BOM so that solution did not work.
    Is there something wrong with the above xml prolog?
    I have been reading tons of different posts and stuf trying to figure this out for the past month but juts cannot seem to get it to work.
    Thanks.

  • Org.xml.sax.SAXParseException: Content is not allowed in prolog.

    Hi All,
    Currently i m doing some practice on JSTL and following few examples from this link http://java.sun.com/developer/technicalArticles/javaserverpages/faster/
    while doing xml-ex1.jsp
    This is xml-ex1.jsp code
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
    <html>
    <head>
    <title>JSTL Support for XML</title>
    </head>
    <body bgcolor="#FFFFCC">
    <h3>Books Info:</h3>
    <c:set var="xmltext">
    <books>
    <book>
    <title>Book Title A</title>
    <author>A. B. C.</author>
    <price>17.95</price>
    </book>
    <book>
    <title>Book Title B</title>
    <author>X. Y. Z.</author>
    <price>24.99</price>
    </book>
    </books>
    </c:set>
    <x:parse xml="${xmltext}" var="output"/>
    <b>The title of the first book is</b>:
    <x:out select="$output/books/book[1]/title"/>
    <br>
    <b>The price of the second book</b>:
    <x:out select="$output/books/book[2]/price"/>
    </body>
    </html>
    While running jsp page i m getting follwing error
    SEVERE: Servlet.service() for servlet jsp threw exception
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
         at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSource(ParseSupport.java:227)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseInputSourceWithFilter(ParseSupport.java:193)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseReaderWithFilter(ParseSupport.java:199)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.parseStringWithFilter(ParseSupport.java:206)
         at org.apache.taglibs.standard.tag.common.xml.ParseSupport.doEndTag(ParseSupport.java:138)
         at org.apache.jsp.jsp.xml_002dex1_jsp._jspx_meth_x_parse_0(org.apache.jsp.jsp.xml_002dex1_jsp:152)
         at org.apache.jsp.jsp.xml_002dex1_jsp._jspService(org.apache.jsp.jsp.xml_002dex1_jsp:70)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at
    NOTE :- I m using Tomcat 5.5.14 .
    Please help me out how to resolve this problem
    Thanks & Regards
    Rupesh Kumar

    From what I understand, it has nothing to do with your JSP and all to do with the XML it's supposed to parse. It sounds malformed. Check the first tag.

  • Org.xml.sax.SAXParseException: Missing whitespace before SYSTEM literal URI

    Hi
    I've written a Java web service using WLW7.0.1. I now want to test it using SOAP
    RPC from a Java client. Having written the client, I get a "org.xml.sax.SAXParseException:
    Missing whitespace before SYSTEM literal URI" exception when I run it.
    Has anyone else come across this exception, or am I missing something glaringly
    obvious?!!!
    Thanks
    Tim

    Hi Tim,
    Could you post the entire traceback?
    Also, you might try the verify utility against the WSDL just as a check:
    http://webservice.bea.com/wsdlVerify.zip
    You are using clientgen to build the client?
    HTHs,
    Bruce
    Tim Dickson wrote:
    >
    Hi
    I've written a Java web service using WLW7.0.1. I now want to test it using SOAP
    RPC from a Java client. Having written the client, I get a "org.xml.sax.SAXParseException:
    Missing whitespace before SYSTEM literal URI" exception when I run it.
    Has anyone else come across this exception, or am I missing something glaringly
    obvious?!!!
    Thanks
    Tim

  • Org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bo

    Hi,
    When deploying the ADF aaplication in glassfish server getting error like,
    [#|2012-12-03T14:21:53.586+0530|INFO|glassfish3.1.2|oracle.j2ee.jsp|_ThreadID=22;_ThreadName=Thread-2;|unable to dispatch JSP page: The following exception occurred:.
    oracle.jsp.parse.JspParseException:
    Error: Validator com.sun.faces.taglib.jsf_core.CoreValidator reports:
    org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bound.
         at oracle.jsp.parse.OracleJsp2Java.reportValidationMsgs(OracleJsp2Java.java:777)
         at oracle.jsp.parse.OracleJsp2Java.invokeValidator(OracleJsp2Java.java:755)
         at oracle.jsp.parse.OracleJsp2Java.checkJspTagLibValidator(OracleJsp2Java.java:653)
         at oracle.jsp.parse.OracleJsp2Java.transformImpl(OracleJsp2Java.java:522)
         at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:593)
         at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:691)
         at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:490)
         at oracle.jsp.runtimev2.JspPageCompiler.parseAndGetTreeNode(JspPageCompiler.java:457)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:624)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:645)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:385)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:810)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:734)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:807)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:671)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:505)
         at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:476)
         at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:355)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:305)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:167)
         at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:363)
         at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.buildView(ViewDeclarationLanguageFactoryImpl.java:341)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:990)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:236)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at com.ge.ohr.dm.ui.sessionHandler.GEDMSessionExpiryHandler.doFilter(GEDMSessionExpiryHandler.java:61)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
         at com.ge.ohr.dm.ui.filter.GEDMSecurityFilter.doFilter(GEDMSecurityFilter.java:173)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    The code which in .jspx page is like;
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns="http://www.w3.org/1999/xhtml">
    <c:set var="gedmuiBundle" value="#{adfBundle['com.ge.ohr.dm.ui.UIBundle']}"/>
    When including the 'xmlns:c="http://java.sun.com/jsp/jstl/core' it shows the error;
    The server encountered an internal error (OracleJSP error: oracle.jsp.parse.JspParseException: <br>Error: Validator com.sun.faces.taglib.jsf_core.CoreValidator reports:<br>org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bound.<br>) that prevented it from fulfilling this request.
    Please help me on this.
    Thanks and Regards
    Binsy

    This is an ADF application, so you will probably find more help in the JDeveloper and ADF forum here:
    JDeveloper and ADF
    Best Regards,
    Chris

  • Org.xml.sax.SAXParseException: Reference is not allowed in prolog

    Hi,
    I have been using DocumentBuilder to parse an xml string in our application but now came up with this exception:
    org.xml.sax.SAXParseException: Reference is not allowed in prolog
    When I looked at the xml data, I found that it does not have a prolog in it. I also found that the data contains end of line character ""&#xD;""
    " in it.
    This the xml to be parsed: (Qutoted them to view the unicodes in xml)
    "<dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:title xml:lang="en">Test metadata</dc:title>
    <dc:language>en</dc:language>
    <dc:description xml:lang="en">Blah</dc:description>
    <dc:creator>BEGIN:vcard
    FN:Jan Austin
    ORG:IBalahblahLtd
    EMAIL:[email protected]
    END:vcard</dc:creator>
    <dc:format>text/html</dc:format>
    <dc:identifier>http://gg.com/</dc:identifier>
    <dc:subject>Medicine and Dentistry</dc:subject>
    </dc:dc>"
    And in the class, I used,
    DocumentBuilderFactory factory =  DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(file);I can not change the xml data to be parsed as the application gets this data from other targets through a web service.
    So, can anyone provide any suggestions to solve this issue please?
    Thanks,
    Shiv.

    I have tried various options by
    1. factory.setIgnoringElementContentWhitespace(true);
    2. factory.setValidation(false);
    But, none of them seems to work.
    Could anyone please giv me atleast a gist abt where to look about?
    Cheers,
    Shiv.

  • Org.xml.sax.SAXParseException: Content is not allowed in prolog Error

    Hello,
    this is pratap.<br>
    i was trying rules using decision tables with 'call charges' example<br>.
    after filling the text fields i am getting an error org.xml.sax.SAXParseException: Content is not allowed in prolog<br>.
    Can any one please tell me what are the reasons for this error and how to correct it<br>.
    thank you.

    Problem solved.There was some problem in xml file i corrected it and it worked.Sorry for asking silly question.

  • Detecting transform errors when using org.xml.sax.XMLFilter

    I am using javax.xml.transform.sax.SAXTransformerFactory.newXMLFilter to transform xml against a pipeline of stylesheets (See function testPipelineTransform in the example below). The process works okay, excepting that I cannot figure out how to detect errors in the transformation process.
    I would like to achieve the same result for the pipeline process as I would for a single transformation using javax.xml.transform.Transformer.setErrorListener. The example below demonstrates how the call to javax.xml.transform.Transformer.setErrorListener does not generate the same result when using org.xml.sax.XMLFilter as it does when using a single transformation.
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.SAXException;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.xml.sax.XMLFilter;
    import javax.xml.transform.ErrorListener;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.*;
    public class FilterChain {
        static private final String newline = System.getProperty("line.separator");
         public static void main(String argv[]) {
              System.out.println("Testing pipeline transform");
              testPipelineTransform();
              System.out.println("Testing single transform");
              testXsltSingleTransform();
         } // main
         static private void testPipelineTransform() {
              try {
                   // Set up the input stream
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   InputSource input = new InputSource(bis);
                   // Set up to read the input file
                   SAXParserFactory spf = SAXParserFactory.newInstance();
                   SAXParser parser = spf.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   // Create the filters
                   SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory
                             .newInstance();
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   XMLFilter filter2 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet2())));
                   // Wire the output of the reader to filter1
                   // and the output of filter1 to filter2
                   filter1.setParent(reader);
                   filter2.setParent(filter1);
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   // Set up the transformer to process the SAX events generated
                   // by the last filter in the chain
                   Transformer transformer = stf.newTransformer();
                   transformer.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(filter2, input);
                   transformer.transform(transformSource, result);
              } catch (TransformerConfigurationException tce) {
                   // Error generated by the parser
                   System.out.println("\n** Transformer Factory error");
                   System.out.println("   " + tce.getMessage());
                   // Use the contained exception, if any
                   Throwable x = tce;
                   if (tce.getException() != null)
                        x = tce.getException();
                   x.printStackTrace();
              } catch (TransformerException te) {
                   // Error generated by the parser
                   System.out.println("\n** Transformation error");
                   System.out.println("   " + te.getMessage());
                   // Use the contained exception, if any
                   Throwable x = te;
                   if (te.getException() != null)
                        x = te.getException();
                   x.printStackTrace();
              } catch (SAXException sxe) {
                   // Error generated by this application
                   // (or a parser-initialization error)
                   Exception x = sxe;
                   if (sxe.getException() != null)
                        x = sxe.getException();
                   x.printStackTrace();
              } catch (ParserConfigurationException pce) {
                   // Parser with specified options can't be built
                   pce.printStackTrace();
         static private void testXsltSingleTransform() {
              try {
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   InputSource input = new InputSource(bis);
                   TransformerFactory factory = TransformerFactory.newInstance();
                   Source source = new StreamSource(new StringReader(getStylesheet2()));
                   Transformer stylesheet = factory.newTransformer(source);
                   stylesheet.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(input);
                   stylesheet.transform(transformSource, result);
              } catch (Exception exc) {
                   exc.printStackTrace();
         private static String getStylesheet1() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='xml'/>" + newline
                   + "<xsl:template match='/'>" + newline
                   + "<DontCareAboutContent></DontCareAboutContent>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getStylesheet2() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='html'/>" + newline
                   + "<xsl:template match='/'>" + newline
                  + "<html><body>" + newline
                 + "<xsl:message>" + newline
                 + "Error Message for the xslt processor" + newline
                 + "</xsl:message>" + newline
                 + "Dont care about the xslt content," + newline
                 + "The only significant part is the xsl:message element" + newline
                 + "which results in a error to be handled by the xslt" + newline
                 + "processor" + newline
                   + "</body></html>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getExample() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<DontCareAboutContent>" + newline
                   + "</DontCareAboutContent>" + newline;
    }

    I made the following change which solves the problem but the sollution is tightly coupled to Xalan. If anyone has any ideas, I would still like to find a way to achieve the desired result using JAXP API's.
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   if (filter1 instanceof org.apache.xalan.transformer.TrAXFilter) {
                        ((org.apache.xalan.transformer.TrAXFilter)filter1).getTransformer().setErrorListener(...);
    ...

  • Org.xml.sax.SAXParseException: White spaces are required between publicId

    Hi,
    Im migrating an application from weblogic to tomcat 5.5.23 with java 1.5. application involved PDF generation using xalan.jar for transformation. tht pdf generation part is not working in tomcat. Im getting a "org.xml.sax.SAXParseException: White spaces are required between public-Id and system id" error.
    so i replaced the old xalan.jar with latest one ( xalan 2.7.1 ) still no use. I have also explicitly defined the property "javax.xml.transform.TransformerFactory" to "org.apache.xalan.processor.TransformerFactoryImpl" still getting the same exception.
    plz help
    Thanks in Advance.

    I have had good results using JTidy to parse HTML into a DOM.

  • Org.xml.sax.SAXException: Deserializing parameter

    Hi,
    I am trying to consume a webservice using axis. I am using Spring to call the webservice. When i am doing this i am able to get a response XML, but unfortunately there was an error stating deserializing of the object is failed.
    Here are my logger statements.
    **DEBUG 12:29:52,099 [TP-Processor23] org.apache.axis.transport.http.HTTPSender - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><counterResponse xmlns="http://www.example.org/vantage/"><checkBox xmlns="">true</checkBox><terms xmlns="">oh my god... check box is clicked ..</terms></counterResponse></soapenv:Body></soapenv:Envelope>** DEBUG 12:29:52,105 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(exit00)
    DEBUG 12:29:52,110 [TP-Processor23] org.apache.axis.transport.http.HTTPSender - Exit: HTTPDispatchHandler::invoke
    DEBUG 12:29:52,115 [TP-Processor23] org.apache.axis.SimpleChain - Exit: SimpleChain::invoke
    DEBUG 12:29:52,120 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(semanticCheck00)
    DEBUG 12:29:52,126 [TP-Processor23] org.apache.axis.handlers.soap.MustUnderstandChecker - Doing SOAP semantic checks...
    DEBUG 12:29:52,131 [TP-Processor23] org.apache.axis.SOAPPart - Enter: SOAPPart::getAsSOAPEnvelope()
    DEBUG 12:29:52,136 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(currForm)
    DEBUG 12:29:52,141 [TP-Processor23] org.apache.axis.SOAPPart - current form is FORM_SOAPENVELOPE
    DEBUG 12:29:52,147 [TP-Processor23] org.apache.axis.client.AxisClient - Exit: AxisClient::invoke
    DEBUG 12:29:52,152 [TP-Processor23] org.apache.axis.SOAPPart - Enter: SOAPPart::getAsSOAPEnvelope()
    DEBUG 12:29:52,157 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(currForm)
    DEBUG 12:29:52,162 [TP-Processor23] org.apache.axis.SOAPPart - current form is FORM_SOAPENVELOPE
    DEBUG 12:29:52,167 [TP-Processor23] org.apache.axis.client.Call - Exit: Call::invoke()
    DEBUG 12:29:52,171 [TP-Processor23] org.apache.axis.SOAPPart - Enter: SOAPPart::getAsSOAPEnvelope()
    DEBUG 12:29:52,176 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(currForm)
    DEBUG 12:29:52,181 [TP-Processor23] org.apache.axis.SOAPPart - current form is FORM_SOAPENVELOPE
    DEBUG 12:29:52,191 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
    DEBUG 12:29:52,197 [TP-Processor23] org.apache.axis.encoding.DeserializationContext - Pushing handler org.apache.axis.message.RPCHandler@f81d1c
    DEBUG 12:29:52,201 [TP-Processor23] org.apache.axis.encoding.DeserializationContext - Enter: DeserializationContext::startPrefixMapping(, http://www.example.org/vantage/)
    DEBUG 12:29:52,206 [TP-Processor23] org.apache.axis.utils.NSStack - NSPush (32)
    DEBUG 12:29:52,211 [TP-Processor23] org.apache.axis.utils.NSStack - NSPush (32)
    DEBUG 12:29:52,215 [TP-Processor23] org.apache.axis.encoding.DeserializationContext - Exit: DeserializationContext::startPrefixMapping()
    DEBUG 12:29:52,220 [TP-Processor23] org.apache.axis.encoding.DeserializationContext - Enter: DeserializationContext::startElement(http://www.example.org/vantage/, counterResponse)
    DEBUG 12:29:52,225 [TP-Processor23] org.apache.axis.message.RPCHandler - Enter: RPCHandler.onStartChild()
    DEBUG 12:29:52,231 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(typeFromAttr00)
    DEBUG 12:29:52,236 [TP-Processor23] org.apache.axis.message.RPCHandler - Type from attributes is: null
    DEBUG 12:29:52,245 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(noDeser01)
    DEBUG 12:29:52,250 [TP-Processor23] org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(exception00)
    ERROR 12:29:52,255 [TP-Processor23] org.apache.axis.client.Call - Exception:
    org.xml.sax.SAXException: Deserializing parameter 'counterResponse': could not find deserializer for type {http://www.example.org/vantage/}counterResponse
    at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
    at org.apache.axis.client.Call.invoke(Call.java:2467)
    Any small help is most appreciated.

    If you have not specified an external WSDL file in your webservice where the arguments (with their types are defined) then you cannot use the type="any" in your webservice arguments.
    If you want to use an external WSDL and define the argument types there you can do this by adding wsdlfile="nameOfExternal.wsdl" style="document" to your cfcomponent tag.

Maybe you are looking for

  • Problem regarding bpm message split scenario

    hi experts, iam doing a scenario file->bpm->file scenario msg->msg1+msg2 message will be split like this my second msg is logically deleted from system.i found this in PE of sxmb_moni i got only the first part of the splitting. start->receive->transf

  • Where can I download Boot Camp Assistant 3.3?

    The version that comes with a fresh install of Snow Leopard is 3.04.  I plan to install Windows 7.

  • How can I use a column header to select columns in a JTable?

    Hello, I've been working for ages on this, but I still can't come up with a suitable solution. What I want to be able to do is select a column header from a JTable, which in turn would select the corresponding column in my JTable. I cant seem to do t

  • Search Form Problem

    Hi I have a Form name BPRESTATARIAS with two blocks. A block BUSCAR that has a text item BUSCAR. And another block PRESTATARIAS with origin of data in the table PRESTATARIAS. SQL> desc prestatarias Name Null? Type CODIGO_PRESTATARIA NOT NULL NUMBER(6

  • When transfering domain file to new computer, error "missing index.xml"

    I've been making a podcast using iWeb on my home computer, and I wanted to transfer my site over to a school computer. I did what the iWeb help said and transfered the Domain file to the exact same folder on the school computer. When I opened iWeb, i