Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004492 [Resin] minor always 04-09-11 11:56 04-26-11 14:47
Reporter rickHigh View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0004492: Basic Roo app causes SAX exception
Description A basic Roo app which works good on Jetty, JBoss and Tomcat, fails with Resin.

500 Servlet Exception

file:/Users/rick/tools/resin/resin-4.0.16/webapps/springapp-0.1.0.BUILD-SNAPSHOT/WEB-INF/tags/util/load-scripts.tagx:1:
org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not
bound.

1: <jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" [^] xmlns:fn="http://java.sun.com/jsp/jstl/functions" [^]
xmlns:jsp="http://java.sun.com/JSP/Page" [^] xmlns:spring="http://www.springframework.org/tags" [^]
version="2.0">
2:
3: <jsp:output omit-xml-declaration="yes" />

Additional Information      [java] [11-04-09 11:42:40.533] {http://*:8080-2} [^] file:/Users/rick/tools/resin/resin-4.0.16/webapps/springapp-0.1.0.BUILD-SNAPSHOT/WEB-INF/tags/util/load-scripts.tagx:1: org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bound.
     [java] 1: <jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" [^] xmlns:fn="http://java.sun.com/jsp/jstl/functions" [^] xmlns:jsp="http://java.sun.com/JSP/Page" [^] xmlns:spring="http://www.springframework.org/tags" [^] version="2.0">
     [java] 2:
     [java] 3: <jsp:output omit-xml-declaration="yes" />
     [java] [11-04-09 11:42:40.547] {http://*:8080-2} [^] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.
     [java] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
     [java] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
     [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:119)
     [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:96)
     [java] at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
     [java] at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:126)
     [java] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:287)
     [java] at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:298)
     [java] at com.caucho.server.webapp.RequestDispatcherImpl.error(RequestDispatcherImpl.java:131)
     [java] at com.caucho.server.webapp.ErrorPageManager.sendServletErrorImpl(ErrorPageManager.java:430)
     [java] at com.caucho.server.webapp.ErrorPageManager.sendServletError(ErrorPageManager.java:190)
     [java] at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:158)
     [java] at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
     [java] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:287)
     [java] at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:792)
     [java] at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:730)
     [java] at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:689)
     [java] at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:669)
     [java] at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:617)
     [java] at com.caucho.network.listen.AcceptTask.doTask(AcceptTask.java:104)
     [java] at com.caucho.network.listen.ConnectionReadTask.runThread(ConnectionReadTask.java:98)
     [java] at com.caucho.network.listen.ConnectionReadTask.run(ConnectionReadTask.java:81)
     [java] at com.caucho.network.listen.AcceptTask.run(AcceptTask.java:67)
     [java] at com.caucho.env.thread.ResinThread.runTasks(ResinThread.java:164)
     [java] at com.caucho.env.thread.ResinThread.run(ResinThread.java:130)
     [java] Caused by: org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.
     [java] at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:692)
     [java] at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)
     [java] at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)
     [java] at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
     [java] at org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)
     [java] at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
     [java] at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047)
     [java] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
     [java] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
     [java] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
     [java] ... 24 more
     [java] Caused by: org.apache.tiles.util.TilesIOException: ServletException including path '/WEB-INF/layouts/default.jspx'.
     [java] at org.apache.tiles.servlet.context.ServletUtil.wrapServletException(ServletUtil.java:241)
     [java] at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:243)
     [java] at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222)
     [java] at org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
     [java] at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
     [java] at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
     [java] at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690)
     [java] ... 33 more
     [java] Caused by: com.caucho.jsp.JspLineParseException: file:/Users/rick/tools/resin/resin-4.0.16/webapps/springapp-0.1.0.BUILD-SNAPSHOT/WEB-INF/tags/util/load-scripts.tagx:1: org.xml.sax.SAXParseException: The prefix "c" for element "c:set" is not bound.
     [java] 1: <jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core" [^] xmlns:fn="http://java.sun.com/jsp/jstl/functions" [^] xmlns:jsp="http://java.sun.com/JSP/Page" [^] xmlns:spring="http://www.springframework.org/tags" [^] version="2.0">
     [java] 2:
     [java] 3: <jsp:output omit-xml-declaration="yes" />
     [java] at com.caucho.jsp.java.JspNode.error(JspNode.java:1987)
     [java] at com.caucho.jsp.java.JspNode.error(JspNode.java:1976)
     [java] at com.caucho.jsp.java.JavaJspGenerator.validate(JavaJspGenerator.java:602)
     [java] at com.caucho.jsp.JspCompilerInstance.generateTag(JspCompilerInstance.java:678)
     [java] at com.caucho.jsp.JspCompilerInstance.compileTag(JspCompilerInstance.java:584)
     [java] at com.caucho.jsp.TagFileManager.getTag(TagFileManager.java:155)
     [java] at com.caucho.jsp.TagFileManager.getTag(TagFileManager.java:119)
     [java] at com.caucho.jsp.TagFileManager.getTag(TagFileManager.java:94)
     [java] at com.caucho.jsp.ParseTagManager.getTagImpl(ParseTagManager.java:111)
     [java] at com.caucho.jsp.ParseTagManager.getTag(ParseTagManager.java:81)
     [java] at com.caucho.jsp.java.JavaJspGenerator.getTag(JavaJspGenerator.java:2432)
     [java] at com.caucho.jsp.java.JavaJspBuilder.startElement(JavaJspBuilder.java:276)
     [java] at com.caucho.jsp.JspContentHandler.startElement(JspContentHandler.java:224)
     [java] at com.caucho.xml.XmlParser.addElement(XmlParser.java:2626)
     [java] at com.caucho.xml.XmlParser.parseElement(XmlParser.java:665)
     [java] at com.caucho.xml.XmlParser.parseNode(XmlParser.java:387)
     [java] at com.caucho.xml.XmlParser.parseInt(XmlParser.java:257)
     [java] at com.caucho.xml.AbstractParser.parse(AbstractParser.java:805)
     [java] at com.caucho.jsp.JspCompilerInstance.parse(JspCompilerInstance.java:530)
     [java] at com.caucho.jsp.JspCompilerInstance.generate(JspCompilerInstance.java:477)
     [java] at com.caucho.jsp.JspCompilerInstance.compile(JspCompilerInstance.java:409)
     [java] at com.caucho.jsp.JspManager.compile(JspManager.java:277)
     [java] at com.caucho.jsp.JspManager.createPage(JspManager.java:187)
     [java] at com.caucho.jsp.JspManager.createPage(JspManager.java:168)
     [java] at com.caucho.jsp.PageManager.getPage(PageManager.java:339)
     [java] at com.caucho.jsp.PageManager.getPage(PageManager.java:269)
     [java] at com.caucho.jsp.PageManager.getPage(PageManager.java:252)
     [java] at com.caucho.jsp.QServlet.getSubPage(QServlet.java:294)
     [java] at com.caucho.jsp.QServlet.getPage(QServlet.java:210)
     [java] at com.caucho.server.dispatch.PageFilterChain.compilePage(PageFilterChain.java:240)
     [java] at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:144)
     [java] at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:126)
     [java] at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:287)
     [java] at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:298)
     [java] at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:116)
     [java] at org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)
     [java] ... 38 more


The default.jspx:

<html xmlns:jsp="http://java.sun.com/JSP/Page" [^] xmlns:c="http://java.sun.com/jsp/jstl/core" [^] xmlns:tiles="http://tiles.apache.org/tags-tiles" [^] xmlns:spring="http://www.springframework.org/tags" [^] xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" >
    
    <jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat" />
    
    <jsp:directive.page contentType="text/html;charset=UTF-8" />
    <jsp:directive.page pageEncoding="UTF-8" />
            
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
            
        <util:load-scripts />
        
        <spring:message code="application_name" var="app_name"/>
        <title><spring:message code="welcome_h3" arguments="${app_name}" /></title>
    </head>
    
      <body class="tundra spring">
           <div id="wrapper">
            <tiles:insertAttribute name="header" ignore="true" />
            <tiles:insertAttribute name="menu" ignore="true" />
            <div id="main">
                <tiles:insertAttribute name="body"/>
                <tiles:insertAttribute name="footer" ignore="true"/>
            </div>
        </div>
    </body>
</html>


index.jspx
<div xmlns:spring="http://www.springframework.org/tags" [^] xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" xmlns:jsp="http://java.sun.com/JSP/Page" [^] version="2.0">
  <jsp:directive.page contentType="text/html;charset=UTF-8" />
  <jsp:output omit-xml-declaration="yes" />
  <spring:message var="app_name" code="application_name" htmlEscape="false" />
  <spring:message var="title" code="welcome_titlepane" arguments="${app_name}" htmlEscape="false" />
  <util:panel id="title" title="${title}">
    <h3>
      <spring:message code="welcome_h3" arguments="${app_name}" />
    </h3>
    


      <spring:message code="welcome_text" />
    


  </util:panel>
</div>
Attached Files

- Relationships

- Notes
(0005186)
rickHigh
04-09-11 12:07

I tried removing c:set from one of the jspx. Then I get this error:


Caused by: com.caucho.jsp.JspLineParseException: file:/Users/rick/tools/resin/resin-4.0.16/webapps/springapp-0.1.0.BUILD-SNAPSHOT/WEB-INF/tags/util/panel.tagx:1: org.xml.sax.SAXParseException: The prefix "c" for element "c:if" is not bound.
     [java] 1: <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" [^] xmlns:fn="http://java.sun.com/jsp/jstl/functions" [^] xmlns:spring="http://www.springframework.org/tags" [^] xmlns:c="http://java.sun.com/jsp/jstl/core" [^] version="2.0">
     [java] 2: <jsp:output omit-xml-declaration="yes" />
     [java] 3:

This is coming from this JSP:


<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" [^] xmlns:fn="http://java.sun.com/jsp/jstl/functions" [^] xmlns:spring="http://www.springframework.org/tags" [^] xmlns:c="http://java.sun.com/jsp/jstl/core" [^] version="2.0">
  <jsp:output omit-xml-declaration="yes" />
  
  <jsp:directive.attribute name="id" type="java.lang.String" required="true" rtexprvalue="true" description="The identifier for this tag (do not change!)" />
  <jsp:directive.attribute name="title" type="java.lang.String" required="true" rtexprvalue="true" description="The page title (required)" />
  <jsp:directive.attribute name="render" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicate if the contents of this tag and all enclosed tags should be rendered (default 'true')" />
  <jsp:directive.attribute name="openPane" type="java.lang.String" required="false" rtexprvalue="true" description="Control if the title pane is opened or closed by default (default: true)" />
  <jsp:directive.attribute name="z" type="java.lang.String" required="false" description="Used for checking if element has been modified (to recalculate simply provide empty string value)" />
  
  <c:if test="${empty render or render}">
    <c:if test="${empty openPane}">
      <c:set value="true" var="openPane" />
    </c:if>
  
    <c:set var="sec_id">
      <spring:escapeBody javaScriptEscape="true" >${id}</spring:escapeBody>
    </c:set>


This seems to be a fairly fundamental.
 
(0005187)
rickHigh
04-09-11 13:17

I was able to get past this issue:

They (roo team) included an old version of JSTL in the pom.xml. (Not sure why either)

This version of JSTL uses the old <uri>http://java.sun.com/jstl/core</uri> [^]


URI.

Once I remove this, everything works.

The potential problem is that this works with Tomcat, JBoss and Jetty with this error.

I can document the error in the wiki and show the workaround.
Essentially just comment out the old JSTL lib.


        <!--
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
         -->
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>


The solution is to comment out something that is never used, is old and deprecated and provides no value in the first place, but makes Resin not run and JBoss, Tomcat and Jetty run ok with it.
 
(0005204)
ferg
04-26-11 14:47

jsp/1c2p
 

- Issue History
Date Modified Username Field Change
04-09-11 11:56 rickHigh New Issue
04-09-11 12:07 rickHigh Note Added: 0005186
04-09-11 13:17 rickHigh Note Added: 0005187
04-26-11 14:47 ferg Note Added: 0005204
04-26-11 14:47 ferg Assigned To  => ferg
04-26-11 14:47 ferg Status new => closed
04-26-11 14:47 ferg Resolution open => fixed
04-26-11 14:47 ferg Fixed in Version  => 4.0.18


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker