[ https://issues.apache.org/jira/browse/SLING-7107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Munteanu updated SLING-7107: ----------------------------------- Component/s: (was: Testing) > Some JSP tests fail under Java 9 - The method getProperty(String) is > undefined for the type AdapterType > ------------------------------------------------------------------------------------------------------- > > Key: SLING-7107 > URL: https://issues.apache.org/jira/browse/SLING-7107 > Project: Sling > Issue Type: Bug > Reporter: Robert Munteanu > > Might have the same cause as SLING-7105, but listing it here for the sake of > being complete. > {noformat}Running > org.apache.sling.launchpad.webapp.integrationtest.JspScriptingTest > Tests run: 7, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 13.451 sec > <<< FAILURE! - in > org.apache.sling.launchpad.webapp.integrationtest.JspScriptingTest > testRtJsp(org.apache.sling.launchpad.webapp.integrationtest.JspScriptingTest) > Time elapsed: 5.349 sec <<< FAILURE! > junit.framework.AssertionFailedError: Expected status 200 for > http://localhost:41000/JspScriptingTest/1504554193227/rt/this_is_a_test_node_.html > (content=<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> > <html> > <head> > <title>500 Unable to compile class for JSP: > An error occurred at line: 27 in the jsp file: /apps/nt/unstructured/html.jsp > The method getProperty(String) is undefined for the type AdapterType > 24: > 25: <h1>JSP rendering result</h1> > 26: <p> > 27: text value using resource.adaptTo:<%= > resource.adaptTo(javax.jcr.Node.class).getProperty("text").getValue().getString() > %> > 28: </p> > 29: <p> > 30: text value using currentNode:<%= > currentNode.getProperty("text").getValue().getString() %> > </title> > </head> > <body> > <h1>Unable to compile class for JSP: > An error occurred at line: 27 in the jsp file: /apps/nt/unstructured/html.jsp > The method getProperty(String) is undefined for the type AdapterType > 24: > 25: <h1>JSP rendering result</h1> > 26: <p> > 27: text value using resource.adaptTo:<%= > resource.adaptTo(javax.jcr.Node.class).getProperty("text").getValue().getString() > %> > 28: </p> > 29: <p> > 30: text value using currentNode:<%= > currentNode.getProperty("text").getValue().getString() %> > (500)</h1> > <p>The requested URL > /JspScriptingTest/1504554193227/rt/this_is_a_test_node_.html resulted in an > error in /apps/nt/unstructured/html.jsp.</p> > <h3>Exception:</h3> > <pre> > org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile > class for JSP: > An error occurred at line: 27 in the jsp file: /apps/nt/unstructured/html.jsp > The method getProperty(String) is undefined for the type AdapterType > 24: > 25: <h1>JSP rendering result</h1> > 26: <p> > 27: text value using resource.adaptTo:<%= > resource.adaptTo(javax.jcr.Node.class).getProperty("text").getValue().getString() > %> > 28: </p> > 29: <p> > 30: text value using currentNode:<%= > currentNode.getProperty("text").getValue().getString() %> > at > org.apache.sling.scripting.jsp.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) > at > org.apache.sling.scripting.jsp.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) > at > org.apache.sling.scripting.jsp.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:136) > at > org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:304) > at > org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:282) > at > org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:269) > at > org.apache.sling.scripting.jsp.jasper.JspCompilationContext.compile(JspCompilationContext.java:501) > at > org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.prepareServlet(JspServletWrapper.java:427) > at > org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:486) > at > org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449) > at > org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:342) > at > org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:97) > at > org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:603) > at > org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388) > at > org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184) > at > org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79) > at > org.apache.sling.junit.impl.servlet.TestLogServlet$TestNameLoggingFilter.doFilter(TestLogServlet.java:257) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) > at > org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) > at > org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:72) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74) > at > org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128) > at > org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) > at org.eclipse.jetty.server.Server.handle(Server.java:534) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) > at > org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) > at > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) > at java.base/java.lang.Thread.run(Thread.java:844) > </pre> > <h3>Request Progress:</h3> > <pre> > 0 TIMER_START{Request Processing} > 6 COMMENT timer_end format is {<elapsed microseconds>,<timer > name>} <optional message> > 36 LOG Method=GET, PathInfo=null > 47 TIMER_START{handleSecurity} > 4632 TIMER_END{4582,handleSecurity} authenticator > org.apache.sling.auth.core.impl.SlingAuthenticator@4d8e3503 returns true > 7312 TIMER_START{ResourceResolution} > 7481 TIMER_END{166,ResourceResolution} > URI=/JspScriptingTest/1504554193227/rt/this_is_a_test_node_.html resolves to > Resource=JcrNodeResource, type=nt:unstructured, superType=null, > path=/JspScriptingTest/1504554193227/rt/this_is_a_test_node_ > 7498 LOG Resource Path Info: SlingRequestPathInfo: > path='/JspScriptingTest/1504554193227/rt/this_is_a_test_node_', > selectorString='null', extension='html', > suffix='null' > 7499 TIMER_START{ServletResolution} > 7504 > TIMER_START{resolveServlet(/JspScriptingTest/1504554193227/rt/this_is_a_test_node_)} > 9638 > TIMER_END{2131,resolveServlet(/JspScriptingTest/1504554193227/rt/this_is_a_test_node_)} > Using servlet /apps/nt/unstructured/html.jsp > 9653 TIMER_END{2152,ServletResolution} > URI=/JspScriptingTest/1504554193227/rt/this_is_a_test_node_.html handled by > Servlet=/apps/nt/unstructured/html.jsp > 9659 LOG Applying Requestfilters > 9667 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter > 9672 LOG Calling filter: > org.apache.sling.launchpad.testservices.filters.SlingFilter > 9697 LOG Calling filter: > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter > 9713 LOG Calling filter: > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter > 9719 LOG Applying Componentfilters > 9728 TIMER_START{/apps/nt/unstructured/html.jsp#0} > 101404 LOG SCRIPT ERROR: > org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile > class for JSP: //An error occurred at line: 27 in the jsp file: > /apps/nt/unstructured/html.jsp/The method getProperty(String) is undefined > for the type AdapterType/24: /25: <h1>JSP rendering > result</h1>/26: <p>/27: text value using > resource.adaptTo:<%= > resource.adaptTo(javax.jcr.Node.class).getProperty("text").getValue().getString() > %>/28: </p>/29: <p>/30: text value using > currentNode:<%= > currentNode.getProperty("text").getValue().getString() %>/ > 101425 TIMER_END{91693,/apps/nt/unstructured/html.jsp#0} > 101489 LOG Filter timing: > filter=org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter, > inner=92, total=92, outer=0 > 101498 LOG Filter timing: > filter=org.apache.sling.launchpad.testservices.filters.SlingFilterWithPattern, > inner=92, total=92, outer=0 > 101505 LOG Filter timing: > filter=org.apache.sling.launchpad.testservices.filters.NoPropertyFilter, > inner=92, total=92, outer=0 > 101512 LOG Filter timing: > filter=org.apache.sling.launchpad.testservices.filters.SlingFilter, inner=92, > total=92, outer=0 > 101850 LOG Applying Error filters > 101864 LOG Calling filter: org.apache.sling.i18n.impl.I18NFilter > 101931 > TIMER_START{handleError:throwable=org.apache.sling.scripting.jsp.jasper.JasperException} > 103675 > TIMER_END{1740,handleError:throwable=org.apache.sling.scripting.jsp.jasper.JasperException} > Using handler > org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet > 106750 TIMER_END{106746,Request Processing} Dumping > SlingRequestProgressTracker Entries > </pre> > <hr> > <address>ApacheSling/2.6 (jetty/9.3.20.v20170531, Java HotSpot(TM) 64-Bit > Server VM 9, Linux 3.19.0-25-generic amd64)</address> > </body> > </html> > ) expected:<200> but was:<500> > at junit.framework.Assert.fail(Assert.java:57) > at junit.framework.Assert.failNotEquals(Assert.java:329) > at junit.framework.Assert.assertEquals(Assert.java:78) > at junit.framework.Assert.assertEquals(Assert.java:234) > at junit.framework.TestCase.assertEquals(TestCase.java:401) > at > org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:457) > at > org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:432) > at > org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:424) > at > org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:419) > at > org.apache.sling.launchpad.webapp.integrationtest.JspScriptingTest.checkContent(JspScriptingTest.java:183) > at > org.apache.sling.launchpad.webapp.integrationtest.JspScriptingTest.testRtJsp(JspScriptingTest.java:88){noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)