5 Replies Latest reply on Feb 21, 2013 4:34 AM by Joydeep Sarkar

    XSLT parser exception with JBoss7 on certain Unix environments

    Joydeep Sarkar Newbie

      Hi,

       

      I am using JBoss AS 7 with JDK 6.x in Unix platform. Even though the application runs properly in development environments, it somehow does not work in the Unix boxes of production environment.

       

      I have bundled xalan1.2.4.jar with my ear file and in the log I can see that the TransformerFactoryImpl is referring to the bundled xalan jar.

      I have checked the language is also set to en_us.UTF-8 which is identical to other Unix boxes where the application is working.

      I am running JBoss in standalone mode.

       

      I get following error when I access application page, but the same ear and setup is working in other Unix machines. Does anyone know what could be causing this? Any lead would be helpful.

       

      Note: I tried to remove ^M from the XSL files, but could not find any special charactes whatsoever in the file.

       

      Thanks in advance,

      Joydeep

       

       

      imagenet.system.xslt.api.XsltException: javax.xml.transform.TransformerException: head is not allowed in this position in the stylesheet!; JSP Path: null; XSL Path: /home/app/jboss-as-7.1.1.Final/standalone/tmp/vfs/deployment38a293b186a3b7b6/mm.war-9f77ca259aca3dfa/WEB-INF/views/display/displaygrid.xsl; XSL Fault?: false; Page fragment: ^M
      1: <?xml version="1.0" encoding="UTF-8"?>^M
      2: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">^M
      3:      <xsl:import href="/WEB-INF/template/common/page.xsl"/>^M
      4:      <xsl:import href="/WEB-INF/component/navigation/right_common.xsl"/>^M
      
      
              at imagenet.system.xslt.api.XsltException.throwHelpfulException(XsltException.java:216)
              at imagenet.system.xslt.impl.XslTransformerFactoryImpl$TemplatesFactory.createObject(XslTransformerFactoryImpl.java:241)
              at imagenet.system.cache.impl.MemorySensitiveCache.getObject(MemorySensitiveCache.java:66)
              at imagenet.system.xslt.impl.XslTransformerFactoryImpl.getTemplates(XslTransformerFactoryImpl.java:178)
              at imagenet.system.xslt.impl.XslTransformerFactoryImpl.transform(XslTransformerFactoryImpl.java:118)
              at imagenet.web.util.XmlTransformTag.doEndTag(XmlTransformTag.java:243)
              at org.apache.jsp.WEB_002dINF.views.display.endusergrid_jsp._jspService(endusergrid_jsp.java:904)
              at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:622)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:560)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:488)
              at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
              at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:622)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:560)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:488)
              at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
              at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1158)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at imagenet.web.util.NavigationFilter.doFilter(NavigationFilter.java:64)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at imagenet.web.util.CrossSiteRequestForgeryFilter.doFilter(CrossSiteRequestForgeryFilter.java:159)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at imagenet.web.util.SimplifiedViewAuthenticationFilter.doFilter(SimplifiedViewAuthenticationFilter.java:103)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at imagenet.web.functions.monitoring.DebugFilter.doFilter(DebugFilter.java:91)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at imagenet.web.util.AuthenticationCodeFilter.doFilter(AuthenticationCodeFilter.java:115)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at imagenet.web.util.XadsEncodingFilter.doFilter(XadsEncodingFilter.java:50)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
              at java.lang.Thread.run(Thread.java:619)