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.

Similar Messages

  • 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: 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.

  • Content is not allowed in Prolog error while configuring File to Mail

    Hi Expert,
    I have a scenario where I have to pick up a file from FTP using sender File adapter and send this file as an attachment using Receiver Mail adapter.
    There are 3 requirements :
    1) File name of the attachment in the Mail should be same as the File picked from FTP.
    2) The Mail content should be "Please find attached the <Filename> for your reference.
         i.e The content has to be dynamic
    3) Subject of the Mail should be dynamic e.g : Apple_<Filename>
    I am facing the following issues :
    1. Since single File is picked up,the file is going as an payload and not as an attachment.As a result when i am doing message mapping,i am getting the error saying "Content is not allowed in prolog" in SXMB_MONI or Runtime workbench.
    2. Since we have dynamic requirements, i have to Use "Use Mail Package" option.It implies that i have to use Message Mapping.But if i use Message Mapping,i get the error "Content is not allowed in prolog".
    I understand that most of the experts would ask me to write UDF's, but if i use UDF i am getting the "Content is not allowed in prolog" error.
    Thanks
    Saurabh

    Hi Saurabh
    Try using PayloadSwapBean:
    http://help.sap.com/saphelp_nw70/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm
    "Content is not allowed in prolog" could be caused by some encoding issue.
    Regards,
    Giuseppe

  • WavesetException: XML Error: 1:1: Content is not allowed in prolog. error

    What gives?
    I have turned the exception trace on (why it is not on by default is a surprise) and when I try to create a standard Weekly Audit Report, (Activity this Week) I now get to see this exception.
    How on earth can IdM generate a badly formed XML report/document!?
    When I try to generate a Weekly Activity report, Idm reports to the screen that the Task is complete and then bombs out with the following exception, showing NullPointerError message on the screen.
    What chances are there of trapping where in Idm this fault lies?
    [#|2011-11-16T15:18:44.609+0200|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=94;_ThreadName=Thread-2;|WavesetException: XML Error: 1:1: Content is not allowed in prolog.|#]
    [#|2011-11-16T15:18:44.612+0200|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=94;_ThreadName=Thread-2;|com.waveset.util.XmlParseException: XML Error: 1:1: Content is not allowed in prolog.
    at com.waveset.util.WavesetException.checkBreakpoint(WavesetException.java:508)
    at com.waveset.util.WavesetException.<init>(WavesetException.java:109)
    at com.waveset.util.XmlParseException.<init>(XmlParseException.java:61)
    at com.waveset.util.XmlParser.wrapException(XmlParser.java:927)
    at com.waveset.util.XmlParser.parseString(XmlParser.java:561)
    at com.waveset.util.XmlUtil.parseString(XmlUtil.java:441)
    at com.waveset.util.XmlObjectFactory.create(XmlObjectFactory.java:322)
    at com.waveset.util.XmlObjectFactory.create(XmlObjectFactory.java:302)
    at com.waveset.rpc.ActivityStatusServlet.getTaskStatus(ActivityStatusServlet.java:426)
    at com.waveset.rpc.ActivityStatusServlet.getTaskStatus(ActivityStatusServlet.java:403)
    at com.waveset.rpc.ActivityStatusServlet.processRequest(ActivityStatusServlet.java:360)
    at com.waveset.rpc.ActivityStatusServlet.doGet(ActivityStatusServlet.java:262)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at com.sun.idm.profiler.instrumentation.RequestTimingFilter.doFilter(RequestTimingFilter.java:76)
    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.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)
    |#]

    Hi Anoop / Ilayarajan,
    Could you please post the solution for this error. When I provision a user to PeopleSoft, I am getting similar error: com.waveset.util.WavesetException: An error occurred adding user "userID' to resource 'PeopleSoft Component Interface'. com.waveset.util.XmlParseException: XML Error: 1:1: Content is not allowed in prolog.
    Thanks
    User_idm

  • Org.jdom.input.JDOMParseException: Content is not allowed in Prolog.

    I got the above error. I am trying to save my query xml file in my tempdir (under local settings)..done that by using file.createTempFile() method in java. To my surprise, when my xml file is stored in my current dir, it is reading it well and processing the queries in it and generating the output xml file..all is well then. But, when I am saving my query xml file in the tempdir, it is throwing that error. But, if i cut and paste the same file to my current dir, it is working fine!!! Can anyone just help me out regarding this..I am literally going bonkers. Thanks a lot.

    I am trying to get the absolute path of the file and passing it to read for my business logic class. is it something to do with the path i m passing ? cuz, other than that, i dont see any difference when the file's there in current dir and worked perfect and now when its there in the tempdir ( by createtempdir).

  • [Fatal Error] :1:1: Content is not allowed in prolog. ..XML READ ERROR

    Hi I am developing an application where it will read xml elements from the http site (http://www.w3schools.com/Xml/note.xml) and display in my program using DOM. while executing its giving CONTENT IS NOT ALLOWED IN PROGRAM below error. but when i am use coded xml in program itself as comment as shown in program its giving correct value. I need to read from http not from coded xml in the program. its immediate please help me out.
    [Fatal Error] :1:1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at SimpleXML1.main(SimpleXML1.java:34)
    import javax.xml.parsers.*;
    import org.xml.sax.InputSource;
    import org.w3c.dom.*;
    import java.io.*;
    public class SimpleXML1 {
    public static void main(String arg[]) {
    String xmlRecords = "http://www.w3schools.com/Xml/note.xml";
    /* String xmlRecords =
    " <note>" +
    " <to>John</to>" +
    " <from>Manager</from>" +
    " <heading>XML Program</heading>" +
    " <body>Simple XML</body>" +
    "</note>";*/
    try {
    DocumentBuilderFactory dbf =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    InputSource is = new InputSource();
    is.setCharacterStream(new StringReader(xmlRecords));
    Document doc = db.parse(is);
    NodeList nodes = doc.getElementsByTagName("note");
    for (int i = 0; i < nodes.getLength(); i++) {
    Element element = (Element) nodes.item(i);
    NodeList from = element.getElementsByTagName("from");
    Element line = (Element) from.item(0);
    Node child1 = line.getFirstChild();
    CharacterData cd = (CharacterData) child1;
    System.out.println(cd.getData());
    catch (Exception e) {
    e.printStackTrace();
    }

    chrisacess wrote:String xmlRecords = "http://www.w3schools.com/Xml/note.xml";
    /* snip */
    is.setCharacterStream(new StringReader(xmlRecords));
    Is that really how you're trying to read the online XML document? Because I don't see anything that makes a connection to the site. All you're doing is trying to parse the string "http://www.w3schools.com/Xml/note.xml" is if it were XML.
    ps, That "Content not allowed in prolog" error message is worse than useless IMO. They might as well say "It didn't work" for all the good does.

  • Trying to create a pdf with jasper - Content is not allowed in prolog

    hi all,
    Im trying to create a pdf file with jasper reports but i get this error message:
    29/11/2007 16:52:03 org.apache.commons.digester.Digester fatalError
    SEVERE: 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:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:899)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
         at org.apache.commons.digester.Digester.parse(Digester.java:1666)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.loadXML(JRPrintXmlLoader.java:151)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.load(JRPrintXmlLoader.java:103)
         at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1376)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:243)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:214)
         at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:140)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:397)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:328)
         at br.com.abril.contratos.Gerar.geraRelatorio(Gerar.java:38)
         at br.com.abril.contratos.Gerar.main(Gerar.java:47)

    cause of the error:
    After some extensive research on the web, it is found that that you are using an UTF-8 encoded file with byte-order mark (BOM). Java doesn't handle BOMs on UTF-8 files properly, making the three header bytes appear as being part of the document. UTF-8 files with BOMs are commonly generated by tools such as Window's Notepad. This is a known bug in Java, but it still needs fixing after almost 8 years...
    There are some hexadecimal character at the begining of the file, which is giving error"content not allowed in prolog". No solution is provided for this till now.
    Example: suppose your file start with <?xml version="1.0" encoding="utf-8"?>. you will see this in a editor. But if you open this file with any hexadecimal editor you will find some junk character in the start of the file.that is causing the problem
    solution:
    1) convert your file into a string and then read the file from the forst character that in my case the first character will be "<".so the junk character will not be there in the string and then again convert it into a file.
    2) some people are able to solve this problem by changing the "utf-8" to "utf-16". remember only in some case. some times this problem also exits in "utf-16" file.
    3) some are able to solve this problem by changing the LANG to US.en.
    4) If the first three bytes of the file have hexadecimal values EF BB BF then the file contains a BOM.so you can also handle by your own.
    5)Download a hexadecimal editor and remove the BOM.
    6) In case you are not able to think furthe then please to more research in internet may be you find some other solution to this problem. But These solution are some type of hack not exactly a solution.

  • [Fatal Error] :1:1: Content is not allowed in prolog.

    I'm trying to compare an XML file to an XSLT generated file from that XML file, and when I run the the class as a JUnit Test, I get the following:
    [Fatal Error] :1:1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
         at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
         at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
         at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:352)
         at org.custommonkey.xmlunit.XMLUnit.buildDocument(XMLUnit.java:339)
         at org.custommonkey.xmlunit.XMLUnit.buildControlDocument(XMLUnit.java:283)
         at org.custommonkey.xmlunit.Diff.<init>(Diff.java:116)
         at org.custommonkey.xmlunit.examples.MyXMLTestCase.testXSLTransformation(MyXMLTestCase.java:70)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at junit.framework.TestCase.runTest(TestCase.java:164)
         at junit.framework.TestCase.runBare(TestCase.java:130)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:120)
         at junit.framework.TestSuite.runTest(TestSuite.java:230)
         at junit.framework.TestSuite.run(TestSuite.java:225)
         at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Any ideas?

    In my experience, "Content is not allowed in prolog" usually means your XML file is stored in the UTF-8 encoding with a BOM. Java's UTF-8 Charset doesn't recognize the UTF-8 BOM; it decodes it and passes it along like any other character, then the XML parser chokes on it.
    To get rid of the BOM you can open the XML file in a text editor and (depending on the editor) either (1) save the file as UTF-8 without BOM, or (2) switch to hexadecimal and delete the first three bytes (EF, BB, BF).

  • [Fatal Error] :1:2: Content is not allowed in prolog.

    I am trying to parse input stream i amgetting this error please help me
    [Fatal Error] :1:2: Content is not allowed in prolog.
    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 javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
         at it.Test.DomParserExample.parseXmlFile(DomParserExample.java:90)
         at it.Test.DomParserExample.getParsedXml(DomParserExample.java:50)
         at it.sella.dbu.helper.DaoHelper.parseClobData(DaoHelper.java:28)
         at it.Test.ClobTest.getRequestView(ClobTest.java:122)
         at it.Test.ClobTest.main(ClobTest.java:30)
    Exception in thread "main" java.lang.NullPointerException
         at it.Test.DomParserExample.parseDocument(DomParserExample.java:104)
         at it.Test.DomParserExample.getParsedXml(DomParserExample.java:52)
         at it.sella.dbu.helper.DaoHelper.parseClobData(DaoHelper.java:28)
         at it.Test.ClobTest.getRequestView(ClobTest.java:122)
         at it.Test.ClobTest.main(ClobTest.java:30)
    Message was edited by:
    raj25amigo

    Thanks buddy ..it was a malformed XML i missed out a tag

  • 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)

  • 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.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: 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?

  • The taglib validator rejected the page: "org.xml.sax.SAXParseException

    Hi,
              I've deployed a webapplication on weblogic 8.1 SP3. I get the following error, when running my application:
              java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed., "
                   at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:130)
                   at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
                   at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:388)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:238)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:188)
                   at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:535)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:373)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
                   at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:312)
                   at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
                   at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
                   at com.sun.jsfcl.app.ViewHandlerImpl.renderView(ViewHandlerImpl.java:169)
                   at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
                   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
                   at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
                   at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
              The code of my jsp-page is:
              <?xml version="1.0" encoding="UTF-8"?>
              <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
              <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
              <f:view>
              <html lang="nl-BE" xml:lang="nl-BE">
              <head>
              <meta content="no-cache" http-equiv="Cache-Control"/>
              <meta content="no-cache" http-equiv="Pragma"/>
              <title>OltbHomePage Title</title>
              <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
              </head>
              <body style="-rave-layout: grid">
              <h:form binding="#{OltbHomePage.form1}" id="form1">
              <div style="left: 0px; top: 0px; position: absolute; height:580px">
              <jsp:directive.include file="OltbMenu.jspf"/>
              </div>
              <div style="left: 180px; top: 0px; position: absolute; height:50px">
              <jsp:directive.include file="OltbStatus.jspf"/>
              </div>
              <div style="height: 530px; left: 120px; top: 50px; position: absolute; width: 900px">
              <iframe name="OltbMain" src="" style="left: 0px; top: 10px; position: absolute; height:510; width:890"></iframe>
              </div>
              </h:form>
              </body>
              </html>
              </f:view>
              </jsp:root>
              When I open a simple jsp-page, it works fine...
              Thx in advance
              Ann

    Make sure there's no whitespace prior to <?xml version="1.0" encoding="UTF-8"?>, or do away with it completey.
              Kris

Maybe you are looking for

  • Is there a default maximum memory allocation ?

    Hi, I would like to ask if there is a default maximum memory allocation in the virtual machine? I know there are params for setting the initial und maximum size but I'm not sure if the vm will take as much memory as I have in my computer or not. than

  • How to search for a number located anywhere in string

    I am trying to search a string for a number (integer or float) without knowing its index in the string and to extract it - whether in numeric or string format.  e.g. "the number 52.63 appears in this string"; I want to extract/identify "52.63" The fu

  • API with external system

    Hi, I have to develop API with external system through messages. This is new to me. Could anyone help me how to do this? Thanks, Ashok.

  • Non functional alpha numeric pad.

    The numeral portion of my alpha numeric pad stopped inputting. Only the numerals don't work other symbols are still functioning. Older iMac Intel, Bluetooth keyboard.

  • About DBMS_SYSTEM package

    HI, every one. Environment Oracle9.2 I just want to use DBMS_SYSTEM.set_ev, when I called dbms_system.set_ev(9, 437, 10046, 8, 'scott') successful, but no .trc file genterated. Why?