Bug 875614 - Seam2.3 sporadic NPE in org.jboss.seam.jms.TopicSession.create(TopicSession.java:38)
Summary: Seam2.3 sporadic NPE in org.jboss.seam.jms.TopicSession.create(TopicSession.j...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: Seam
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 2.4.0
Assignee: Marek Novotny
QA Contact: Marek Schmidt
URL:
Whiteboard: Seam2.3
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-12 08:11 UTC by Marek Schmidt
Modified: 2013-07-22 13:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
By design, Seam puts newly instantiated components into the scopes before calling the @Create or @PostConstruct methods. The Seam JMS Components TopicConnection and QueueConnection do not synchronize access to their @Create and @Unwrap methods. This causes multiple concurrent requests that are the first to require these components to inject instances of these built-in application-scoped components before they are instantiated. To work around this issue, you can force the components to be created during application start-up. In this case, there is no risk of this race condition occurring. The following example code shows how to apply this work-around: @Name("topicConnectionStartup") @Startup @Scope(ScopeType.APPLICATION) public class TopicConnectionStartup { @In(value="org.jboss.seam.jms.topicConnection", create=true) private TopicConnection topicConnection; } If you apply the work-around, the components are created during application start-up and no race condition occurs.
Clone Of:
Environment:
Solaris 11 x86, Sun JDK 1.6, EAP 6.0.0
Last Closed: 2013-07-22 13:24:41 UTC
Type: Bug


Attachments (Terms of Use)
server.log (66.19 KB, text/x-log)
2012-11-12 08:11 UTC, Marek Schmidt
no flags Details
server.log with seam TRACE logging enabled + additional Seam JMS logs (747.98 KB, text/x-log)
2012-11-13 12:28 UTC, Marek Schmidt
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Issue Tracker JBSEAM-5056 None None None Never
Red Hat Issue Tracker WFK2-100 Major Closed Seam2.3 sporadic NPE in org.jboss.seam.jms.TopicSession.create(TopicSession.java:38) 2014-07-11 12:19:51 UTC

Description Marek Schmidt 2012-11-12 08:11:55 UTC
Created attachment 643290 [details]
server.log

Description of problem:

The remoting/chatroom example functional test sometimes fail with the following error in the server log: (the error occurs during the first attempt to connect)

14:05:21,673 ERROR [org.jboss.as.ejb3.invocation] (http-localhost/127.0.0.1:8080-4) JBAS014134: EJB Invocation failed on component ChatRoomAction for method public abstract boolean org.jboss.seam.example.remoting.chatroom.ChatRoomActionWebRemote.connect(java.lang.String): javax.ejb.EJBException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: topicPublisher
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:165) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:229) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:303) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:189) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:42) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:176) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.stateful.StatefulComponentIdInterceptor.processInvocation(StatefulComponentIdInterceptor.java:52) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.seam.example.remoting.chatroom.ChatRoomActionWebRemote$$$view3.connect(Unknown Source) [chatroom-ejb.jar:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_32]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_32]
	at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_32]
	at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.javassist.tmp.java.lang.Object_$$_javassist_seam_2.connect(Object_$$_javassist_seam_2.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_32]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_32]
	at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_32]
	at org.jboss.seam.remoting.Call.processInvocation(Call.java:208) [jboss-seam-remoting-2.3.0.Final-redhat-1.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.remoting.Call.execute(Call.java:144) [jboss-seam-remoting-2.3.0.Final-redhat-1.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.remoting.ExecutionHandler$1.process(ExecutionHandler.java:89) [jboss-seam-remoting-2.3.0.Final-redhat-1.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.remoting.ExecutionHandler.handle(ExecutionHandler.java:78) [jboss-seam-remoting-2.3.0.Final-redhat-1.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:111) [jboss-seam-remoting-2.3.0.Final-redhat-1.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.SeamResourceServlet.service(SeamResourceServlet.java:80) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: topicPublisher
	at org.jboss.seam.Component.newInstance(Component.java:2208) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstance(Component.java:2034) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstance(Component.java:1996) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2414) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getValueToInject(Component.java:2366) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.injectAttributes(Component.java:1743) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.inject(Component.java:1561) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:56) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:29) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:30) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_32]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_32]
	at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_32]
	at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:123) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:58)
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.processInvocation(StatefulSessionSynchronizationInterceptor.java:156) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:67) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-1.jar:1.1.1.Final-redhat-1]
	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:227) [jboss-as-ejb3-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
	... 76 more
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.jms.topicSession
	at org.jboss.seam.Component.newInstance(Component.java:2208) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstance(Component.java:2034) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstance(Component.java:1996) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstance(Component.java:1990) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstance(Component.java:1970) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.getInstance(Component.java:1965) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.jms.TopicSession.instance(TopicSession.java:55) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.jms.ManagedTopicPublisher.create(ManagedTopicPublisher.java:53) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_32]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_32]
	at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_32]
	at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.callComponentMethod(Component.java:2313) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.callCreateMethod(Component.java:2236) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.newInstance(Component.java:2196) [jboss-seam.jar:2.3.0.Final-redhat-1]
	... 119 more
Caused by: java.lang.NullPointerException
	at org.jboss.seam.jms.TopicSession.create(TopicSession.java:38) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_32]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_32]
	at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_32]
	at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.callComponentMethod(Component.java:2313) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.callCreateMethod(Component.java:2236) [jboss-seam.jar:2.3.0.Final-redhat-1]
	at org.jboss.seam.Component.newInstance(Component.java:2196) [jboss-seam.jar:2.3.0.Final-redhat-1]
	... 135 more

Version-Release number of selected component (if applicable):
WFK 2.1.0.CR1 jboss-seam-2.3.0.Final-redhat-1

How reproducible:
Only sometimes

Steps to Reproduce:
1. Run the remoting/chatroom example functional test on EAP6
  
Actual results:
The test sometimes fail

Expected results:
The test always pass

Additional info:
I have not yet been able to reproduce the issue locally.

Comment 1 mark yarborough 2012-11-12 14:45:51 UTC
CCFR from QE Marek Schmidt).

Comment 2 Marek Schmidt 2012-11-13 12:26:55 UTC
After further investigation, the problem seems to be a concurrent access to the application-scoped org.jboss.seam.jms.topicConnection component. The first thread is still in the @Create init() method waiting for the TopicConnectionFactory.createTopicConnection() call, while the other thread also tries to inject the org.jboss.seam.jms.topicConnection component. The second thread retrieves the component, since it has been created by the first thread, but it has not yet been initialized, so the topicConnection is null, hence the NPE.

A workaround is to force the topicConnection to be created during app startup, so there would be no risk of having this race during concurrent requests. e.g.:

@Name("topicConnectionStartup")
@Startup
@Scope(ScopeType.APPLICATION)
public class TopicConnectionStartup {
	@In(value="org.jboss.seam.jms.topicConnection", create=true)
	private TopicConnection topicConnection;
}

Comment 3 Marek Schmidt 2012-11-13 12:28:06 UTC
Created attachment 644084 [details]
server.log with seam TRACE logging enabled + additional Seam JMS logs

Comment 4 Sneha 2013-03-25 06:44:42 UTC
Doc Text is up to date.


Note You need to log in before you can comment on or make changes to this bug.