2 Replies Latest reply on Dec 20, 2010 2:59 AM by B of Carbon

    Error parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast

    B of Carbon
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <head>
      <meta name="generator" content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org">
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
      <title>Transform</title>
      <link type="text/css" rel="stylesheet" href="css/CascadeMenu.css">
      </head>
      <body id="Bdy">
      Hello all, I've run into a perplexing problem with a new and unexptected error on a web application that resides in a JDeveloper 11g environment. I just run it from JDeveloper on my laptop. No deployement other than to the default server at run time Integratedweblogicserver. I am doing an XML transform using XSLT and it has been working fine until I tried to use the page yesterday. I get the following error. javax.servlet.ServletException: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:417) at jsp_servlet.__transform._jspService(__transform.java:109) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: javax.xml.transform.TransformerConfigurationException: XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). at oracle.xml.jaxp.JXSAXTransformerFactory.reportConfigException(JXSAXTransformerFactory.java:759) at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:371) at oracle.xml.jaxp.JXSAXTransformerFactory.newTransformer(JXSAXTransformerFactory.java:272) at weblogic.xml.jaxp.RegistryTransformerFactory.newTransformer(RegistryTransformerFactory.java:209) at org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:145) at jsp_servlet.__transform._jsp__tag2(__transform.java:223) at jsp_servlet.__transform._jspService(__transform.java:102) ... 25 more Caused by: java.lang.ClassCastException: weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser at oracle.xml.jaxp.JXSAXTransformerFactory.newTemplates(JXSAXTransformerFactory.java:357) ... 30 more ------------------------------------------------ I changed no code or moved any XML or XSLT file. I do see an error in the log regarding a bad URL ----------------------------------------------- XML-22108: (Error) Invalid Source - URL format is incorrect. XML-22000: (Fatal Error) Error while parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast to oracle.xml.parser.v2.SAXParser). &lt;[ServletContext@10343785[app:QSBQAR module:QSBQAR-QSBQAR-context-root path:/QSBQAR-QSBQAR-context-root spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@699744[ GET /QSBQAR-QSBQAR-context-root/Transform.jsp?reqtype=1 HTTP/1.1 Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; . ------------------------------ Here is the XML ------------------------------ <?xml version="1.0" encoding="windows-1252" standalone="no"?>
      ACME Bird Seed Co. Capture the Road Runner using a boulder, rope and bird seed. Quinn Brian 00 00 00 00 00 00 00 00 00 11 08 08 08 08 00 43 43 Hours have been approved. APPROVED Smart Jean 00 00 00 00 00 00 00 00 00 Hours approved. APPROVED --------------------------------------------------------------------------------------- Here is the XSL --------------------------------------------------------------------------------------- <?xml version="1.0" encoding="windows-1252"?>
      <!-- Root template -->

      <h2>Project Hours Worked</h2>
      ----------------------------------------------------------------------------------------- Here is the JSP with the transform ----------------------------------------------------------------------------------------
      <table>
      <tr>
      <td>Week Ending Date:--</td>
      </tr>
      <tr>
      <td></td>
      </tr>
      <tr>
      <th>Client</th>
      <td></td>
      <th>Project</th>
      <td></td>
      </tr>
      <tr>
      <td></td>
      </tr>
      <tr>
      <td></td>
      </tr>
      <tr>
      <th>Last Name</th>
      <th>First Name</th>
      <th>Task</th>
      <th>---</th>
      <th>Sun</th>
      <th>Mon</th>
      <th>Tue</th>
      <th>Wed</th>
      <th>Thu</th>
      <th>Fri</th>
      <th>Sat</th>
      <th>---</th>
      <th>Ttl</th>
      </tr>
      <tr>
      <td></td>
      <td></td>
      </tr>
      <tr>
      <td>---</td>
      <td>---</td>
      <td></td>
      <td>---</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
      <td>---</td>
      <td></td>
      </tr>
      <tr>
      <td>Total Hours: </td>
      <td></td>
      <td></td>
      </tr>
      <%@ page contentType="text/html;charset=windows-1252"%><%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %></table>
      <script type="text/javascript" src="scripts/CascadeMenu.js">

      </script>
      <% int bad = 1; %>
      <div id="menuBar" class="menuBar">
      <div id="Bar1" class="Bar">Home</div>
      <div id="Bar3" class="Bar">Accounting</div>
      <div id="Bar4" class="Bar">Help</div>
      </div>
      <div style="background:#84ffff; color:Aqua; "><br>
      <br>

      <p style="color:Orange; font-size:x-large; font-style:italic; font-weight:bold;
      font-family:Arial, Helvetica, sans-serif; "><img src="images/logoqsq.jpg" style="border:1" height="120" width="120" alt="Q Squared">
      </p>
      </div>
      <div>
      <p style="color:Black; font-size:x-large; font-style:italic; font-weight:bold; font-family:Arial, Helvetica, sans-serif;"><img src="images/dilbert.gif" alt="Dilbert" height="100" width="100">
      ? ? Welcome to Q Squared-Brian Quinn Consulting - Manager Time Approval</p>
      </div>
      <div>
      <table width="100%" class="table1">
      <tr>
      <td style="width:15%; border-width:medium; background-color:silver ">
      <h3>Contractor Resources</h3>
      <ul style="list-style-type:circle; ">
      <li>Time Entry</li>
      <li>Profile</li>
      </ul>
      <h3>Manager Resources</h
        • 1. Re: Error parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast
          B of Carbon
          LOL - I didn't think about the forum message area having trouble displaying my XML XSLT problem
          It seemed to mix the code with the site XML.

          Oh brother

          The deal is this.

          The XML XSLT transform was working and now it is not and I think it has something to do with
          the HTTP links for either the Oracle core and/or XML TAGLIBs. Either that or the W3.org has
          outdated XSLT http links.

          Anyone know if changes have been made to any of these taglib links?
          This in the JSP

          <!--

          <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

          <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
          <c:import url="./HoursWorked3.xsl" var="xslt" charEncoding="windows-1252"/>
          <x:transform xml="${xmlHoursWorked}" xslt="${xslt}" />

          -->

          This in the XSL

          <!--

          <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

          -->


          And the other JSP having the same problem.

          <!--

          <%@ page contentType="text/html;charset=windows-1252"
          import="java.util.List, qsbqar.XMLHandler, org.w3c.dom.NodeList,
          javax.xml.transform.*, javax.xml.transform.stream.*,
          org.w3c.dom.Node, oracle.xml.parser.v2.*, java.io.File,
          java.io.FileReader " %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
          <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
          <xsl:param name="employeeID" value="2"/>
          <%session.setAttribute("employee_ID", request.getParameter("consultantID")); %>

          <c:import url="HoursWorked.xml" var="xmlHoursWorked" charEncoding="windows-1252"/>
          <c:import url="./HoursWorked4.xsl" var="xslt" charEncoding="windows-1252"/>
          <x:transform xml="${xmlHoursWorked}" xslt="${xslt}">
          <x:param name="employeeID" value="${sessionScope.employee_ID }"/>
          </x:transform>

          -->

          Edited by: B of Carbon on Dec 19, 2010 12:25 AM
          • 2. Re: Error parsing XSL file (weblogic.xml.jaxp.RegistryXMLReader cannot be cast
            B of Carbon
            I've been fooling around with the transform by running the XSL file that references my XML file.

            I am unable to get to the details in the tags.
            I've got a problem with JDeveloper's directory structure and the XSL DOM language parser.
            I really never know what the value of my match should be....

            <xsl:template match="catalog">

            If I place the XML and XSL in the public html directory which appears as Web Content in the Application Navigator
            that means they should be at the same level in that directory.

            What am I missing on these template matches versus the directory structure of JDeveloper?
            I don't see a way to configure any of this through an XML mapping document.

            XML usage was a lot smoother in Visual Studio for my .NET apps.
            JDeveloper has me going in circles. I think they use mapping to virtual directories but that is not clear.
            I end up guessing at how to connect to things usually.
            Typically the tutorials don't adequately address path setup or other configuration issues.
            When you are trying to learn XSL the last thing you need is the IDE adding to the confusion
            over where your relative path begins and where the parser is looking for an XML let alone its tags in the DOM tree structure.
            It should not be this difficult.

            Brian

            Edited by: B of Carbon on Dec 19, 2010 9:41 PM

            Edited by: B of Carbon on Dec 19, 2010 9:54 PM