[jboss-user] [JBoss Messaging] - java.lang.NullPointerException with factory.createQueueConnection

Nigel Robbins do-not-reply at jboss.com
Fri Nov 9 10:27:58 EST 2012


Nigel Robbins [https://community.jboss.org/people/nigel-robbins] created the discussion

"java.lang.NullPointerException with factory.createQueueConnection"

To view the discussion, visit: https://community.jboss.org/message/775766#775766

--------------------------------------------------------------
Hi,

Our system works fine but after a period of time (e.g. a few days) we are getting a java.lang.NullPointerException on calling factory.createQueueConnection.

Here is an extract of the code:
Hashtable<String,String> env = new Hashtable<String,String>();
env.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
env.put("java.naming.provider.url",aHost+":1099");
InitialContext ctx = new InitialContext(env);
QueueConnectionFactory factory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
connection = factory.createQueueConnection();

The stack trace is at the bottom.

One thing we've noticed is that in wrapper.log on the server we are sending the message to, around the same time of the NullPointerException, the following is logged:
WARN   | wrapper  | 2012/11/01 10:01:34 | ------------------------------------------------------------------------
WARN   | wrapper  | 2012/11/01 10:01:34 | Shutdown: Timed out waiting for the JVM to terminate.
WARN   | wrapper  | 2012/11/01 10:01:34 | The JVM was launched with debug options so this may be because the JVM
WARN   | wrapper  | 2012/11/01 10:01:34 | is currently suspended by a debugger.  Any future timeouts during this
WARN   | wrapper  | 2012/11/01 10:01:34 | JVM invocation will be silently ignored.
WARN   | wrapper  | 2012/11/01 10:01:34 | ------------------------------------------------------------------------
INFO   | wrapper  | 2012/11/01 10:08:43 | User logged out.  Ignored.
STATUS | wrapper  | 2012/11/01 10:08:45 | Machine is shutting down.
STATUS | wrapper  | 2012/11/01 10:09:24 | --> Wrapper Started as Service
WARN   | wrapper  | 2012/11/01 10:09:25 | ------------------------------------------------------------------------
WARN   | wrapper  | 2012/11/01 10:09:25 | The JVM is being launched with a debugger enabled and could possibly be
WARN   | wrapper  | 2012/11/01 10:09:25 | suspended.  To avoid unwanted shutdowns, timeouts will be disabled,
WARN   | wrapper  | 2012/11/01 10:09:25 | removing the ability to detect and restart frozen JVMs.
WARN   | wrapper  | 2012/11/01 10:09:25 | ------------------------------------------------------------------------
STATUS | wrapper  | 2012/11/01 10:09:25 | Launching a JVM...

Any thoughts on why it's crashing on calling factory.createQueueConnection and why the JVM is restarting on the remote host ?

Note that both systems are on Windows and have the following setting in service.bat:
set JAVA_OPTS=-Xrs

Thanks !

Stack trace:

2012-11-08 09:25:53,252 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.remoting.Client.addConnectionListener(Client.java:465)
2012-11-08 09:25:53,252 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.jms.client.remoting.JMSRemotingConnection.addConnectionListener(JMSRemotingConnection.java:502)
2012-11-08 09:25:53,252 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:101)
2012-11-08 09:25:53,252 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateConnectionDelegate_12944434.invoke(StateCreationAspect_z_handleCreateConnectionDelegate_12944434.java)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:101)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:95)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at com.wss.turnover.JTSProcessRecord.sendGUIMessages(Unknown Source)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.jsp.jsp.JTSTurnoverProcess_jsp._jspService(JTSTurnoverProcess_jsp.java:286)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
2012-11-08 09:25:53,268 ERROR [STDERR] (http-0.0.0.0-18080-9)                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2012-11-08 09:25:53,284 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
2012-11-08 09:25:53,299 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
2012-11-08 09:25:53,315 ERROR [STDERR] (http-0.0.0.0-18080-9)                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
2012-11-08 09:25:53,315 ERROR [STDERR] (http-0.0.0.0-18080-9)                at java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/775766#775766]

Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121109/642870aa/attachment-0001.html 


More information about the jboss-user mailing list