MQJMS2005: failed to create MQQueueManager from JBOSS - jboss

Using JBOSS 4.3 with Java 1.5.0_15 connecting to IBM WebSphere MQ 6.0.2.3
When JBOSS is started these errors occur.
Stack Trace
Caused by: javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN'
at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:297)
at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:333)
at org.jboss.resource.deployment.RARDeployment.endpointActivation(RARDeployment.java:271)
at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeployment.java:226)
at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:46)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.activate(JBossMessageEndpointFactory.java:343)
... 147 more
Caused by: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:614)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2549)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1899)
at com.ibm.mq.jms.MQConnection.<init>(MQConnection.java:862)
at com.ibm.mq.jms.MQConnectionFactory.createConnection(MQConnectionFactory.java:4821)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.initializeJMSConnection(ResourceAdapterConnectionPool.java:445)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.createNewConnection(ResourceAdapterConnectionPool.java:359)
at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:284)
... 155 more
At the end of the JBOSS server.log file.
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:ear=AmxBol.ear,jar=AmxBol.jar,name=BOLCFulfillmentMDB,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:bolcustomizable#UATMQ1SUN#uatmq1sun; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN')
ObjectName: jboss.j2ee:ear=AmxBol.ear,jar=AmxBol.jar,name=BOLPaymentMDB,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:bolpayment#UATMQ1SUN#uatmq1sun; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN')
ObjectName: jboss.j2ee:ear=AmxBol.ear,jar=AmxBol.jar,name=BOLPFulfillmentMDB,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:bolpersonalized#UATMQ1SUN#uatmq1sun; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'uatmq1sun:UATMQ1SUN')
I'm unsure if it is related but a patch was recently applied to JBOSS. The queue manager (UATMQ1SUN) is up and running but it does not seem to want to connect. Any ideas as to what could be wrong? MQ and JBOSS live on the same box.
hostname = uatmq1sun
QManagerName = UATMQ1SUN
[mqm#uatmq1sun ~]$ strmqm UATMQ1SUN
WebSphere MQ queue manager running.
[mqm#uatmq1sun ~]$ netstat -an | grep 1416
tcp 0 0 :::1416 :::* LISTEN

JMS throws nested exceptions where the high-level exception contains a generic JMS failure code and the linked exception contains the provider-specific exception. So, for example, of all the possible reasons that creation of the QMgr object failed, some are local and include things like configuration errors and some only happen if the connection is attempted. In other words, some cases of the error you are reporting are code and some are MQ. If there's no linked exception, the problem isn't with MQ.
Of the ones that only happen when the connection has attempted (those that are MQ problems), the linked exception tells you explicitly whether it connected but found the wrong QMgr name, or that there was no listener, or that the channel negotiation failed, etc. But these very specific explanations are only available if the code bothers to print the linked exception.
In many of the shops where I've worked or consulted, it is considered a Sev-1 defect if JMS code is found to not print linked exceptions, and this is tested for. Such code is prevented from being promoted to production and if found in production it is pulled and fixed as an emergency change. What is expected is that the code either prints the linked exception or else prints that it checked but no linked exception is present. Without these, the best we can do here (or your operations team can do in an actual outage) is just to guess.
From the WebSphere MQ Infocenter page on JMS exceptions:
catch (JMSException je) {
System.err.println("Caught JMSException");
// Check for linked exceptions in JMSException
Throwable t = je;
while (t != null) {
// Write out the message that is applicable to all exceptions
System.err.println("Exception Msg: " + t.getMessage());
// Write out the exception stack trace
t.printStackTrace(System.err);
// Add on specific information depending on the type of exception
if (t instanceof JMSException) {
JMSException je1 = (JMSException) t;
System.err.println("JMS Error code: " + je1.getErrorCode());
if (t instanceof JmsExceptionDetail){
JmsExceptionDetail jed = (JmsExceptionDetail)je1;
System.err.println("JMS Explanation: " + jed.getExplanation());
System.err.println("JMS Explanation: " + jed.getUserAction());
}
} else if (t instanceof MQException) {
MQException mqe = (MQException) t;
System.err.println("WMQ Completion code: " + mqe.getCompCode());
System.err.println("WMQ Reason code: " + mqe.getReason());
} else if (t instanceof JmqiException){
JmqiException jmqie = (JmqiException)t;
System.err.println("WMQ Log Message: " + jmqie.getWmqLogMessage());
System.err.println("WMQ Explanation: " + jmqie.getWmqMsgExplanation());
System.err.println("WMQ Msg Summary: " + jmqie.getWmqMsgSummary());
System.err.println("WMQ Msg User Response: "
+ jmqie.getWmqMsgUserResponse());
System.err.println("WMQ Msg Severity: " + jmqie.getWmqMsgSeverity());
}
// Get the next cause
t = t.getCause();
}
}
Please print the linked exception when attempting to debug any JMS exceptions, with any transport provider. The spec defines a nested data structure to convey exception diagnostic conditions and there is no justification for failure to print that information.

Related

Why is the geoserver server status via web administration interface not displayed correctly/accessible?

I'm using geoserver-2.20.3.war together with Apache Tomcat/9.0.36 on Linux. Everything works as it should but if i try to access the server status via the web administration interface i only get Error messages. I can't really figure out the problem and how to fix it.
`HTTP Status 500 – Internal Server Error
Type Exception Report
Message Handler dispatch failed; nested exception is java.lang.InternalError: java.lang.reflect.InvocationTargetException
Beschreibung The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.InternalError: java.lang.reflect.InvocationTargetException
...
Root Cause
java.lang.InternalError: java.lang.reflect.InvocationTargetException
...
Root Cause
java.lang.reflect.InvocationTargetException
...
Root Cause
java.lang.NullPointerException
java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)
java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:719)
...
I tried to find a similar issue but unfortunately did not stumble over something really helpful.
I found a solution! The problem were missing fonts. After following these very helpful steps by Andreas Ahlenstorf and installing the font-package dejavu-fonts on linux everything works fine.

I'm having an XA_END error while trying to send a message from my banking application T24 to WMQ through my application server JBOSS

I'm setting up the Banking application I use(T24) to send and receive messages from IBM MQ. I'm getting errors when I connect my application server(JBOSS 7) to MQ
I've tried altering the MDB's but to no avail.
This is a snippet from my Log file:
2019-03-22 17:00:17,269 INFO [org.jboss.as.connector.deployers.RaXmlDeployer] (default-threads - 13) wmq.jmsra.rar: MQJCA4026:Transaction backed out with reason: 'The method 'xa_end' has failed with errorCode '100'.'.
2019-03-22 17:00:17,269 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (default-threads - 24) IJ000612: Destroying connection that could not be successfully matched: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener#213a8b6c[state=NORMAL managed connection=com.ibm.mq.connector.outbound.ManagedConnectionImpl#3db98551 connection handles=0 lastReturned=1553274017260 lastValidated=1553274017260 lastCheckedOut=1553274017260 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool#2185ef44 mcp=SemaphoreConcurrentLinkedQueueManagedConnectionPool#52753b07[pool=WMQ Connection Pool] xaResource=XAResourceWrapperImpl#518c200e[xaResource=com.ibm.mq.connector.xa.XARWrapper#67583e6a pad=false overrideRmValue=null productName=IBM MQ productVersion=#(#) MQMBID sn=p910-L180709.TRIAL su=_QGElQYNUEeidSaRkJ_p2Kg pn=com.ibm.mq.connector/src/com/ibm/mq/connector/outbound/ManagedConnectionMetaDataImpl.java jndiName=java:jboss/jms/MQConnectionFactory] txSync=null]
2019-03-22 17:00:17,269 WARN [com.arjuna.ats.jta] (default-threads - 13) ARJUNA016045: attempted rollback of < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a81701:-783f63b7:5c951441:40a3, node_name=1, branch_uid=0:ffffc0a81701:-783f63b7:5c951441:40b4, subordinatenodename=null, eis_name=java:jboss/jms/MQConnectionFactory > (XAResourceWrapperImpl#44eb1bdd[xaResource=com.ibm.mq.connector.xa.XARWrapper#c57055e pad=false overrideRmValue=null productName=IBM MQ productVersion=#(#) MQMBID sn=p910-L180709.TRIAL su=_QGElQYNUEeidSaRkJ_p2Kg pn=com.ibm.mq.connector/src/com/ibm/mq/connector/outbound/ManagedConnectionMetaDataImpl.java jndiName=java:jboss/jms/MQConnectionFactory]) failed with exception code XAException.XAER_NOTA: javax.transaction.xa.XAException: The method 'xa_rollback' has failed with errorCode '-4'.
at com.ibm.mq.jmqi.JmqiXAResource.rollback(JmqiXAResource.java:874)
at com.ibm.mq.connector.xa.XARWrapper.rollback(XARWrapper.java:605)
at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.rollback(XAResourceWrapperImpl.java:196)
at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:369)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2999)
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2978)
at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1658)
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:127)
at com.arjuna.ats.arjuna.AtomicAction.abort(AtomicAction.java:186)
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.rollbackAndDisassociate(TransactionImple.java:1282)
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:143)
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:134)
at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.afterDelivery(MessageEndpointInvocationHandler.java:69)
at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.handle(AbstractInvocationHandler.java:60)
at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:135)
at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73)
at com.temenos.tafj.mdb.TransactedMDB$$$endpoint1.afterDelivery(Unknown Source)
at com.ibm.mq.connector.inbound.AbstractWorkImpl.run(AbstractWorkImpl.java:343)
at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:223)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:808)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:849)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
That error can be safely ignored.
XAER_NOTA is a valid return from xa_rollback()
The XA specification indicates that "[a]n RM can also unilaterally roll back and forget a branch any time except after a successful prepare"

Milo: Connect to (public) OPC-UA-Server

First of all: I'm a newbie to OPCUA. :)
I'm trying to connect an Milo Client to our Server but don't really understand whats going wrong. The sample Client and Server work fine together, but when I try to connect the client sample with one of the public OPC-UA-Test-Servers I get those exceptions:
15:48:34.729 [ua-netty-event-loop-0] DEBUG
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler
- Sent Hello message on channel=[id: 0xc22800c2, L:/10.22.19.217:58947 - R:opcua.demo-this.com/52.233.134.134:51210]. 15:48:34.729 [ua-netty-event-loop-0] WARN io.netty.channel.DefaultChannelPipeline -
An exceptionCaught() event was fired, and it reached at the tail of
the pipeline. It usually means the last handler in the pipeline did
not handle the exception. java.io.IOException: An existing connection
was forcibly closed by the remote host at
sun.nio.ch.SocketDispatcher.read0(Native Method) at
sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) at
sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) at
sun.nio.ch.IOUtil.read(IOUtil.java:192) at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) at
io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:221)
at
io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:898)
at
io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242)
at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119)
at
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371) at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745) 15:48:39.612
[ForkJoinPool.commonPool-worker-1] DEBUG
org.eclipse.milo.opcua.stack.client.ClientChannelManager - Channel
bootstrap failed: timed out waiting for acknowledge
org.eclipse.milo.opcua.stack.core.UaException: timed out waiting for
acknowledge at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler.lambda$startHelloTimeout$4(UaTcpClientAcknowledgeHandler.java:156)
at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler$$Lambda$27/469017260.run(Unknown
Source) at
io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:581)
at
io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:655)
at
io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:367)
at java.lang.Thread.run(Thread.java:745) 15:48:39.613 [main] ERROR
org.eclipse.milo.examples.client.ClientExampleRunner - Error running
example: UaException: status=Bad_Timeout, message=timed out waiting
for acknowledge java.util.concurrent.ExecutionException: UaException:
status=Bad_Timeout, message=timed out waiting for acknowledge at
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1887)
at
org.eclipse.milo.examples.client.ClientExampleRunner.createClient(ClientExampleRunner.java:56)
at
org.eclipse.milo.examples.client.ClientExampleRunner.run(ClientExampleRunner.java:103)
at
org.eclipse.milo.examples.client.BrowseExample.main(BrowseExample.java:40)
Caused by: org.eclipse.milo.opcua.stack.core.UaException: timed out
waiting for acknowledge at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler.lambda$startHelloTimeout$4(UaTcpClientAcknowledgeHandler.java:156)
at
org.eclipse.milo.opcua.stack.client.handlers.UaTcpClientAcknowledgeHandler$$Lambda$27/469017260.run(Unknown
Source) at
io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:581)
at
io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:655)
at
io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:367)
at java.lang.Thread.run(Thread.java:745) 15:48:42.842
[threadDeathWatcher-2-1] DEBUG io.netty.buffer.PoolThreadCache - Freed
2 thread-local buffer(s) from thread: ua-netty-event-loop-0
I took the sample-Code and removed the Certificate/Keypair and changed the URL to opc.tcp://opcua.demo-this.com:51210/UA/SampleServer since the public server doesn't need authorization:
SecurityPolicy securityPolicy = clientExample.getSecurityPolicy();
EndpointDescription[] endpoints = UaTcpStackClient.getEndpoints("opc.tcp://opcua.demo-this.com:51210/UA/SampleServer").get();
EndpointDescription endpoint = Arrays.stream(endpoints)
.filter(e -> e.getSecurityPolicyUri().equals(securityPolicy.getSecurityPolicyUri()))
.findFirst().orElseThrow(() -> new Exception("no desired endpoints returned"));
logger.info("Using endpoint: {} [{}]", endpoint.getEndpointUrl(), securityPolicy);
loader.load();
OpcUaClientConfig config = OpcUaClientConfig.builder()
.setApplicationName(LocalizedText.english("eclipse milo opc-ua client"))
.setApplicationUri("urn:eclipse:milo:examples:client")
//.setCertificate(loader.getClientCertificate())
//.setKeyPair(loader.getClientKeyPair())
.setEndpoint(endpoint)
.setIdentityProvider(clientExample.getIdentityProvider())
.setRequestTimeout(uint(5000))
.build();
return new OpcUaClient(config);
What am I missing?
Greetings and thanks in advance :)
Buried in that stack trace is the real problem: UaException: timed out waiting for acknowledge.
Maybe your firewall or network setup is blocking it, or maybe the server didn't send it back, but the problem is that the client never received the Acknowledge message in response to its Hello.
FWIW, I can run the ReadExample against that public server with no issue. In ReadExample I overrode getSecurityPolicy() and returned SecurityPolicy.None and in ClientExampleRunner just replaced the endpoint URL.

How to log connection info with Mybatis

When i have a error on a database connection, i need to log it (with Database name and username that tried to connect to the db, don't need to log the password), I use Sprig-Mybatis on my aplication.
Any ideas how to do that?
Best Regards
There is no other special way to do as a simple try/catch in java will get you the expection.
For example a simple program where I am calling a mybatis mapper method:
try{
List result = mapper.myBatisMapperMethod();//this is responsible to set up
//a connection and run a query
}
Suppose the above call fails due to invalid authentication say the below where my password is wrong connection
exception that I usually get in mybatis:
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'applicationUsername'.)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Login failed for user 'applicationUsername'.)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
... 65 more
Caused by:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'applicationUsername'.
what I do is have a simple catch to above try you can have an sql exception catched but here I use simply Exception.
catch(Exception e){
//Suppose you are using Log4j You can simply
logger.error("This is my error log message"+e.getMessage());
//The above will log any kind of exception including the authentication fail or you
can specifically log a particular kind of exception.Java wont log failed password it just logs the user who tried unless you explicitly want to log it.
}

JBoss EJB application stops accepting connections

We are running a web application that is deployed as a single ear file to JBoss 7.1.1 and is using a number of ejb's. We having an issue where everything is working just fine but about twice a day the application stops accepting connections. When this happens the following shows up in the server log:
14:49:00,582 ERROR [org.jboss.remoting.remote.connection] (Remoting "step" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1195986768
The following also appears upstream in the log:
14:33:29,042 INFO [org.jboss.as.naming] (Remoting "step" task-3) JBAS011806: Channel end notification received, closing channel Channel ID 676ac4e7 (inbound) of Remoting connection 611812ed to null
14:33:50,071 ERROR [org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler] (EJB default - 10) Could not write method invocation result for method due to : org.jboss.remoting3.NotOpenException: Writes closed
at org.jboss.remoting3.remote.RemoteConnectionChannel.openOutboundMessage(RemoteConnectionChannel.java:107) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]
at org.jboss.remoting3.remote.RemoteConnectionChannel.writeMessage(RemoteConnectionChannel.java:296) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA]
at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.writeMethodInvocationResponse(MethodInvocationMessageHandler.java:330)
at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$500(MethodInvocationMessageHandler.java:64)
at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:226)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]
This is the exception we are seeing on the client side when we try to create an ejb connection
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: Operation failed with status WAITING]
at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)
at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:121)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
Caused by: java.lang.RuntimeException: Operation failed with status WAITING
at org.jboss.naming.remote.protocol.IoFutureHelper.get(IoFutureHelper.java:89)
at org.jboss.naming.remote.client.NamingStoreCache.getRemoteNamingStore(NamingStoreCache.java:56)
at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateCachedNamingStore(InitialContextFactory.java:166)
at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateNamingStore(InitialContextFactory.java:139)
at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:104)
... 91 more
So far we have been unable to figure out what is causing the application to stop accepting ejb connections.
We have been able to figure out that if we start jboss and remove the application (or try to connect to a fresh JBoss instance where the application has not been deployed) we get the exact same error right down to the number of bytes in the "invalid message length of" error if we try to get an ejb connection.
We can also get a similar error if we try to connect to the application using some other protocol (e.g. if we type http://localhost:4447 into a browser window we see a similar exception but the length of the message is different).
The code that attemts the ejb connection looks like this:
public void initialize(String host, int port, String instance, String user, String password) {
this.host = host;
this.port = port;
this.user = user;
if (instance != null) {
this.instance = instance;
}
final Properties jndiProperties = new Properties();
String providerURL = "remote://" + host + ":" + port;
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, org.jboss.naming.remote.client.InitialContextFactory.class.getName());
jndiProperties.put(Context.PROVIDER_URL, providerURL);
jndiProperties.put("jboss.naming.client.ejb.context", true);
jndiProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
jndiProperties.put(Context.SECURITY_PRINCIPAL, user);
jndiProperties.put(Context.SECURITY_CREDENTIALS, password);
try {
context = new InitialContext(jndiProperties);
logger.info("JNDI context initialized.");
} catch (NamingException e) {
throw new RuntimeException(e);
}
}
When we open the JBoss admin console it indicates that the application is still deployed and enabled.
What would cause the application to stop accepting connections and given the errors we are seeing?
Any help would be greatly appreciated.
Thanks in advance.