[JBoss JIRA] (JBMESSAGING-1941) Messaging deadlocks on AspectManager
by Aaron Ogburn (JIRA)
[ https://issues.jboss.org/browse/JBMESSAGING-1941?page=com.atlassian.jira.... ]
Aaron Ogburn commented on JBMESSAGING-1941:
-------------------------------------------
I couldn't commit to Branch_1_4. I attached a diff of the fix that can be applied to it though. I'll reach out to Howard.
Thanks,
Aaron
> Messaging deadlocks on AspectManager
> ------------------------------------
>
> Key: JBMESSAGING-1941
> URL: https://issues.jboss.org/browse/JBMESSAGING-1941
> Project: JBoss Messaging
> Issue Type: Bug
> Affects Versions: 1.4.8.SP9
> Environment: -JBoss Enterprise Application Platform (EAP) 5
> Reporter: Aaron Ogburn
> Attachments: 00779442testpatch.diff, JBMESSAGING-1941.diff
>
>
> Messaging can stall JBoss at start up. The hang occurs as the main thread blocks in different locations in JMS trying to acquire the AspectManager instance lock:
> {noformat}
> "main" prio=10 tid=0x00007fe69c1e1000 nid=0x3613 waiting for monitor entry [0x00007fe6828e5000]
> java.lang.Thread.State: BLOCKED (on object monitor)
> at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:728)
> - waiting to lock <0x00000000a5e43e50> (a org.jboss.aop.AspectManager)
> at org.jboss.jms.server.endpoint.advised.SessionAdvised.<clinit>(SessionAdvised.java)
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:273)
> - locked <0x00000000a5600f48> (a org.jboss.aop.asintegration.jboss5.ScopedVFSClassLoaderDomain)
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:229)
> {noformat}
> Since the main thread is stalled, so too is start up. This lock is always held by another making a similar call like so:
> {noformat}
> "WorkManager(2)-1" daemon prio=10 tid=0x00007fe62dd96000 nid=0x363e in
> Object.wait() [0x00007fe68029a000]
> java.lang.Thread.State: RUNNABLE
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:273)
> - locked <0x00000000a5e43e50> (a org.jboss.aop.AspectManager)
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:229)
> {noformat}
> The code there at line 273 is simple enough and shouldn't cause a long stall:
> {code:title=org.jboss.jms.server.endpoint.ServerConnectionEndpoint.java|borderStyle=solid}
> synchronized (AspectManager.instance())
> {
> advised = new SessionAdvised(ep); // line 273
> }
> {code}
> Nonetheless, it does clearly hang at this line as WorkManager(2)-1 never progresses. There's no GC/CPU issues or anything of that nature, but we get a slight in the thread dump as WorkManager(2)-1 is shown to be in Object.wait(). Checking the thread through pstack, we can see the issue. It is waiting in native/JDK level operations required to initialize the SessionAdvised class:
> {noformat}
> Thread 2 (Thread 0x7fe68029d700 (LWP 13886)):
> #0 0x0000003b3e40b43c in pthread_cond_wait@(a)GLIBC_2.3.2 () from /lib64/libpthread.so.0
> #1 0x00007fe6a12d447e in os:latformEvent:ark() () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #2 0x00007fe6a12c54fa in ObjectMonitor::wait(long, bool, Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #3 0x00007fe6a13ab5f0 in ObjectSynchronizer::waitUninterruptibly(Handle, long, Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #4 0x00007fe6a107115b in instanceKlass::initialize_impl(instanceKlassHandle, Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #5 0x00007fe6a107077a in instanceKlass::initialize(Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #6 0x00007fe6a1097c5c in InterpreterRuntime::_new(JavaThread*, constantPoolOopDesc*, int) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> {noformat}
> These calls are naturally synchronized internally in the JVM so only one thread can proceed through initialization of a class at a given time. Checking for any threads in process of initializing SessionAdvised, we can see only the main thread is. But the main thread is still blocked for the AspectManager lock.
> So we have a deadlock here. The main thread holds the initialization lock while waiting for the AspectManager lock, while the WorkManager(2)-1 thread holds the AspectManager lock while waiting for the initialization lock.
> The initialization of SessionAdvised is wrapped in the synchronized block so the main thread should not have been able to proceed into the initialization at all without already possessing the AspectManager lock. It locks the ScopedVFSClassLoaderDomain, which extends the AspectManager. This is different from the actual AspectManager though that main tries to lock in the clinit call and that it deadlocks on.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (JBMESSAGING-1941) Messaging deadlocks on AspectManager
by Aaron Ogburn (JIRA)
[ https://issues.jboss.org/browse/JBMESSAGING-1941?page=com.atlassian.jira.... ]
Aaron Ogburn updated JBMESSAGING-1941:
--------------------------------------
Attachment: JBMESSAGING-1941.diff
> Messaging deadlocks on AspectManager
> ------------------------------------
>
> Key: JBMESSAGING-1941
> URL: https://issues.jboss.org/browse/JBMESSAGING-1941
> Project: JBoss Messaging
> Issue Type: Bug
> Affects Versions: 1.4.8.SP9
> Environment: -JBoss Enterprise Application Platform (EAP) 5
> Reporter: Aaron Ogburn
> Attachments: 00779442testpatch.diff, JBMESSAGING-1941.diff
>
>
> Messaging can stall JBoss at start up. The hang occurs as the main thread blocks in different locations in JMS trying to acquire the AspectManager instance lock:
> {noformat}
> "main" prio=10 tid=0x00007fe69c1e1000 nid=0x3613 waiting for monitor entry [0x00007fe6828e5000]
> java.lang.Thread.State: BLOCKED (on object monitor)
> at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:728)
> - waiting to lock <0x00000000a5e43e50> (a org.jboss.aop.AspectManager)
> at org.jboss.jms.server.endpoint.advised.SessionAdvised.<clinit>(SessionAdvised.java)
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:273)
> - locked <0x00000000a5600f48> (a org.jboss.aop.asintegration.jboss5.ScopedVFSClassLoaderDomain)
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:229)
> {noformat}
> Since the main thread is stalled, so too is start up. This lock is always held by another making a similar call like so:
> {noformat}
> "WorkManager(2)-1" daemon prio=10 tid=0x00007fe62dd96000 nid=0x363e in
> Object.wait() [0x00007fe68029a000]
> java.lang.Thread.State: RUNNABLE
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:273)
> - locked <0x00000000a5e43e50> (a org.jboss.aop.AspectManager)
> at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.createSessionDelegate(ServerConnectionEndpoint.java:229)
> {noformat}
> The code there at line 273 is simple enough and shouldn't cause a long stall:
> {code:title=org.jboss.jms.server.endpoint.ServerConnectionEndpoint.java|borderStyle=solid}
> synchronized (AspectManager.instance())
> {
> advised = new SessionAdvised(ep); // line 273
> }
> {code}
> Nonetheless, it does clearly hang at this line as WorkManager(2)-1 never progresses. There's no GC/CPU issues or anything of that nature, but we get a slight in the thread dump as WorkManager(2)-1 is shown to be in Object.wait(). Checking the thread through pstack, we can see the issue. It is waiting in native/JDK level operations required to initialize the SessionAdvised class:
> {noformat}
> Thread 2 (Thread 0x7fe68029d700 (LWP 13886)):
> #0 0x0000003b3e40b43c in pthread_cond_wait@(a)GLIBC_2.3.2 () from /lib64/libpthread.so.0
> #1 0x00007fe6a12d447e in os:latformEvent:ark() () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #2 0x00007fe6a12c54fa in ObjectMonitor::wait(long, bool, Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #3 0x00007fe6a13ab5f0 in ObjectSynchronizer::waitUninterruptibly(Handle, long, Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #4 0x00007fe6a107115b in instanceKlass::initialize_impl(instanceKlassHandle, Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #5 0x00007fe6a107077a in instanceKlass::initialize(Thread*) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> #6 0x00007fe6a1097c5c in InterpreterRuntime::_new(JavaThread*, constantPoolOopDesc*, int) () from /opt/app/jvm/jdk1.6.0_38/jre/lib/amd64/server/libjvm.so
> {noformat}
> These calls are naturally synchronized internally in the JVM so only one thread can proceed through initialization of a class at a given time. Checking for any threads in process of initializing SessionAdvised, we can see only the main thread is. But the main thread is still blocked for the AspectManager lock.
> So we have a deadlock here. The main thread holds the initialization lock while waiting for the AspectManager lock, while the WorkManager(2)-1 thread holds the AspectManager lock while waiting for the initialization lock.
> The initialization of SessionAdvised is wrapped in the synchronized block so the main thread should not have been able to proceed into the initialization at all without already possessing the AspectManager lock. It locks the ScopedVFSClassLoaderDomain, which extends the AspectManager. This is different from the actual AspectManager though that main tries to lock in the clinit call and that it deadlocks on.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-3100) ClassCastException in JSPs where spring-web tags and jstl tags are used
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-3100?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar reassigned WFLY-3100:
---------------------------------
Assignee: Remy Maucherat (was: Tomaz Cerar)
Remy, can you verify that suggested change https://github.com/avijra/jboss-jsp-api_spec/commit/165b497a2ea9ea8d4e5e4... is ok and wont break anything?
> ClassCastException in JSPs where spring-web tags and jstl tags are used
> -----------------------------------------------------------------------
>
> Key: WFLY-3100
> URL: https://issues.jboss.org/browse/WFLY-3100
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: EE, Web (Undertow)
> Affects Versions: 8.0.0.Final
> Reporter: abhishek vijra
> Assignee: Remy Maucherat
> Labels: jsp, jstl
> Attachments: spring-fun.war
>
>
> Following JSP with spring tags
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
> <html>
> <head><title>Simple jsp page</title></head>
> <body>
>
> <c:set var="hasError" value="${param.hasError}" />
> <c:set var="msg" value="${param.msg}" />
>
> <c:if test="${param.hasError=='true'}">
> Message: <spring:message text="${param.msg}"/>
> </c:if>
>
> </body>
> </html>
> breaks following error
> ERROR [org.springframework.web.servlet.tags.MessageTag] (default task-1) org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot be cast to javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects: java.lang.ClassCastException: org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot be cast to javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects
> at javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects.getImplicitObjects(ImplicitObjectELResolver.java:608) [jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.jsp.el.ImplicitObjectELResolver.getValue(ImplicitObjectELResolver.java:169) [jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:95) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:32) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.ELResolverImpl.getValue(ELResolverImpl.java:78) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-3.0.0.jar:3.0.0]
> at com.sun.el.parser.AstValue.getBase(AstValue.java:151) [javax.el-3.0.0.jar:3.0.0]
> at com.sun.el.parser.AstValue.getValue(AstValue.java:200) [javax.el-3.0.0.jar:3.0.0]
> There are two jars (jboss-jsp-api_2.3_spec-1.0.0.Final.jar and jboss-jstl-api_1.2_spec-1.0.4.Final.jar) that are incompatible with each other due to a bug -- both are storing an object in the same place, but the objects are not compatible.
> The result is that a jsp page cannot contain both JSTL and Spring tags, or it will get that error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-3100) ClassCastException in JSPs where spring-web tags and jstl tags are used
by abhishek vijra (JIRA)
[ https://issues.jboss.org/browse/WFLY-3100?page=com.atlassian.jira.plugin.... ]
abhishek vijra updated WFLY-3100:
---------------------------------
Git Pull Request: https://github.com/avijra/jboss-jsp-api_spec/commit/165b497a2ea9ea8d4e5e4... (was: https://github.com/avijra/jboss-jsp-api_spec/commit/61428553e4958fe17298c...)
> ClassCastException in JSPs where spring-web tags and jstl tags are used
> -----------------------------------------------------------------------
>
> Key: WFLY-3100
> URL: https://issues.jboss.org/browse/WFLY-3100
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: EE, Web (Undertow)
> Affects Versions: 8.0.0.Final
> Reporter: abhishek vijra
> Assignee: Tomaz Cerar
> Labels: jsp, jstl
> Attachments: spring-fun.war
>
>
> Following JSP with spring tags
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
> <html>
> <head><title>Simple jsp page</title></head>
> <body>
>
> <c:set var="hasError" value="${param.hasError}" />
> <c:set var="msg" value="${param.msg}" />
>
> <c:if test="${param.hasError=='true'}">
> Message: <spring:message text="${param.msg}"/>
> </c:if>
>
> </body>
> </html>
> breaks following error
> ERROR [org.springframework.web.servlet.tags.MessageTag] (default task-1) org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot be cast to javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects: java.lang.ClassCastException: org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot be cast to javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects
> at javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects.getImplicitObjects(ImplicitObjectELResolver.java:608) [jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.jsp.el.ImplicitObjectELResolver.getValue(ImplicitObjectELResolver.java:169) [jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:95) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:32) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.ELResolverImpl.getValue(ELResolverImpl.java:78) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-3.0.0.jar:3.0.0]
> at com.sun.el.parser.AstValue.getBase(AstValue.java:151) [javax.el-3.0.0.jar:3.0.0]
> at com.sun.el.parser.AstValue.getValue(AstValue.java:200) [javax.el-3.0.0.jar:3.0.0]
> There are two jars (jboss-jsp-api_2.3_spec-1.0.0.Final.jar and jboss-jstl-api_1.2_spec-1.0.4.Final.jar) that are incompatible with each other due to a bug -- both are storing an object in the same place, but the objects are not compatible.
> The result is that a jsp page cannot contain both JSTL and Spring tags, or it will get that error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-3101) CLI: hide stacktraces for exceptions w/o messages when logging errors
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-3101?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated WFLY-3101:
------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=997584
> CLI: hide stacktraces for exceptions w/o messages when logging errors
> ---------------------------------------------------------------------
>
> Key: WFLY-3101
> URL: https://issues.jboss.org/browse/WFLY-3101
> Project: WildFly
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: CLI
> Affects Versions: 8.0.0.Final
> Reporter: Alexey Loubyansky
> Assignee: Alexey Loubyansky
> Fix For: 8.0.1.Final
>
>
> CommandContextImpl contains the following logic
> public void handleSafe(String line) {
> exitCode = 0;
> try {
> handle(line);
> } catch(Throwable t) {
> final StringBuilder buf = new StringBuilder();
> buf.append(t.getLocalizedMessage());
> Throwable t1 = t.getCause();
> while(t1 != null) {
> if(t1.getLocalizedMessage() != null) {
> buf.append(": ").append(t1.getLocalizedMessage());
> } else {
> t1.printStackTrace();
> }
> t1 = t1.getCause();
> }
> error(buf.toString());
> }
> }
> When an exception does not contain any message, e.g. in some cases IllegalArgumentException, etc, the full stacktraces are logged that are useful for debugging but not nice from the user interface point of view. It was suggested to hide them.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-3101) CLI: hide stacktraces for exceptions w/o messages when logging errors
by Alexey Loubyansky (JIRA)
[ https://issues.jboss.org/browse/WFLY-3101?page=com.atlassian.jira.plugin.... ]
Alexey Loubyansky updated WFLY-3101:
------------------------------------
Git Pull Request: https://github.com/wildfly/wildfly/pull/6023
> CLI: hide stacktraces for exceptions w/o messages when logging errors
> ---------------------------------------------------------------------
>
> Key: WFLY-3101
> URL: https://issues.jboss.org/browse/WFLY-3101
> Project: WildFly
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: CLI
> Affects Versions: 8.0.0.Final
> Reporter: Alexey Loubyansky
> Assignee: Alexey Loubyansky
> Fix For: 8.0.1.Final
>
>
> CommandContextImpl contains the following logic
> public void handleSafe(String line) {
> exitCode = 0;
> try {
> handle(line);
> } catch(Throwable t) {
> final StringBuilder buf = new StringBuilder();
> buf.append(t.getLocalizedMessage());
> Throwable t1 = t.getCause();
> while(t1 != null) {
> if(t1.getLocalizedMessage() != null) {
> buf.append(": ").append(t1.getLocalizedMessage());
> } else {
> t1.printStackTrace();
> }
> t1 = t1.getCause();
> }
> error(buf.toString());
> }
> }
> When an exception does not contain any message, e.g. in some cases IllegalArgumentException, etc, the full stacktraces are logged that are useful for debugging but not nice from the user interface point of view. It was suggested to hide them.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-3101) CLI: hide stacktraces for exceptions w/o messages when logging errors
by Alexey Loubyansky (JIRA)
Alexey Loubyansky created WFLY-3101:
---------------------------------------
Summary: CLI: hide stacktraces for exceptions w/o messages when logging errors
Key: WFLY-3101
URL: https://issues.jboss.org/browse/WFLY-3101
Project: WildFly
Issue Type: Task
Security Level: Public (Everyone can see)
Components: CLI
Affects Versions: 8.0.0.Final
Reporter: Alexey Loubyansky
Assignee: Alexey Loubyansky
Fix For: 8.0.1.Final
CommandContextImpl contains the following logic
public void handleSafe(String line) {
exitCode = 0;
try {
handle(line);
} catch(Throwable t) {
final StringBuilder buf = new StringBuilder();
buf.append(t.getLocalizedMessage());
Throwable t1 = t.getCause();
while(t1 != null) {
if(t1.getLocalizedMessage() != null) {
buf.append(": ").append(t1.getLocalizedMessage());
} else {
t1.printStackTrace();
}
t1 = t1.getCause();
}
error(buf.toString());
}
}
When an exception does not contain any message, e.g. in some cases IllegalArgumentException, etc, the full stacktraces are logged that are useful for debugging but not nice from the user interface point of view. It was suggested to hide them.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (WFLY-3100) ClassCastException in JSPs where spring-web tags and jstl tags are used
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/WFLY-3100?page=com.atlassian.jira.plugin.... ]
Tomaz Cerar updated WFLY-3100:
------------------------------
Component/s: Web (Undertow)
> ClassCastException in JSPs where spring-web tags and jstl tags are used
> -----------------------------------------------------------------------
>
> Key: WFLY-3100
> URL: https://issues.jboss.org/browse/WFLY-3100
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: EE, Web (Undertow)
> Affects Versions: 8.0.0.Final
> Reporter: abhishek vijra
> Assignee: Tomaz Cerar
> Labels: jsp, jstl
> Attachments: spring-fun.war
>
>
> Following JSP with spring tags
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
> <html>
> <head><title>Simple jsp page</title></head>
> <body>
>
> <c:set var="hasError" value="${param.hasError}" />
> <c:set var="msg" value="${param.msg}" />
>
> <c:if test="${param.hasError=='true'}">
> Message: <spring:message text="${param.msg}"/>
> </c:if>
>
> </body>
> </html>
> breaks following error
> ERROR [org.springframework.web.servlet.tags.MessageTag] (default task-1) org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot be cast to javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects: java.lang.ClassCastException: org.apache.taglibs.standard.lang.jstl.ImplicitObjects cannot be cast to javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects
> at javax.servlet.jsp.el.ImplicitObjectELResolver$ImplicitObjects.getImplicitObjects(ImplicitObjectELResolver.java:608) [jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.jsp.el.ImplicitObjectELResolver.getValue(ImplicitObjectELResolver.java:169) [jboss-jsp-api_2.3_spec-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.JasperELResolver.getValue(JasperELResolver.java:95) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:32) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.jasper.el.ELResolverImpl.getValue(ELResolverImpl.java:78) [jastow-1.0.0.Final.jar:1.0.0.Final]
> at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:116) [javax.el-3.0.0.jar:3.0.0]
> at com.sun.el.parser.AstValue.getBase(AstValue.java:151) [javax.el-3.0.0.jar:3.0.0]
> at com.sun.el.parser.AstValue.getValue(AstValue.java:200) [javax.el-3.0.0.jar:3.0.0]
> There are two jars (jboss-jsp-api_2.3_spec-1.0.0.Final.jar and jboss-jstl-api_1.2_spec-1.0.4.Final.jar) that are incompatible with each other due to a bug -- both are storing an object in the same place, but the objects are not compatible.
> The result is that a jsp page cannot contain both JSTL and Spring tags, or it will get that error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months