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

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

"Re: java.lang.NullPointerException with factory.createQueueConnection"

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

--
Hi,
Here's an update, as identified by a work colleague...
After sending the message there was no tidy up code (e.g. call to 
connection.close(), etc.).
The issue could be reproduced when both systems were up and running and then 
doing a reboot on the remote host.
 All is well now (after applying the fix).
Many thanks Ed !
--

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

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

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


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

2012-11-09 Thread Nigel Robbins
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 env = new Hashtable();
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_