XML Transformation Problem in JDeveloper 10.1.3

I am trying to transform an XML using an XSL, by a Java program, which uses javax.xml.transform.Transformer.
I have a Java project which has the above said program, where when i run the program, the xml transformation is done successfully.
But I have a Web project created, where i have the java project's jar in the WEB-INF/lib. And, when i tried to access the same java program from inside the web project, I am getting the following error:
XML-22000: (Fatal Error) Error while parsing XSL file (unknown protocol: c).
Please help in resolving this error.

This is from Metalink:
Cause
This is caused by a conflict between the Oracle XML parser installed by default in OC4J and the
Xerces parser that the application was developed with. Under 10.1.3 OC4J it is possible to tell OC4J not to use the default XML parser for the application at deployment time.
Solution
1. Undeploy the existing application using AS Console.
2. Start a new deployment of the application in AS Console. Click deploy
3. On the Deploy: Select Archive screen, browse to your deployment war file. Click Next
4. On the Deploy: Application Attributes give the application a name and click next
5. On the Deploy: Deployment Settings screen, click the pencil "Go To Task" Icon for the Configure Class Loading option.
6. Locate the shared library called "oracle.xml" (You may need to click "next 10" one or many times depending on the number of shared libraries you have) . For this row, UNCHECK the box for the column "IMPORT". Click OK
7. Click deploy, then test you application.

Similar Messages

  • XML Transformation Problem in JDeveloper 11.1.1.3.0

    Friends,
    I am trying to transform an XML using an XSL, by a Java program, which uses javax.xml.transform.Transformer.
    I have a Java project which has the above program and I have a Web project created, where i have the java project's jar in the WEB-INF/lib. And, when i tried to access the same java program from inside the web project, I am getting the following error:
    XML-22000: (Fatal Error) Error while parsing XSL file ({0}).
    oracle.jbo.JboException: XML-22000: (Fatal Error) Error while parsing XSL file ({0}).
    Code in ServiceAMImpl class:
    TransformerFactory factory = TransformerFactory.newInstance();
    template =
    factory.newTemplates(new StreamSource(AMImpl.class.getClassLoader().getResourceAsStream("text.xsl")));
    AMImpl.class.getClassLoader().getResourceAsStream("text.xsl") is returning NULL.
    Please help in resolving this error.
    Thanks much.

    Hi,
    I figured out the problem. The file was not in correct class path. Now it works fine.
    Thanks everyone.

  • XML transformation problems - URGENT!!!!!

    Hi,
    I have a problem on writing data into XML files on Win NT/Tomcat platform from a servlet. This problem has been getting on my nerves for the past few weeks now. It was earlier giving a SecurityException: sealing violation error, when trying to write into the XML file using the Transformer object's transform method. What I need to do is, just read in data from the XML file first, do some processing and then dump in the results back in the same XML file.
    I managed to get rid of the Sealing violation exception now, by downloading the xalan2 package and giving the reference of the new xalan.jar in the classpath. I am using the JAXP Transformer class's transform method to change the XML document. But, the problem now is that it is throwing a NoSuchMethodError exception on the line where the transform(source, result) method is coded.
    This is the source code:
    private void writeXMLData(Node n) throws IOException
         Transformer transformer;
         StreamResult streamresult;
         DOMSource domsource;
         TransformerFactory factory;
         factory= TransformerFactory.newInstance();
         try
         transformer = factory.newTransformer();
         domsource = new DOMSource(n);
    transformer.transform(domsource, new javax.xml.transform.stream.StreamResult(new                FileOutputStream("d:\\tomcat\\webapps\\ROOT\\Orders.xml")));
         catch (Exception e)
              e.printStackTrace();
    transformer = null;
    factory=null;
    domsource= null;
    streamresult=null;
    This is the error that is thrown:
    java.lang.NoSuchMethodError: org.w3c.dom.Node: method getNamespaceURI()Ljava/lang/String; not found
         at org.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:348)
         at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java, Compiled Code)
         at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java, Compiled Code)
         at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java, Compiled Code)
         at test.TestOrderAdd_proto.writeXMLData(TestOrderAdd_proto.java:427)
         at test.TestOrderAdd_proto.doPost(TestOrderAdd_proto.java:228)
         at test.TestOrderAdd_proto.doGet(TestOrderAdd_proto.java:246)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:402)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
         at java.lang.Thread.run(Thread.java:479)
    The classpath settings are:
    d:\jaxp-1.1\jaxp.jar;d:\xalan2\xalan-j_2_2_D9\bin\xalan.jar;d:\jaxp-1.1\crimson.jar (in that order)
    Could anyone please help me out with this problem?
    Thanks,
    Jatin

    I assume you're starting tomcat by using the tomcat.bat file. Keep in mind that this batch file adds every .jar file in tomcat's lib directory BEFORE your own classpath and it usually contains a parser.jar file, which might cause problems, it also contains a jaxp.jar.
    If you want to switch to xerces, remove jaxp and crimson from your classpath and add xerces.jar to it (xerces contains jaxp). In the case of tomcat, you'd need to delete parser.jar and add xerces.jar to its lib dir.
    Hope that helps.

  • ABAP XML transformation problem

    Hi all,
    I am creating an XML based on a custom transformation I have made. The problem I have is that my variables type P decimals 2 are passed to the XML with just one decimal place, but I need two decimal places.
    I was investigating and SAP documentation says that it should be passed with 2 decimal places according to the conversion, however it is not working in my case.
    The only solution I found is making those variables type C, but I really want a solution that allows me keep my fields as type P.
    Thanks in advance

    Hi,
    That's strange, it works well on my computer. I guess you should check SAP notes or contact SAP support.
    Sandra

  • XSLT transform problem in JDeveloper 9i

    I have the following method which is called from a JSP which accepts an XMLDocument and XSL filename, generates HTML and sends this to the response object:
    public void processOutput(HttpServletResponse response
    , XMLDocument xmlDoc
    , String xslFileName)
    throws Exception
    DOMParser parser = new DOMParser();
    parser.setPreserveWhitespace(true);
    XMLDocument xslDoc = null;
    PrintWriter out = null;
    try{
    URL xslURL = new URL(xslFileName);
    parser.parse(xslURL);
    xslDoc = parser.getDocument();
    XSLStylesheet xslStyleSheet = new XSLStylesheet(xslDoc, xslURL);
    XSLProcessor processor = new XSLProcessor();
    response.setContentType("text/html");
    out = response.getWriter();
    processor.processXSL(xslStyleSheet, xmlDoc,out);
    catch (Exception e){
    throw new Exception("ERROR in XSLTManager.processOutput:"+e.getMessage());
    finally{
    xslDoc = null;
    out=null;
    when I run this in Jdeveloper 3.1.1.2 it works fine. When I run it in Jdeveloper 9.0.3.1 I get the following error ...
    java.lang.Exception: ERROR in XSLTManager.processOutput:OutputStream already retrieved
    ... caused by the following line ...
    out = response.getWriter();
    Any help on this would be appreciated.

    JDev 3.1 uses Oracle Web-to-Go as its servlet engine, and uses a previous release of Oracle JSP.
    JDev 9.0.3 uses Oracle Containers for Java 9.0.3 (OC4J), and a later release of Oracle JSP.
    Something in your JSP page has caused the JSP infrastructure to already get the outputstream, so you cannot get the writer. You'll need to:
    (1) Figure out why your page is using the servlet output stream before you think it should be -- perhaps a <jsp:include flush="true"> in there? --, or
    (2) Call getOutputStream() and let XSLT write to the outputstream instead of the writer.

  • Styling XML with XSLT Problem with javax.xml.transform???

    I have been trying to make a transformation and seem to be having a problem in that javax.xml.transform can not be found while using jdk1.3....If I use jdk1.4, there is no problem....
    Does anyone know how I can get things to work using jdk1.3???
    (Description of what I am doing...1) Building XML Source 2) Setting up the XSLT File 3) Building Source Object 4) Build Result Object 5) Transforming the Data.....MY RESULT SHOULD BE AN HTML PAGE)
    I have tried putting xerces.jar and xalan.jar in my CLASSPATH....but this still doesn't work....onyl thing that has worked is using jdk1.4 as my JAVA_HOME....
    PLEASE HELP!!!!

    PLEASE HELP....your advice here would be greatly appreciated.....

  • Problem with  Jdeveloper Embedded OC4J  XML parsing

    Hi all,
    I am having a problem getting jdeveloper to work well. If I use jdeveloper to build the WAR file for my app and I deploy to Tomcat, the app runs fine with no error.
    However, if I try to run my app within the jdeveloper, I get this error -
    08/06/10 19:11:10 com.ibatis.dao.client.DaoException: Error while configuring DaoManager. Cause: java.lang.RuntimeException: XML Parser Error. Cause: oracle.xml.parser.v2.XMLDOMException: invalid character [ in name
    Caused by: java.lang.RuntimeException: XML Parser Error. Cause: oracle.xml.parser.v2.XMLDOMException: invalid character [ in name
    08/06/10 19:11:10 at com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.buildDaoManager(XmlDaoManagerBuilder.java:112)
    08/06/10 19:11:10 at com.ibatis.dao.client.DaoManagerBuilder.buildDaoManager(DaoManagerBuilder.java:47)
    I have tried to turn off XML parsing within Jdeveloper but no luck. I don't understand why jdeveloper will be trying to implicitly parse the XML doc, and wont even do it well.
    Is there a way I can turn off Embedded OC4J XML parsing ? and let it just use the parser in the application ? I mean Tomcat works fine with this application.
    Please help !

    I think maybe you use wrong adf lib when deploying your project to the OC4J.
    You can update your oc4j in the jdev.[JDEV->Tools->ADF Runtime Installer-> Standalone OC4J].
    Good luck
    Hart

  • Problem with JBuilder and javax.xml.transform package

    Hi,
    My JBuilder 7 can not find javax.xml.transform package. i use javax.xml.parsers package but i can not access to javax.xml.transform. is there a problem or something necessary to do to access that?
    Best Wishes - WiseWarrior

    Hey WiseWarrior,
    your problem is directly related to your jar file in run time. The xml parser jar which you are using to perform transfor is not having the appropriate classes, take the latest version of xalan it has transform package and put it into your class path, it will work.
    CheerS!!
    Sandeep Raikwar

  • Java transform problem - resulting XML has wrong namespace on imported Node

    I use Document.importNode(Node, String) to import a node from one document into another document. I want to preserve the namespace of the imported node. This works ok if the imported node specifies xmlns, even xmlns="". But if the imported node does not specify a namespace, I would expect the resulting serialized XML to have xmlns="". However, this is not the case. I use javax.xml.transform.Transformer when I serialize the XML. After the transform, the imported node has the namespace of the document it is imported into, which we do not want. So how do I get the imported node to serialize out with xmlns="", even if it's not specified in the source document? I am using javax.xml.transform.* and javax.xml.parsers.DocumentBuilder from Java 1.4.2.
    Example of XML that node is imported into (imported node replaces PayloadPlaceHolder):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope envelopeVersion="0.0.0" classificationLevel="Unclassified" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status reason="FAILED" lastTransactionID="9999999999" inReplyTo="ZZZ9999999999">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <PayloadPlaceHolder>
    </PayloadPlaceHolder>
    </Payload>]
    </Envelope>
    Example of XML with null namespace, test_segment is imported node:
    <?xml version="1.0" encoding="UTF-8"?>
    <test_segment>
    <name>test</name>
    </test_segment>
    Example of result XML with imported node (test_segment):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope classificationLevel="Unclassified" envelopeVersion="0.0.0" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status inReplyTo="ZZZ9999999999" lastTransactionID="9999999999" reason="FAILED">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <test_segment>
    <name>test</name>
    </test_segment>
    </Payload>
    </Envelope>
    Here is the code to build the documents and transform the XML:
         Document document = null;
    Document dataBlockDoc = null;
    ByteArrayInputStream inStream = new ByteArrayInputStream
    (StringUtils.getBytes(xml.toString()));
    try {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware( true );
    DocumentBuilder parser = dbf.newDocumentBuilder();
    document =
    parser.parse(
    new InputSource(inStream ) );
    if (dataBlock != null) {
    inStream = new ByteArrayInputStream(StringUtils.getBytes(dataBlock));
    dataBlockDoc = parser.parse(
    new InputSource(inStream ) );
    Element root = document.getDocumentElement();
    Element payload = null;
    NodeList children = root.getChildNodes();
    //get Payload child from envelope document
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("Payload")) {
    payload = (Element)children.item(i);
    break;
    //get the PayloadPlaceHolder
    Element payloadPlaceHolderElement = null;
    children = payload.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("PayloadPlaceHolder")) {
    payloadPlaceHolderElement = (Element)children.item(i);
    break;
    Node newPayload = null;
    if (dataBlockDoc != null) {
    Element dataBlockElement = dataBlockDoc.getDocumentElement();
    //make new Payload element to replace old (empty) Payload
    newPayload = document.importNode((Node) dataBlockElement, true);
    payload.replaceChild(newPayload, payloadPlaceHolderElement);
    else
    payload.removeChild(payloadPlaceHolderElement);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer nullTransform = tf.newTransformer();
    ByteArrayOutputStream oStream = new ByteArrayOutputStream();
    nullTransform.transform(                    new DOMSource( document ),
         new StreamResult( oStream ) );
    xml = new StringBuffer(oStream.toString());
    Thanks in advance.

    It appears that the problem is that the DOM serializer implementation in JDK 1.4 is not properly handling namespaces. Does anyone know of a workaround or alternate serializers we could use to serialize a DOM tree? I also need it to work with XSLT.
    Thanks.

  • Problem with return of javax.xml.transform.Source impl from webService

    I have a web services that needs to return an XML string to the calling client. If I return the XML as a String object it gets deserialized twice and the end result is no longer XML. My research indicates that I can return an implementation of javax.xml.transform.Source and this will cause SOAP to attach the XML string to the message rather than embed it (protecting it from deserialization). The following is the effective part of my method:
    public Source[] consumeTextMessage(String id) throws RemoteException {
    try {
    MessageConsumer mc = new MessageConsumer();
    String[] messages = mc.consumeTextMessage(id);
    StreamSource[] sources = new StreamSource[messages.length];
    for(int i = 0; i < messages.length; i++) {
    sources[ i ] = new StreamSource();
    return sources;
    } catch(RemoteException e) {
    throw e;
    note: the mc.consumeTextMessage(id) call works correctly and I know that I'm not putting anything in the StreamSource objects in the loop to build the array of StreamSource objects - just trying to get SOMETHING to work
    so this deploys without problem, but when I try to get a wsdl for the webservice i get a Server 500 error; the log says this:
    javax.servlet.ServletException: WSDL Generation exception: java.lang.Exception javax.xml.transform.Source is an abstract class: cannot be instanciated
    ok.... if I change the method return type to a concrete class (StreamSource[]), redeploy and try to get a wsdl, I get this absolutely crazy error:
    javax.servlet.ServletException: WSDL Generation exception: java.lang.Exception java.io.Reader is an abstract class: cannot be instanciated
    I have NO clue why it thinks it needs a Reader.
    If I change the method return type to String[] (and make the various adjustments to the method) then it deploys ok and gives me a good WSDL (though it still doesn't work because the Strings are deserialized twice so this isn't a viable solution but it does show that my webservice config is correct).
    So... bottom line seems to be that the webService "engine" of 10g AS doesn't like Source or StreamSource.....
    Any ideas what I can do??

    Funny story here: trying to deploy a different webserivce all together and got the same error message; thought I remembered seeing it before but wasn't sure; did a google search on it and lo and behold came across my first posting in this thread.... crazy.
    Anyway, I have discovered something that answers some of the questions I had in my first post: It seems that the argument types used in a webservice signature MUST be CONCRETE classes (and I would think primitives would work too though I don't remember trying them) - they can not be Interfaces or abstract classes. Probably if I read the webservices spec it would tell me that.
    So the error I was getting before was because Source was not a concrete class, and presumably the second error was caused by some signature somewhere along the line using the Reader abstract class.
    Fun stuff.

  • File size problem when performing XML Transformation into Excel

    Hi All,
    We are performing XML Transformation in ABAP which can open in Excel and saving to common share. But the file size of excel is around 50MB. After opening the excel and save with diffrent name the file is getting compressed and its below 1MB. So what kind of settings does we need to make to the transformation code which will create the excel files with less memory/size??
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
    <tt:root name="AAAAAAA"/>
    <tt:root name="BBBBBBBB"/>
    <tt:root name="CCCCCCCC"/>
    <tt:template>
    <?mso-application progid="Excel.Sheet"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
       <ProtectObjects>True</ProtectObjects>
       <ProtectScenarios>True</ProtectScenarios>
      </WorksheetOptions>
    </Worksheet>
    </Workbook>
    </tt:template>
    </tt:transform>
    <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
    </DocumentProperties>
    <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
      <ContentTypeId dt:dt="string">0x01010049B4763FE606154C9C9BC639FE7EE179</ContentTypeId>
    </CustomDocumentProperties>
    <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
      <Colors>
       <Color>
        <Index>0</Index>
        <RGB>#FF0000</RGB>
       </Color>
       <Color>
        <Index>1</Index>
        <RGB>#FFE4B5</RGB>
       </Color>
       <Color>
        <Index>2</Index>
        <RGB>#FFF8DC</RGB>
       </Color>
       <Color>
        <Index>3</Index>
        <RGB>#000000</RGB>
       </Color>
      </Colors>
    </OfficeDocumentSettings>
    <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
      <WindowHeight>7305</WindowHeight>
      <WindowWidth>11340</WindowWidth>
      <WindowTopX>0</WindowTopX>
      <WindowTopY>0</WindowTopY>
      <TabRatio>334</TabRatio>
      <ProtectStructure>True</ProtectStructure>
      <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    </DocumentProperties>
    <CustomDocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
      <ContentTypeId dt:dt="string">0x01010049B4763FE606154C9C9BC639FE7EE179</ContentTypeId>
    </CustomDocumentProperties>
    <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">

    Hi Raghu,
    have a look at the XLSX file generated by Excel, you'll see that it's simply a zipped file. So you can't do it with a transformation, but you need CL_ABAP_ZIP class. I advise you to look at the abap2xslx project ABAP code (currently 3.0) to see how it works.
    Best regards,
    Sandra

  • XSL problem with javax.xml.transform.sax.SAXTransformerFactory

    Dear sirs,
    I use SAXTransformerFactory in order to transform a Hashtable to SAX Event and apply a XSL.
    I try this code with the lastest version of apache parser.
    It run well.
    But, I put this software to WEBLOGIC 6.2 server and no run.
    this check is true:
              if (transFact.getFeature(javax.xml.transform.sax.SAXTransformerFactory.FEATURE)&&transFact.getFeature(javax.xml.transform.sax.SAXSource.FEATURE))
    Some one can help me.
    Thank in avance
    The code:
    java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream();
              com.cajarural.xml.HashtableParser parser = new com.cajarural.xml.HashtableParser(hashtable);
              // Codigo para el TansformerHandler
              // set the destination for the XSLT transformation
                   javax.xml.transform.TransformerFactory transFact = javax.xml.transform.TransformerFactory.newInstance();
                   if (transFact.getFeature(javax.xml.transform.sax.SAXTransformerFactory.FEATURE)&&transFact.getFeature(javax.xml.transform.sax.SAXSource.FEATURE))
    javax.xml.transform.sax.SAXTransformerFactory saxTransFact = (javax.xml.transform.sax.SAXTransformerFactory) transFact;
    javax.xml.transform.sax.TransformerHandler transHand = saxTransFact.newTransformerHandler(templates);
    transHand.setResult(new javax.xml.transform.stream.StreamResult(bout));
    parser.setContentHandler(transHand);
    // attach the XSLT processor to the           parser.parse();
              return new String(bout.toByteArray());

    put Xalan in your war file then try using this kind of commands:     System.setProperty("org.xml.sax.parser", "org.apache.xerces.parsers.SAXParser");
    System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
    System.setProperty("javax.xml.transform.TransformerFactory", "org.apache.xalan.processor.TransformerFactoryImpl");This tells JAXP what implementations it should use without even asking your administrator to modify the WebLogic setup...
    It's what I've done with the WLS7.0 server I am using ;-)

  • Fatal Error and NullPointerException in Oracle XML Transformer

    Hi,
    I'm building a dom tree in memory with oracle xml parser. Then I transform the dom document into a string to send xml to the client. But I get an fatal error on calling transform.
    I don't know what could be the problem, because apache and weblogic parser works, an when I create a dom document with org.w3c.dom elements and statements then the xml document can't be invalid,
    because the document implementation would throw an exception if wrong nodes or something like this should be inserted...
    I'm using oracle xml parser 9.2.0.4 for java, bea weblogic 7.0 and win2k.
    Thanks for help.
    XSL-1900: (Fatal Error) An internal error condition occurred.
    javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
    at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:681)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:309)
    java.lang.NullPointerException
    at oracle.xml.parser.v2.XSLSAXPrintDriver.printAttributes(XSLSAXPrintDriver.java:394)
    at oracle.xml.parser.v2.XSLSAXPrintDriver.startElement(XSLSAXPrintDriver.java:322)
    at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:993)
    at oracle.xml.parser.v2.XMLNode.reportChildSAXEvents(XMLNode.java:1014)
    at oracle.xml.parser.v2.XMLDocument.reportSAXEvents(XMLDocument.java:942)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:294)

    Hi,
    I'm having that problem to:
    I'm getting the following exception
    javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:723)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:340)
         at com.ac.mqif.control.Handler.handleLong(Handler.java:835)
         at com.ac.mqif.control.Handler.run(Handler.java:951)
    Caused by: java.lang.NullPointerException
         at oracle.xml.parser.v2.XPathStep.getSelectedNodes(XPathStep.java:380)
         at oracle.xml.parser.v2.PathExpr.getValue(XSLNodeSetExpr.java:483)
         at oracle.xml.parser.v2.XSLExprBase.getStringValue(XSLExprBase.java:363)
         at oracle.xml.parser.v2.XSLValueOf.processAction(XSLValueOf.java:99)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:367)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:199)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:214)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:207)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:207)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:120)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:367)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:199)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:471)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:448)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:246)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:327)
         ... 2 more
    when using a stylesheet which has a template match condition of more than 1600 characters.
    The second thing is that the Oracle XML transformer is
    NOT threadsafe. I was using several threads using different templates to transform an incoming XML simultaneously but was ALWAYS getting internal XSL errors
    and Nullpointer Exceptions. I solved this by synchronizing the transformation, but I don't like it.
    I'm using the following versions on Windows XP:
    Oracle IDE: 9.0.3.10.35
    Business Components Version: 9.0.3.10.7
    SCM Support Version: 9.0.3.9.4
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Thanx,
    Ellcrys

  • XML : Transform DOM Tree to XML String in an applet since the JRE 1.4.2_05

    Hello,
    I build a DOM tree in my applet.
    Then I transform it to XML String.
    But since the JRE 1.4.2_05 it doesn't work.
    These lines failed because these variables became final:
    org.apache.xalan.serialize.CharInfo.XML_ENTITIES_RESOURCE = getClass().getResource("XMLEntities.res").toString();
    org.apache.xalan.processor.TransformerFactoryImpl.XSLT_PROPERTIES = getClass().getResource("XSLTInfo.properties").toString();The rest of the code :
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    Document domXML = builder.newDocument();
    // I build my DOM Tree
    StringWriter xmlResult = new StringWriter();
    Source source = new DOMSource(domXML);
    Result result = new StreamResult(xmlResult);
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.setOutputProperty(javax.xml.transform.OutputKeys.INDENT,"yes");
    xformer.transform(source,result);Is there any other way to get an XML String from a DOM tree in an applet ?
    I'm so disappointed to note this big problem.

    Does anyone have an idea why I get this error message when try to use transform in an applet?
    Thanks...
    java.lang.ExceptionInInitializerError
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at org.apache.xalan.serialize.SerializerFactory.getSerializer(Unknown Source)
         at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(Unknown Source)
         at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Unknown Source)
         at matrix.CreateMtrx.SaveDoc(CreateMtrx.java:434)
         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 thinlet.Thinlet.invokeImpl(Unknown Source)
         at thinlet.Thinlet.invoke(Unknown Source)
         at thinlet.Thinlet.handleMouseEvent(Unknown Source)
         at thinlet.Thinlet.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.RuntimeException: The resource [ XMLEntities.res ] could not load: java.net.MalformedURLException: no protocol: XMLEntities.res
    XMLEntities.res      java.net.MalformedURLException: no protocol: XMLEntities.res
         at org.apache.xalan.serialize.CharInfo.<init>(Unknown Source)
         at org.apache.xalan.serialize.SerializerToXML.<clinit>(Unknown Source)
         ... 28 more

  • XML transformation using XSLT and Resin 2.1.11

    I have the following problem:
    I'm using a servlet to transform the xml files in my web-app to html. The servlet caches the ones transformed results. For each request it checks if there exists a cached result and if the result is based on the most actual xml file version (checking the "lastModified" method of java.io.File that represents the requested file).
    This servlet works fine and without any errors.
    My web-app also has some other servlets that use the xml transformation to generate a fragment of html code (the menu structure of my "normal" servlets is defined in one xml file for all other files and servlets).
    After invoking these servlets (those that use the xml transformation to create their menu) the first described servlet (transformation of requested xml files) is not working "fine" any longer. All it results is the generated header and footer of the page (hard-coded in the XSL file). The complete content is lost.
    Any ideas how to solve this problem?
    Thanks in advance,
    Thof

    1. The cache:
    The Hashtable is a field of my servlet called XMLTransformerServlet. The cache is not removed or deleted and none of its items is removed or deleted.
    As I said: Caching works fine, wonderful, perfectly...
    That's definitively not the problem.
    2. Thread safety:
    I've made all my servlet methods thread safe (just checked this...)
    3. About the "anonymous" other servlet type that uses xml transformations:
    Some of my servlets use a (thread safe) method to generate a fragment of html code that will show a simple menu structure. Therefore my web-app uses a file called menu.xml - by that way there's only one menu to maintain what makes sure that all my pages get the same menu structure (finally also the xsl file I'm using for "normal" xml transformation imports/includes and interprets this menu.xml).
    The (thread safe) method has transforms the menu.xml file using a special xsl file (menu.xsl) and outputs the result to a StringWriter. From this StringWriter I obtain the code-fragment that will be returned by the method.
    Before I saw the class StringWriter the first time I've used a temporary file to output the transformation result. Next I red in the file and returned its content.
    Finally - this method is working fine and it's always returning the expected data.
    4. The problem:
    Sorry for repeating this all the time...
    What I'm processing:
    &#160;- requesting some xml files -> XMLTransformerServlet is invoked and works fine:
    &#160;&#160;&#160;-> doGet checks the resource (if resource doesn't exist HTTP404 will be responded)
    &#160;&#160;&#160;-> doGet checks the caching state for this resource
    &#160;&#160;&#160;&#160;&#160;&#160;a) resource is in cache and no newer version of the File exists -> return cached element
    &#160;&#160;&#160;&#160;&#160;&#160;b) resource is in cache but a newer version exists in the file system -> recache and return newly cached element
    &#160;&#160;&#160;&#160;&#160;&#160;c) resource is not in cache -> cache the resource and return the newly cached element
    &#160;- requesting one of the other servlets (those that use xml transformation for menu generation)
    &#160;&#160;&#160;-> servlets invoked work fine
    &#160;- requesting a xml file:
    &#160;&#160;&#160;a) current version in cache -> return cached element
    &#160;&#160;&#160;b) no current version in cache -> transform the xml file and cache it
    This last transformation of the requested xml file fails.
    It is not failing in the sense of "throwing an exception"... it seems to work 100% fine and results a String that could be responded to the browser.
    But stupidly it is not working fine...
    Maybe (as you wrote) this is a bug (maybe in Resins xml transformation api).
    Just thought someone else might have made a similar experience...

Maybe you are looking for

  • How to remove the Google Redirect Virus on my gf's pc? Nothing seems to work!

    Hi Guys, So I was trying to save my girlfriend's pc from this Google Redirect Virus (the one where you are redirected to some random commercial site when you click on a link in google), but I am having real trouble. Of course I want to solve this and

  • Can i filter app store by rating

    I want to search the app store and filter apps by rating.  Is that possible?

  • Bug: halt when deleting unneeded update files

    If WSUS installed on a heavy IO loaded harddrive (LUN) of a VM, when deleting unneeded update files by Server Cleanup Wizard, MMC node may halt. Server OS: Windows Server 2012 Standard Errors can be located in Event Log: An unhandled exception occurr

  • Answer these quesions pls

    1.What is a database? What is DBMS? 2.Why would you choose a database system instead of simply storing the data in Operating system files? 3.What is the difference between Logical Independence and Physical Independence? 4.What are the different types

  • PSC 2110 "remove and check black cartridge"

    I'm getting an error message "Remove and check black cartridge" even though my cartridge is not empty (purchased it recently) and has not expired. I have removed it, cleaned it, cleaned the contacts on the printer and reinserted. It takes me through