[JBoss JIRA] (WFLY-9368) EL expression for wildcard imports in JSP fails with "NoClassDefFoundError: Failed to link"
by Dmitrii Tikhomirov (Jira)
[ https://issues.redhat.com/browse/WFLY-9368?page=com.atlassian.jira.plugin... ]
Dmitrii Tikhomirov closed WFLY-9368.
------------------------------------
Resolution: Out of Date
> EL expression for wildcard imports in JSP fails with "NoClassDefFoundError: Failed to link"
> -------------------------------------------------------------------------------------------
>
> Key: WFLY-9368
> URL: https://issues.redhat.com/browse/WFLY-9368
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 10.1.0.Final, 11.0.0.CR1
> Environment: Windows 7, 2012R2
> Reporter: Søren Friis
> Assignee: Dmitrii Tikhomirov
> Priority: Major
> Attachments: WF10bug.zip
>
>
> When I uses scriplets in a jsp it sometime fails on runtime. The following example is working:
>
> <%@ page import="test.Class1" %>
> <%
> Class1 class1 = new Class1();
> pageContext.setAttribute("class1", class1);
> %>
> Output: ${class1}
>
> If I change the import so it uses "*" in the import the code fails on runtime:
>
> <%@ page import="test.*" %>
> <%
> Class1 class1 = new Class1();
> pageContext.setAttribute("class1", class1);
> %>
> Output: ${class1}
>
> If I change my EL so it uses the name of another class (class2) it is also failing:
>
> <%@ page import="test.*" %>
> <%
> Class1 class1 = new Class1();
> pageContext.setAttribute("class1", class1);
> %>
> Output: ${class1}
>
> If I use a name which dos not have the same name as a class in test package it works:
>
> <%@ page import="test.*" %>
> <%
> Class1 class1 = new Class1();
> pageContext.setAttribute("class1", class1);
> %>
> Output: ${dummy}
>
> If I exclude the scriplet part it also fails:
>
> <%@ page import="test.*" %>
> Output: ${class1}
>
> When the code fails I get the following stack trace:
>
> {{javax.servlet.ServletException: java.lang.NoClassDefFoundError: Failed to link test/class1 (Module "deployment.ROOT.war" from Service Module Loader): test/class1 (wrong name: test/Class1)
> at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:889)
> at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:818)
> at org.apache.jsp.index5_jsp._jspService(index5_jsp.java:106)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.NoClassDefFoundError: Failed to link test/class1 (Module "deployment.ROOT.war" from Service Module Loader): test/class1 (wrong name: test/Class1)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
> at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
> at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:77)
> at org.jboss.modules.Module.loadModuleClass(Module.java:713)
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:348)
> at javax.el.ImportHandler.getClassFor(ImportHandler.java:176)
> at javax.el.ImportHandler.resolveClassFor(ImportHandler.java:165)
> at javax.el.ImportHandler.resolveClass(ImportHandler.java:128)
> at org.wildfly.extension.undertow.ImportedClassELResolver.getValue(ImportedClassELResolver.java:70)
> at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:96)
> at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116)
> at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
> at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:917)
> at org.apache.jsp.index5_jsp._jspService(index5_jsp.java:94)
> ... 45 more }}
>
> The error occurs on WildFly 10/11 but NOT on WildFly 8. I have attached the sources to an webapp showing the problem.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 11 months
[JBoss JIRA] (WFLY-10747) IOException when using JSF in deployment
by Dmitrii Tikhomirov (Jira)
[ https://issues.redhat.com/browse/WFLY-10747?page=com.atlassian.jira.plugi... ]
Dmitrii Tikhomirov closed WFLY-10747.
-------------------------------------
Resolution: Out of Date
> IOException when using JSF in deployment
> ----------------------------------------
>
> Key: WFLY-10747
> URL: https://issues.redhat.com/browse/WFLY-10747
> Project: WildFly
> Issue Type: Bug
> Components: JSF, Web (Undertow)
> Affects Versions: 10.1.0.Final, 11.0.0.Final, 12.0.0.Final, 13.0.0.Final
> Reporter: Adam Krajcik
> Assignee: Dmitrii Tikhomirov
> Priority: Major
> Attachments: deployment.war
>
>
> When using JSF in attached [^deployment.war], I can see the following error. This error happens during the first request. Sever doesn't print this error on further requests.
> {code}
> 14:08:31,401 SEVERE [facelets.compiler] (default task-1) Error Loading Library: jar:file:/tmp/jboss-eap-7.2/modules/system/layers/base/com/sun/jsf-impl/main/jsf-impl-2.2.13.SP5-redhat-1.jar!/META-INF/mojarra_ext.taglib.xml: java.io.IOException: Error parsing [jar:file:/tmp/jboss-eap-7.2/modules/system/layers/base/com/sun/jsf-impl/main/jsf-impl-2.2.13.SP5-redhat-1.jar!/META-INF/mojarra_ext.taglib.xml]:
> at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:410)
> at com.sun.facelets.compiler.TagLibraryConfig.loadImplicit(TagLibraryConfig.java:431)
> at com.sun.facelets.compiler.Compiler.initialize(Compiler.java:87)
> at com.sun.facelets.compiler.Compiler.compile(Compiler.java:104)
> at com.sun.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:218)
> at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:149)
> at com.sun.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:100)
> at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:519)
> at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:569)
> at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
> at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
> at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
> at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
> at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
> at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
> at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
> at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1514)
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
> at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
> at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
> at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/tmp/jboss-eap-7.2/modules/system/layers/base/com/sun/jsf-impl/main/jsf-impl-2.2.13.SP5-redhat-1.jar!/META-INF/mojarra_ext.taglib.xml@47,31]
> at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.error(TagLibraryConfig.java:376)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:135)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)
> at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(XMLDTDValidator.java:1644)
> at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidator.java:1922)
> at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:787)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:827)
> at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(XMLDocumentScannerImpl.java:1141)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
> at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:875)
> at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
> at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198)
> at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:564)
> at org.apache.xerces.jaxp.SAXParserImpl.parse(SAXParserImpl.java:298)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
> at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:407)
> ... 53 more
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 11 months
[JBoss JIRA] (WFLY-13759) Intermittent failure in ManagedExecutorServiceMetricsTestCase.testManagedExecutorServiceManagement
by Brian Stansberry (Jira)
Brian Stansberry created WFLY-13759:
---------------------------------------
Summary: Intermittent failure in ManagedExecutorServiceMetricsTestCase.testManagedExecutorServiceManagement
Key: WFLY-13759
URL: https://issues.redhat.com/browse/WFLY-13759
Project: WildFly
Issue Type: Bug
Components: Concurrency Utilities
Reporter: Brian Stansberry
Assignee: Eduardo Martins
According to https://ci.wildfly.org/project.html?projectId=WF_PullRequest&buildTypeId=... in the last month there have been 5 failures of ManagedExecutorServiceMetricsTestCase.testManagedExecutorServiceManagement with this failure:
{code}
java.lang.AssertionError
at deployment.arquillian-service//org.junit.Assert.fail(Assert.java:86)
at deployment.arquillian-service//org.junit.Assert.assertTrue(Assert.java:41)
at deployment.arquillian-service//org.junit.Assert.assertTrue(Assert.java:52)
at deployment.ManagedExecutorServiceMetricsTestCase.jar//org.jboss.as.test.integration.ee.concurrent.ManagedExecutorServiceMetricsTestCase.testRuntimeStats(ManagedExecutorServiceMetricsTestCase.java:238)
at deployment.ManagedExecutorServiceMetricsTestCase.jar//org.jboss.as.test.integration.ee.concurrent.ManagedExecutorServiceMetricsTestCase.testManagedExecutorServiceManagement(ManagedExecutorServiceMetricsTestCase.java:108)
{code}
First failure was reported against https://github.com/wildfly/wildfly/pull/13414 but that was a docs only change so not relevant. It occurred on July 17 but there weren't any merge commits to master in the period between Jul 12 and Jul 20 so any change in master causing this isn't obvious.
The failure is because the test checks that the # of active threads is 0 immediately after it does some activity, so it may just be a timing issue that's always been possible and just started happening recently for env reason on ci.wildfly.org.
A general comment is this test would be better if its asserts reported more info about what it read from the server. Use assertEquals and report the expected and wrong value.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 11 months