Parse Exception with JAXP....

Hi.....
When I use JAXP to parse the next xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Login SYSTEM "login.dtd">
<Login>
<username>tony</username>
<password>abc123</password>
</Login>
It will throw SAXParseException: 'No such related URI "login.dtd"'
/* code */
Document doc = null;
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource src = new InputSource(new BufferedReader(new FileReader(new File("classes/xml/file/login.xml"))));
doc = db.parse(src);
But If I change the InputSource into File it will run well:
/* code */
File docFile = new File("classes/xml/file/login.xml");
Document doc = null;
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
doc = db.parse(docFile );
If I need to parse xml messages from remote server, it means the message can't be changed and it don't exist in any file. How to parse the message with 'InputSource' or other? How to ignore "<!DOCTYPE Login SYSTEM "login.dtd">" in the message when parsing?

I tried use EntityResolver but it didn't work.
I just want the message to be parsed. And the message is got from remote server, so I don't need to read the dtd file.
How to prevent DTD from being accessed?
I use MyResolver class to setEntityResolver, but it didn't work .....
class MyResolver implements EntityResolver {
public InputSource resolveEntity(String publicId, String systemId) {
StringReader strReader = new StringReader("This is a custom entity");
if (systemId.equals("login.dtd") {
System.out.println("Resolving entity: " + systemId);
return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
} else {
return null;
Please help!!!!!

Similar Messages

  • Cursor Parse Exception With OCI Drivers

    I am getting the following Error if I call an Oracle Function with two
    Params. Based on the values of parameters the where clause is changed but
    returns the same Resultset. If I already have called the fucntion once and
    then pass different values to the parameters I get the following erros.
    I am closing the Connection, Resultset, and Callable statement at the end of
    my call to the Function.
    I am using OCI Drivers
    I am using Bind Variables in Oracle Function.
    Here is the Error
    Label Code is SMOCONTESTS
    java.sql.SQLException: ORA-01475: must reparse cursor to change bind
    variable da
    tatype
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:238)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:869)
    at weblogic.jdbcbase.oci.Statement.execute(Statement.java:1364)
    at
    weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:4
    5)
    at
    weblogic.jdbc.rmi.internal.PreparedStatementImpl.execute(PreparedStat
    ementImpl.java:289)
    at
    weblogic.jdbc.rmi.SerialPreparedStatement.execute(SerialPreparedState
    ment.java:398)

    Make sure ORACLE_HOME is properly set in your environment.
    Also WLS is not able to find the library in PATH env variable.
    Otherwise do this
    java -Djava.library.path=$WL_HOME/bin/oci815_8 etc. etc.. weblogic.Server
    where WL_HOME is your weblogic installation directory and i assume you want to
    use oci815 or load the
    appropriate dll.
    Hope this helps
    Let us know if you still see problems.
    Kumar
    Lee Mei Wah wrote:
    Hi
    I've the problem of creating the oracle connection pool wtih error
    message:
    java.sql.SQLException: System.loadLibrary threw
    java.lang.UnsatisfiedLinkError with the
    message 'no weblogicoci36 in java.library.path'.
    I'm running Weblogic 5.1 and oracle8.0.5 on NT.
    Has anyone got a solution for that?
    Lee
    "Jennifer Yang" <[email protected]> wrote in message
    news:3998a1d1$[email protected]..
    I was running batch update example, and I ran into the same problem, buton
    NT.
    What do I need to do?
    We are using WebLogic 5.1
    Jennifer
    "Kelvin Yip" <[email protected]> wrote in message
    news:3994602b$[email protected]..
    I think you may have followed their documentation and it is wrong. You
    may
    have set your LD_LIBRARY_PATH to
    oci80x_x but you should look for ...weblogic/lib/soloris/oci80x_xinstead.
    You are picking up the NT dll not the soloris so.
    "Sudharsan Srinivasan" <[email protected]> wrote in message
    news:39919e36$[email protected]..
    Hi I'm using the WebLogic's driver. It is giving the following error
    when
    I try to start the connection pool.
    "<JDBC Pool> Failed to create connection pool "oraclePool"
    <JDBC Pool> weblogic.common.ResourceException:
    weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: System.loadLibrary threwjava.lang.UnsatisfiedLinkError
    with the message 'no weblogicoci34 in java.library.path'."
    I'm running WebLogic 4.5.2 and I have setup the LD_LIBRARY_PATH.
    Thanks in advance.
    -Sudharsan.

  • Parse exception with french characters

    My parsing program throws a SaxParseException upon the parse of some french characters; in particular a "�" character. These characters are enclosed in a CDATA tag, so I'm not sure why its being parsed. My file is encoded in UTF-8. How can resolve this problem? Thanks
    org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence.
         at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
         at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
         at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:172)

    Your file is not encoded in UTF-8, although the XML
    prolog claims it is.Meaning the sender/creator of the file is at fault?
    If not UTF-8, then probably ISO-8859-1, correct?Most likely the creator of the file is at fault. But it's possible that it has been through some transformation between them and you that rewrote it in a new charset.
    Sure, the real encoding could be ISO-8859-1. Or it could be windows-1252. Other encodings are possible but unlikely, I suppose.

  • Parser-independent document creation with JAXP?

    Is it possible to do the following in a parser-independent
    way with JAXP apis? Thanks
    DOMImplementation domImpl =
    new org.apache.xerces.dom.DOMImplementationImpl();
    org.apache.xerces.dom.DocumentTypeImpl docTypeImpl
    = new org.apache.xerces.dom.DocumentTypeImpl(null, "bean", null, null);
    docTypeImpl.setInternalSubset(
    "<!ELEMENT bean (property*)>" + NL +
    "<!ELEMENT property (#PCDATA)>" + Format.NL +
    "<!ATTLIST bean className CDATA #REQUIRED>" + NL +
    "<!ATTLIST property type CDATA #REQUIRED>" + NL +
    "<!ATTLIST property name CDATA #REQUIRED>"
    Document doc = domImpl.createDocument(null, "bean", docTypeImpl);
    Element root = doc.getDocumentElement();
    // add elements etc.

    Hi,
    Its is possible thru the following code.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setValidating(true);
    dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();
    DOMImplementation domImpl = db.getDOMImplementation();
    DocumentType docType = domImpl.createDocumentType("PERSON",null,strSystemID);
    document = domImpl.createDocument(null,"STUDENT",docType);and use the javax.xml.transformer api to transform this in memory java dom object to xml.
    Regards / Rajan Kumar

  • XDK9.2.0.2, pb with JAXP and XSL Processor

    Hello,
    I'm using XDK 9.2.0.2 and I try to use JAXP.
    I have a difference between using the Oracle XSL processor directly and through JAXP.
    Through JAXP, the processor don't care about the xsl:outpout encoding attribute !
    Why ?
    It take care of method, indent, ... but not encoding !
    I try to set the property with : transformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
    It works but I don't want to do that this way !
    TIA
    Didier
    sample (from XSLSample2):
    /* $Header: XSLSample2.java 07-jan-2002.02:24:56 sasriniv Exp $ */
    /* Copyright (c) 2000, 2002, Oracle Corporation. All rights reserved. */
    * DESCRIPTION
    * This file gives a simple example of how to use the XSL processing
    * capabilities of the Oracle XML Parser V2.0. An input XML document is
    * transformed using a given input stylesheet
    * This Sample streams the result of XSL transfromations directly to
    * a stream, hence can support xsl:output features.
    import java.net.URL;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLDocument;
    import oracle.xml.parser.v2.XMLDocumentFragment;
    import oracle.xml.parser.v2.XSLStylesheet;
    import oracle.xml.parser.v2.XSLProcessor;
    // Import JAXP
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    public class XSLSample2
    * Transforms an xml document using a stylesheet
    * @param args input xml and xml documents
    public static void main (String args[]) throws Exception
    DOMParser parser;
    XMLDocument xml, xsldoc, out;
    URL xslURL;
    URL xmlURL;
    try
    if (args.length != 2)
    // Must pass in the names of the XSL and XML files
    System.err.println("Usage: java XSLSample2 xslfile xmlfile");
    System.exit(1);
    // Parse xsl and xml documents
    parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    // parser input XSL file
    xslURL = DemoUtil.createURL(args[0]);
    parser.parse(xslURL);
    xsldoc = parser.getDocument();
    // parser input XML file
    xmlURL = DemoUtil.createURL(args[1]);
    parser.parse(xmlURL);
    xml = parser.getDocument();
    // instantiate a stylesheet
    XSLProcessor processor = new XSLProcessor();
    processor.setBaseURL(xslURL);
    XSLStylesheet xsl = processor.newXSLStylesheet(xsldoc);
    // display any warnings that may occur
    processor.showWarnings(true);
    processor.setErrorStream(System.err);
    // Process XSL
    processor.processXSL(xsl, xml, System.out);
    // With JAXP
    System.out.println("");
    System.out.println("With JAXP :");
    TransformerFactory tfactory = TransformerFactory.newInstance();
    String xslID = xslURL.toString();
    Transformer transformer = tfactory.newTransformer(new StreamSource(xslID));
    //transformer.setOutputProperty(OutputKeys.ENCODING, "iso-8859-1");
    String xmlID = xmlURL.toString();
    StreamSource source = new StreamSource(xmlID);
    transformer.transform(source, new StreamResult(System.out));
    catch (Exception e)
    e.printStackTrace();
    My XML file :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ListePatients>
    <Patient>
    <Nom>Zeublouse</Nom>
    <NomMarital/>
    <Prinom>Agathe</Prinom>
    </Patient>
    <Patient>
    <Nom>Stick</Nom>
    <NomMarital>Laiboul</NomMarital>
    <Prinom>Ella</Prinom>
    </Patient>
    <Patient>
    <Nom>`ihnotvy</Nom>
    <NomMarital/>
    <Prinom>Jacques</Prinom>
    </Patient>
    </ListePatients>
    my XSL file :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" omit-xml-declaration="yes" indent="yes" encoding="ISO-8859-1"/>
    <xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
    <xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
    <xsl:template match="/">
    <HTML>
    <HEAD>
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <xsl:apply-templates select='ListePatients'/>
    </BODY>
    </HTML>
    </xsl:template>
    <xsl:template match='ListePatients'>
    <TABLE>
    <xsl:for-each select='Patient'>
    <xsl:sort select='Nom' order='ascending' data-type='text'/>
    <TR TITLE='`ihnotvy'>
    <TD><xsl:value-of select='Nom'/></TD>
    <TD><xsl:value-of select='NomMarital'/></TD>
    <TD><xsl:value-of select='Prinom'/></TD>
    </TR>
    </xsl:for-each>
    </TABLE>
    </xsl:template>
    </xsl:stylesheet>
    The result :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="`ihnotvy">
    <TD>`ihnotvy</TD>
    <TD></TD>
    <TD>Jacques</TD>
    </TR>
    <TR TITLE="`ihnotvy">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="`ihnotvy">
    <TD>Zeublouse</TD>
    <TD></TD>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    With JAXP :
    <HTML>
    <HEAD>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <TITLE>Liste de patients</TITLE>
    </HEAD>
    <BODY>
    <TABLE>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>C C)C(C.C/C4C6C9</TD>
    <TD></TD>
    <TD>Jacques</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Stick</TD>
    <TD>Laiboul</TD>
    <TD>Ella</TD>
    </TR>
    <TR TITLE="C C)C(C.C/C4C6C9">
    <TD>Zeublouse</TD>
    <TD></TD>
    <TD>Agathe</TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

    You can also use a PrintWriter to wrap a JspWriter
    since PrintWriter has a constructor that takes any
    Writer instance.I'm having the same problem, I've spent a lot of time
    on it but I can't get it work.
    Could you post some working code that shows how you
    can do it?
    Thanks.
    It works now, I have used the code:
    result = processor.processXSL(stylesheet, xml);
    PrintWriter pw = new PrintWriter(out);
    result.print(pw);
    I had tried this before but there was an error in other place that prevented it to work.
    Thank you anyway.

  • XML parser clashes with WL 5.1

    Hello,
    I see that this question has been asked before but I've seen no answer so
    far. We have code that requires an XML parser. We currently us
    jaxp/xerces/xalan. The version we use is more recent than the one
    included in WL5.1.9. Because of this, we are getting NoClassDefFound
    exceptions when deploying our apps. Or sometimes we get "No such method"
    exceptions. Is there a way, short of getting the sources to all our
    packages and changing the package name, to have more recent XMP parser
    coexist with those of WL?
    If not, what are the versions of the third-party jars bundled with WL
    5.1.9? Is that information documented somewhere? We may also try to
    back-port our code so it confirms to whatever version is included in WL.
    Thanks,
    L
    Laurent Duperval <mailto:[email protected]>
    La situation se cornélise à vue d'oeil!
    -Alambic Talon

    I have seen and dealt with this before.
    I had three versions of Xerces in my classpath. I find that I have to put
    the newest jar file in the front of the classpath. I had Xalan.jar and
    Xerces.jar followed by XML4J followed at the end by weblogicaux.jar and my
    application worked well. You can also make use of the WEB-INF/lib directory
    of your application though I didn't get down to that details and solved my
    methodNotFound problem by modifing the main Classpath.
    Hope that helps.
    IH
    "Laurent Duperval" <[email protected]> wrote in message
    news:3b1e30b6$[email protected]..
    Hello,
    I see that this question has been asked before but I've seen no answer so
    far. We have code that requires an XML parser. We currently us
    jaxp/xerces/xalan. The version we use is more recent than the one
    included in WL5.1.9. Because of this, we are getting NoClassDefFound
    exceptions when deploying our apps. Or sometimes we get "No such method"
    exceptions. Is there a way, short of getting the sources to all our
    packages and changing the package name, to have more recent XMP parser
    coexist with those of WL?
    If not, what are the versions of the third-party jars bundled with WL
    5.1.9? Is that information documented somewhere? We may also try to
    back-port our code so it confirms to whatever version is included in WL.
    Thanks,
    L
    Laurent Duperval <mailto:[email protected]>
    La situation se cornélise à vue d'oeil!
    -Alambic Talon

  • XML Parser Exception in Install of AIA 11.1.1.5 on SOA 11.1.1.5

    I am attempting to install AIA Foundation Pack on a SOA domain and continually encounter an XML parsing exception error as the installer is attempting to install WSM security policies. Here are the key details:
    AIA version = 11.1.1.5
    SOA Suite = 11.1.1.5
    WebLogic = 10.3.5
    Operating System = Fedora14 (a home lab machine but I don't think this is an OS issue)
    The error is encountered about 17 minutes into the lengthy process. Just before the error appears in the installation log, the following message appears indicating roughly what step is being performed:
    [zip] Building zip: /opt/oraclemw/aia11115/aia_instances/dev1/tmp/aia_security_policies.zip
    The core error messages are:
    [exec] SEVERE: WSM-01605 XML parser exception
    [exec] oracle.xml.parser.v2.XMLParseException: Expected 'EOF'.
    [exec] at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
    The python modules being executed by the WLST scripting tool at the time of the failure are:
    [exec] Problem invoking WLST - Traceback (innermost last):
    [exec] File "/opt/oraclemw/aia11115/Infrastructure/Install/AID/lib/py/importpolicy.py", line 29, in ?
    [exec] File "/opt/oraclemw/oracle_common/common/wlst/wsmManage.py", line 719, in importRepository
    [exec] File "/opt/oraclemw/oracle_common/common/wlst/lib/ora_util.py", line 51, in raiseScriptingException
    [exec] OracleScriptingException: None
    Finally, the outer XML files being used as input for the deployer that seems to be running at the time are:
    /opt/oraclemw/aia11115/Infrastructure/Install/AID/AIAExecuteDriver.xml
    with references to lines 221 and 64.
    The problem occurs whether I try to use Java JDK 16.0.20 or JRockit R28.2.0 as the JRE when running the AIA installer. (The WebLogic domain is configured to use JRockit).
    Any suggestions? Is there a library conflict being picked up between different releases of XercesImpl? I would hope there isn't actually a bad XML file in the AIA artifacts or WSM (Web Service Management) policies being deployed.

    HI
    How this issue was resolved? Please explain in detail. I am facing the same issue.
    Regards
    Arun

  • Parse Exception : java.text.ParseException: Unparseable date

    I have inherited a UDF in some mapping that on the whole, works okay...
    but it throws an error after mapping a few dates:
    Parse Exception : java.text.ParseException: Unparseable date: "2010-03-18T00:00:00.000Z"
    Parse Exception : java.text.ParseException: Unparseable date: "2010-03-23T23:59:00.000Z"
    Parse Exception : java.text.ParseException: Unparseable date: "2010-03-18T00:00:00.000Z"
    Parse Exception : java.text.ParseException: Unparseable date: "2010-03-23T23:59:00.000Z"
    Parse Exception : java.text.ParseException: Unparseable date: "2010-03-18T00:00:00.000Z"
    Parse Exception : java.text.ParseException: Unparseable date: "2010-03-23T23:59:00.000Z"
    the first few map okay...  then i get the exception.
    the UDF is as follows:
    public String convertDateTimeToUTC(String strDate, Container container) throws StreamTransformationException{
    AbstractTrace trace = container.getTrace();
    Date date=null;
    SimpleDateFormat sdfSource = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
    try{
    String dt = strDate;
    date = sdfSource.parse(dt);
    trace.addInfo("Local Date:"+date);
    SimpleDateFormat sdfDestination = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    strDate = sdfDestination.format(date);
    catch(ParseException pe){
    trace.addInfo("Parse Exception : " + pe);
    return strDate;
    can anyone see why this fails after successfully mapping a few fields???

    the first mapping works correctly...
    then we reuse the same fields to map to the additional segments.
    the context is correct as it is trying to pull the same fields in...  it just throw the error with the same data in the same UDF/Function Library but for different segments! :o(
    http://img199.imageshack.us/img199/3104/dateconversion.jpg
    as you can see from the screenshot above, the mapping works in the first instance, then fails on subsequent nodes.

  • JmsAdapter DOM Parsing Exception handling

    Hi,
    I'm currently facing a problem with the behaviour of the Jms Adapter.
    Whenever a JMS message is put in the queue and that message is not XML valid, the Jms Adapter (consumer) throw the exception "DOM Parsing Exception in translator Exception".
    That's fine, I understand that the message was not well formed. But what is not fine is that the underlying BPEL is not instanciated : meaning I can't handle the exception properly.
    Is there a way to force the Jms Adapter not to crash on the DOM Parsing for the BPEL to be instanciated (and then being able to handle the exception there) ?
    Or is there a way to handle the error thrown by the Jms Adapter itself ? How ?
    I think I do have a workaround to this if there is no better option (if both above questions cannot be answered) but I would rather not implement it since it will involve some extra steps / complexity.
    > It would be to check the "native format opaque schema" option and then use a java embedded to decode the base64 into a string for eventually parsing it.
    regards,
    mathieu

    Hi Mathieu,
    The messages that error out before being posted to the service infrastructure are referred to as rejected messages. For example, the Oracle File Adapter selects a file having data in CSV format and tries to translate it to XML format (using NXSD). If there is any error in the translation, this message is rejected and are not be posted to the target composite.
    You can create rejection handlers to handle message errors. Message errors include those that occur during translation, correlation ID mismatch and XML parsing after message reception.
    Docs on how to do that are here...
    http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/life_cycle.htm#CIAIICJJ
    Cheers,
    Vlad

  • Getting DOM Parsing Exception in translator while Dequeuing the message from JMS topic

    Hi All,
    Hope you all doing good.
    I have an issue.
    I am running on 11.1.1.5 SOA suite version on Linux.
    In my aplication I have 4 projects which are connected by with topic/queue.
    But in one of the communication, the JMS topic throws me the below error in the log, but dequeue happend perfectly fine and the application runs smoothly.
    [ERROR] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@530c530c] [userId: <anonymous>
    ] [ecid: 5552564bd7cf9140:-117a2347:142149c715a:-8000-00000000069dd133,0] [APP: soa-infra] JMSAdapter <project1>
    JmsConsumer_sendInboundMessage:[des
    tination = <TOPIC NAME>  subscriber = <Consumer project name>
    Error (DOM Parsing Exception in translator.[[
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
    ) while preparing to send XMLRecord JmsXMLRecord
    [ERROR] [] [oracle.soa.adapter] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@530c530c] [userId: <anonymous>
    ] [ecid: 5552564bd7cf9140:-117a2347:142149c715a:-8000-00000000069dd133,0] [APP: soa-infra] JMSAdapter <project name>
    java.lang.Exception: DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
            at oracle.tip.adapter.jms.inbound.JmsConsumer.translateFromNative(JmsConsumer.java:603)
            at oracle.tip.adapter.jms.inbound.JmsConsumer.sendInboundMessage(JmsConsumer.java:403)
            at oracle.tip.adapter.jms.inbound.JmsConsumer.send(JmsConsumer.java:1161)
            at oracle.tip.adapter.jms.inbound.JmsConsumer.run(JmsConsumer.java:1048)
            at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
            at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
            at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    But when I try putting the archived data on this topic, it throws me the same error but even dequeuing doesnt happen.
    I have extracted the payload and validated against the xsd, it looks fine and even the validator doesnt throw me any error.
    But I guess I am missing something, which I am immediately not getting.
    Please let me know, if I am soemthing here which is causing this erro.
    Thanks,
    Chandru

    I searched about this error, but no luck.
    First time when the message dequeues, the consumer can consume the message but throws the error in the log.
    But when I put the message back into queue from archive directory, the consumer doesnt consume message and throws me the same error.
    Does anyone faced this sort of issue.
    I checked my xsd throughly, and validated it externally. but didnt fine any error.
    if anyone knows, suggest me how to resolve this issue.
    thanks & regards
    Chandru

  • DOM Parsing Exception in translator. Dequeuing is failing

    Hi,
    -> I am working on EDI HIPPA File Protocol.
    -> My b2b configuration is working. I am getting the payload xml in IP_IN_QUEUE.
    But ESB with AQAdaptor is failing giving the below Exception.
    -> ORABPEL-11211 DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Check the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:202) at oracle.tip.adapter.aq.database.MessageReader.translateFromNative(MessageReader.java:1179) at oracle.tip.adapter.aq.database.MessageReader.readMessage(MessageReader.java:533) at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:189) at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242) at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215) at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814) at java.lang.Thread.run(Thread.java:595) Caused by: oracle.xml.parser.v2.XMLParseException: Expected name instead of >. at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320) at oracle.xml.parser.v2.XMLReader.scanNameChars(XMLReader.java:1151) at oracle.xml.parser.v2.XMLReader.scanQName(XMLReader.java:1928) at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1276) at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336) at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:291) at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:197)
    -> I have taken the payload xml from rejectedMessages folder from SOA HOME and written a DOM Parser program
    to parse that file.It is throwing org.xml.sax.SAXParseException.
    -> I validated this xml with xsd I provide both in Oracle B2b config and in ESB using Altova software, it is throwing errors saying the xml is not valid.
    -> So I understood that xml which is gettign generated is not the valid one.
    Could you please tell me if I have to make any changes.
    Thanks
    Praveena

    Hi Dheeraj,
    I did this, I have selected Oracle Integration B2B while generating the xsd, then saved the xsd and then saved ecs.
    I gave these ecs and xsd file in my Oracle B2B configruation for Document protocol page.
    Then also, I parsed the file which is generated.It is failing in parsing.
    I can see that set of empty tags <></> are getting generated before <Segment-SE> tag and after <Loop-2000> as shown below:
    </Loop-2100></Loop-2000>&lt&gt&lt/&gt<Segment-SE><Element-96>
    (I don't why I am able to see symbols for tags when I am editing this message but once I save the message it is not shown in the forum.actually empty tags are getting geneated.)
    I removed these empty tags and parsed it again, then it is parsed successfully.
    Could you please tell me what I need to do for not generating these extra empty tags.
    my xsd looks as below(pastign for this particular part:
    <xsd:element name="Transaction-835">
    <xsd:annotation>
    <xsd:documentation>Health Care Claim Payment/Advice</xsd:documentation>
    <xsd:documentation>This Draft Standard for Trial Use contains the format and establishes the data contents of the Health Care Claim Payment/Advice Transaction Set (835) for use within the context of the Electronic Data Interchange (EDI) environment. This transaction set can be used to make a payment, send an Explanation of Benefits (EOB) remittance advice, or make a payment and send an EOB remittance advice only from a health insurer to a health care provider either directly or via a financial institution.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="Internal-Properties" minOccurs="0"/>
    <xsd:element ref="Segment-ST"/>
    <xsd:element ref="Segment-BPR"/>
    <xsd:element ref="Segment-TRN"/>
    <xsd:element ref="Segment-REF" minOccurs="0"/>
    <xsd:element ref="Segment-DTM" minOccurs="0"/>
    <xsd:choice maxOccurs="2" minOccurs="2">
    <xsd:element ref="Loop-1000A"/>
    <xsd:element ref="Loop-1000B"/>
    </xsd:choice>
    <xsd:element ref="Loop-2000" minOccurs="0" maxOccurs="unbounded"/>
    <xsd:element ref="Segment-SE"/>
    </xsd:sequence>
    <xsd:attribute name="Type" default="Transaction" type="xsd:string"/>
    <xsd:attribute name="XDataVersion" fixed="1.0" type="xsd:string"/>
    <xsd:attribute name="Standard" fixed="HIPAA" type="xsd:string"/>
    <xsd:attribute name="Version" default="V4010X091A1" type="xsd:string"/>
    <xsd:attribute name="GUID" default="" type="xsd:string"/>
    <xsd:attribute name="CreatedBy" type="xsd:string"/>
    <xsd:attribute name="CreatedDate" type="xsd:dateTime"/>
    </xsd:complexType>
    </xsd:element>
    Edited by: Praveena Paruchuru on Mar 10, 2009 6:33 AM
    Edited by: Praveena Paruchuru on Mar 10, 2009 6:49 AM

  • DOM Parsing Exception in translator

    Hi
    We are hitting one issue in B2B/SOA 11g.
    BPEL instance is not getting created in 11g. Messages are picked from B2B queue and BPEL is failing while dequeing.
    It says that
    DOM Parsing Exception in translator. DOM parsing exception in inbound XSD translator while parsing InputStream. Please make sure that the xml data is valid.
    Is it due to large size of the message. I have seen the message size and it is more than 3 MB.
    Pls help
    Thanks
    Simarjeet

    Hi Anuj
    I have analysed the issue in detail. B2B is not generating the payload for one of the message so dequeue is failing and message is rejected.
    Say in one EDI file, we have 6 messages then B2B is able to create 6 separate messages while debatching but one of the message payload is empty. Error in log is
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
         at oracle.tip.adapter.aq.v2.database.MessageConverter.translateMessageBytes(MessageConverter.java:510)
         at oracle.tip.adapter.aq.v2.database.MessageConverter.getSTRUCTPayload(MessageConverter.java:404)
         at oracle.tip.adapter.aq.v2.database.MessageConverter.getPayload(MessageConverter.java:139)
         at oracle.tip.adapter.aq.v2.database.XMLRecordMessageConverter.getRecord(XMLRecordMessageConverter.java:88)
         at oracle.tip.adapter.aq.v2.database.AbstractDequeueAgent.getInputRecord(AbstractDequeueAgent.java:236)
         at oracle.tip.adapter.aq.v2.database.AbstractDequeueAgent.run(AbstractDequeueAgent.java:101)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Caused by: ORABPEL-11211
    DOM Parsing Exception in translator.
    DOM parsing exception in inbound XSD translator while parsing InputStream.
    Please make sure that the xml data is valid.
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:607)
         at oracle.tip.adapter.aq.v2.database.MessageConverter.translateMessageBytes(MessageConverter.java:506)
         ... 8 more
    Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:380)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:321)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
         at oracle.tip.pc.services.translation.xlators.xsd.XSDTranslator.translateFromNative(XSDTranslator.java:601)
         ... 9 more
    I have also tested the file using various modes unix/pc and ansi/utf-8 encoding. Is this issue related with performance tuning, tablespace etc?

  • Problem parsing XML with schema when extracted from a jar file

    I am having a problem parsing XML with a schema, both of which are extracted from a jar file. I am using using ZipFile to get InputStream objects for the appropriate ZipEntry objects in the jar file. My XML is encrypted so I decrypt it to a temporary file. I am then attempting to parse the temporary file with the schema using DocumentBuilder.parse.
    I get the following exception:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '<root element name>'
    This was all working OK before I jarred everything (i.e. when I was using standalone files, rather than InputStreams retrieved from a jar).
    I have output the retrieved XML to a file and compared it with my original source and they are identical.
    I am baffled because the nature of the exception suggests that the schema has been read and parsed correctly but the XML file is not parsing against the schema.
    Any suggestions?
    The code is as follows:
      public void open(File input) throws IOException, CSLXMLException {
        InputStream schema = ZipFileHandler.getResourceAsStream("<jar file name>", "<schema resource name>");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = null;
        try {
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          factory.setAttribute(JAXP_SCHEMA_SOURCE, schema);
          builder = factory.newDocumentBuilder();
          builder.setErrorHandler(new CSLXMLParseHandler());
        } catch (Exception builderException) {
          throw new CSLXMLException("Error setting up SAX: " + builderException.toString());
        Document document = null;
        try {
          document = builder.parse(input);
        } catch (SAXException parseException) {
          throw new CSLXMLException(parseException.toString());
        }

    I was originally using getSystemResource, which worked fine until I jarred the application. The problem appears to be that resources returned from a jar file cannot be used in the same way as resources returned directly from the file system. You have to use the ZipFile class (or its JarFile subclass) to locate the ZipEntry in the jar file and then use ZipFile.getInputStream(ZipEntry) to convert this to an InputStream. I have seen example code where an InputStream is used for the JAXP_SCHEMA_SOURCE attribute but, for some reason, this did not work with the InputStream returned by ZipFile.getInputStream. Like you, I have also seen examples that use a URL but they appear to be URL's that point to a file not URL's that point to an entry in a jar file.
    Maybe there is another way around this but writing to a file works and I set use File.deleteOnExit() to ensure things are tidied afterwards.

  • 'Import file parsing exception' while importing BIAR file

    Hi All,
    We use Java WebServices SDK for integrating our product with Business Objects. For installing the reports we use the InstallEntSDKWrapper jar to copy the BIAR file containing the reports on to the BO server. Till now we were using BO XI R2 and everything works fine.
    But now we have decided to upgrade to BO 3.0 and the reports install no longer works. Here is the error that we get -
    [InstallEntSdkWrapper.main] Connecting to CMS rwc-1950-120:6400 as administrator
    [InstallEntSdkWrapper.CmsImportFile] Exception: Import file parsing exception
    curred : 'Type info incomplete'
    [InstallEntSdkWrapper.main] BIAR File could not be imported
    Any idea what might be going wrong here? We are trying to import the same BIAR file that were created with the earlier BO version to the 3.0 version server. Couple of questions that I have is -
    1. Do we need to repackage the BIAR with 3.0 before attempting to install it? Are there any issues with trying to install a BIAR which is of older BO version?
    2. Do we need to add/modify any library (jar) in the runtime to get rid of the exception?
    Thanks for all the help.
    Regards
    Manas
    Edited by: Manas Mandlekar on Dec 23, 2009 1:34 AM

    Lucas,
    I have not seen this issue before. We'll investigate and contact you directly for more info. I'll post the resolution back to this forum once available.
    Doug

  • Lexical Parsing exception using JXQI for function in XQuery

    How to parse Xquery containing new declared namespace, functions and then use the same function to operate upon Xquery along with it.....
    When i try to execute that XQuery using JXQI library, i get lexical parsing exception.......
    i m quite new to XQuery and that too its implementation in java, so i would b grateful for the help in advance !!

    Hi,
    Could you post the XQuery, and a sample XML document (if necessary)?
    Thanks.

Maybe you are looking for

  • Drag and Drop in JTree / Show line between Nodes as DropTarget

    Hello folks, I am using the posted DnDTree. My problem is to show a line between two nodes when I am drgging another node over them. The idea is to have the posibility to sort nodes in the same level. Has anybody an idea how to solve that? Thanks and

  • DispatchEvent and sending parameters

    Hi, I have a game with two joysticks and I use the dispatchEvent command to send the fire button event. What would be a good way to send the number of the joystick to check who pressed the fire button. A bit dirty way would be to save just the number

  • SQL0964C  The transaction log for the database is full

    Hi, i am planning to do QAS refresh from PRD system using Client export\import method. i have done export in PRD and the same has been moved to QAS then started imported. DB Size:160gb DB:DB2 9.7 os: windows 2008. I facing SQL0964C  The transaction l

  • Datapump export fails with ora-39014 ora-39029 ora-31671 ora-24795 ora-6512

    Hi All, I am having this problem with data pump export job in my database. OS - Windows Server 2003 R2 Oracle Version - 10.2.0.4.0 Export Command - SYSTEM/********@testcp FULL=Y DUMPFILE=testcp_dp.dmp LOGFILE=expdp_testcp.log Error Messages:- ORA-390

  • LabVIEW Installer is not writing to the registry

    I have a LabVIEW installer with the following Registry page in it and it does not write the values I have requested to the registry on Windows Server 2008 R2.  Any clues that anyone can give me to assist. Note:  The [INSTALLDIR] variable is a valid c