From jira-events at lists.jboss.org Wed Jul 18 15:58:54 2007 Content-Type: multipart/mixed; boundary="===============6031858611315739894==" MIME-Version: 1.0 From: David Ward (JIRA) To: jboss-jira at lists.jboss.org Subject: [jboss-jira] [JBoss JIRA] Created: (JBWEB-87) JasperException for JSP page using generics Date: Wed, 18 Jul 2007 15:58:54 -0400 Message-ID: <27429281.1184788734088.JavaMail.jira@cloud.prod.atl2.jboss.com> --===============6031858611315739894== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable JasperException for JSP page using generics ------------------------------------------- Key: JBWEB-87 URL: http://jira.jboss.com/jira/browse/JBWEB-87 Project: JBoss Web Issue Type: Bug Security Level: Public (Everyone can see) Environment: Customer submitted using AS 4.2.0.GA and Sun JDK 1.5.= 0_11. I verified using AS 4.2.0.GA and AS 4.2.1.GA and Sun JDK 1.6.0_02. Reporter: David Ward Assigned To: Mladen Turk I am submitting this as a JBoss Web bug; not sure if it should have been su= bmitted as an AS bug instead... This test.jsp page does not compile in AS 4.2.0 or AS 4.2.1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> test <% Vector v =3D (Vector)request.getSession().getAttribute(= "v"); out.println("v: " + v); %> However, it does with a workaround (please see "Workaround Description" bel= ow). I believe that this is a bug since we require a 1.5 JVM for AS 4.2.x. Here is the error without using the workaround: 15:41:21,960 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP: = An error occurred at line: 4 in the jsp file: /test.jsp The type Vector is not generic; it cannot be parameterized with arguments <= String> 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> 2: test 3: <% 4: Vector v =3D (Vector)request.getSession().getAttribu= te("v"); 5: out.println("v: " + v); 6: %> 7: An error occurred at line: 4 in the jsp file: /test.jsp Syntax error, parameterized types are only available if source level is 5.0 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> 2: test 3: <% 4: Vector v =3D (Vector)request.getSession().getAttribu= te("v"); 5: out.println("v: " + v); 6: %> 7: An error occurred at line: 4 in the jsp file: /test.jsp The type Vector is not generic; it cannot be parameterized with arguments <= String> 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> 2: test 3: <% 4: Vector v =3D (Vector)request.getSession().getAttribu= te("v"); 5: out.println("v: " + v); 6: %> 7: An error occurred at line: 4 in the jsp file: /test.jsp Syntax error, parameterized types are only available if source level is 5.0 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> 2: test 3: <% 4: Vector v =3D (Vector)request.getSession().getAttribu= te("v"); 5: out.println("v: " + v); 6: %> 7: Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defaul= tErrorHandler.java:92) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispa= tcher.java:330) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler= .java:415) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) at org.apache.jasper.JspCompilationContext.compile(JspCompilationCo= ntext.java:566) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWr= apper.java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.j= ava:320) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter= (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applica= tionFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHea= derFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter= (ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Applica= tionFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWra= pperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardCon= textValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Se= curityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContex= tValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostVa= lve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportVa= lve.java:104) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(Ca= chedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngi= neValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapte= r.java:241) at org.apache.coyote.http11.Http11Processor.process(Http11Processor= .java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.= process(Http11Protocol.java:580) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.ja= va:447) at java.lang.Thread.run(Thread.java:619) -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://jira.jboss.com/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============6031858611315739894==-- From jira-events at lists.jboss.org Tue Jul 22 12:21:16 2008 Content-Type: multipart/mixed; boundary="===============4548893999986295147==" MIME-Version: 1.0 From: Remy Maucherat (JIRA) To: jboss-jira at lists.jboss.org Subject: [jboss-jira] [JBoss JIRA] Resolved: (JBWEB-87) JasperException for JSP page using generics Date: Tue, 22 Jul 2008 12:21:16 -0400 Message-ID: <16220347.1216743676413.JavaMail.jira@cloud.prod.atl2.jboss.com> In-Reply-To: 27429281.1184788734088.JavaMail.jira@cloud.prod.atl2.jboss.com --===============4548893999986295147== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://jira.jboss.org/jira/browse/JBWEB-87?page=3Dcom.atlassian.jir= a.plugin.system.issuetabpanels:all-tabpanel ] Remy Maucherat resolved JBWEB-87. --------------------------------- Fix Version/s: JBossWeb-2.1.1.GA Resolution: Done The defaults in JBoss Web and AS 5 are now Java 5 for source and target. > JasperException for JSP page using generics > ------------------------------------------- > > Key: JBWEB-87 > URL: https://jira.jboss.org/jira/browse/JBWEB-87 > Project: JBoss Web > Issue Type: Bug > Security Level: Public(Everyone can see) = > Environment: Customer submitted using AS 4.2.0.GA and Sun JDK 1.5= .0_11. I verified using AS 4.2.0.GA and AS 4.2.1.GA and Sun JDK 1.6.0_02. > Reporter: David Ward > Assignee: Remy Maucherat > Fix For: JBossWeb-2.1.1.GA > > > I am submitting this as a JBoss Web bug; not sure if it should have been = submitted as an AS bug instead... > This test.jsp page does not compile in AS 4.2.0 or AS 4.2.1: > <%@page contentType=3D"text/html" import=3D"java.util.*" %> > test > <% > Vector v =3D (Vector)request.getSession().getAttribut= e("v"); > out.println("v: " + v); > %> > > However, it does with a workaround (please see "Workaround Description" b= elow). > I believe that this is a bug since we require a 1.5 JVM for AS 4.2.x. > Here is the error without using the workaround: > 15:41:21,960 ERROR [[jsp]] Servlet.service() for servlet jsp threw except= ion > org.apache.jasper.JasperException: Unable to compile class for JSP: = > An error occurred at line: 4 in the jsp file: /test.jsp > The type Vector is not generic; it cannot be parameterized with arguments= > 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> > 2: test > 3: <% > 4: Vector v =3D (Vector)request.getSession().getAttri= bute("v"); > 5: out.println("v: " + v); > 6: %> > 7: > An error occurred at line: 4 in the jsp file: /test.jsp > Syntax error, parameterized types are only available if source level is 5= .0 > 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> > 2: test > 3: <% > 4: Vector v =3D (Vector)request.getSession().getAttri= bute("v"); > 5: out.println("v: " + v); > 6: %> > 7: > An error occurred at line: 4 in the jsp file: /test.jsp > The type Vector is not generic; it cannot be parameterized with arguments= > 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> > 2: test > 3: <% > 4: Vector v =3D (Vector)request.getSession().getAttri= bute("v"); > 5: out.println("v: " + v); > 6: %> > 7: > An error occurred at line: 4 in the jsp file: /test.jsp > Syntax error, parameterized types are only available if source level is 5= .0 > 1: <%@page contentType=3D"text/html" import=3D"java.util.*" %> > 2: test > 3: <% > 4: Vector v =3D (Vector)request.getSession().getAttri= bute("v"); > 5: out.println("v: " + v); > 6: %> > 7: > Stacktrace: > at org.apache.jasper.compiler.DefaultErrorHandler.javacError(Defa= ultErrorHandler.java:92) > at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDis= patcher.java:330) > at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompil= er.java:415) > at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308) > at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) > at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) > at org.apache.jasper.JspCompilationContext.compile(JspCompilation= Context.java:566) > at org.apache.jasper.servlet.JspServletWrapper.service(JspServlet= Wrapper.java:311) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet= .java:320) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:2= 66) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt= er(ApplicationFilterChain.java:290) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli= cationFilterChain.java:206) > at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyH= eaderFilter.java:96) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt= er(ApplicationFilterChain.java:235) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli= cationFilterChain.java:206) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW= rapperValve.java:230) > at org.apache.catalina.core.StandardContextValve.invoke(StandardC= ontextValve.java:175) > at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(= SecurityAssociationValve.java:179) > at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccCont= extValve.java:84) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHost= Valve.java:128) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport= Valve.java:104) > at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(= CachedConnectionValve.java:157) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn= gineValve.java:109) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap= ter.java:241) > at org.apache.coyote.http11.Http11Processor.process(Http11Process= or.java:844) > at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle= r.process(Http11Protocol.java:580) > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.= java:447) > at java.lang.Thread.run(Thread.java:619) -- = This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= ps://jira.jboss.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============4548893999986295147==--