Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Invalid
-
1.7.0
-
None
-
None
-
linux
-
Important
Description
We are trying to upgrade to the newest version of wso2as. However, we are unable to send asynchronous messages based on the following errors received (code source will be at the bottom):
TID: [-1] [] [2016-02-04 12:31:07,912] WARN
{org.apache.axis2.transport.base.TransportMBeanSupport} - Error registering a MBean with objectname ' org.apache.axis2:Type=Transport,ConnectorName=jms-sender ' for JMX management {org.apache.axis2.transport.base.TransportMBeanSupport}javax.management.InstanceAlreadyExistsException: org.apache.axis2:Type=Transport,ConnectorName=jms-sender
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
at org.apache.axis2.transport.base.TransportMBeanSupport.register(TransportMBeanSupport.java:91)
at org.apache.axis2.transport.base.AbstractTransportSender.init(AbstractTransportSender.java:84)
at org.apache.axis2.transport.jms.JMSSender.init(JMSSender.java:63)
at org.apache.axis2.context.ConfigurationContextFactory.initTransportSenders(ConfigurationContextFactory.java:300)
at org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:231)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:210)
at com.solers.espds.util.messaging.ServiceClientPoolFactory.create(ServiceClientPoolFactory.java:50)
at com.solers.espds.util.messaging.ServiceClientPoolFactory.create(ServiceClientPoolFactory.java:24)
at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:60)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
at com.solers.espds.util.messaging.ServiceInvoker.deliverSync(ServiceInvoker.java:292)
at com.solers.espds.cim.userProfile.comm.UserManagerApi.getUserByLogin(UserManagerApi.java:1467)
at com.solers.espds.cim.dataIntake.userManager.PdaUserManager.getUserGroup(PdaUserManager.java:297)
at com.solers.espds.cim.dataIntake.userManager.PdaUserManager.hasAccess(PdaUserManager.java:312)
at com.solers.espds.cim.dataIntake.userManager.PdaUserManager.authenticate(PdaUserManager.java:92)
at com.solers.espds.cim.dataIntake.sftpServer.PdaSftpServer$1.authenticate(PdaSftpServer.java:215)
at org.apache.sshd.server.auth.UserAuthPassword.checkPassword(UserAuthPassword.java:55)
at org.apache.sshd.server.auth.UserAuthPassword.auth(UserAuthPassword.java:49)
at org.apache.sshd.server.session.ServerSession.userAuth(ServerSession.java:406)
at org.apache.sshd.server.session.ServerSession.handleMessage(ServerSession.java:215)
at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:566)
at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:236)
at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:58)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:697)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:651)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:640)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1111)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
TID: [-1234] [] [2016-02-08 12:21:01,817] ERROR
{org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver} - org.apache.axis2.transport.TransportUtils.getMessageFormatter(Lorg/apache/axis2/context/MessageContext;)Lorg/apache/axis2/transport/MessageFormatter; {org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver}java.lang.NoSuchMethodError: org.apache.axis2.transport.TransportUtils.getMessageFormatter(Lorg/apache/axis2/context/MessageContext;)Lorg/apache/axis2/transport/MessageFormatter;
at org.apache.axis2.transport.jms.JMSSender.createJMSMessage(JMSSender.java:328)
at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:159)
at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:141)
at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
at org.apache.axis2.client.ServiceClient.fireAndForget(ServiceClient.java:511)
at com.solers.espds.util.messaging.ServiceInvoker.deliverAsync(ServiceInvoker.java:259)
at com.solers.espds.cim.schedule.comm.ScheduleManagerApi.createDataIntakeEvent(ScheduleManagerApi.java:109)
at com.solers.espds.cim.dataIntake.FtpClientManager.pullFile(FtpClientManager.java:367)
at com.solers.espds.cim.dataIntake.comm.FtpClientManagerListener.pullFile(FtpClientManagerListener.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:328)
at org.apache.axis2.transport.jms.JMSMessageReceiver.processThoughEngine(JMSMessageReceiver.java:196)
at org.apache.axis2.transport.jms.JMSMessageReceiver.onMessage(JMSMessageReceiver.java:122)
at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.handleMessage(ServiceTaskManager.java:518)
at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.run(ServiceTaskManager.java:430)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Code Source:
public void deliverAsync(Message message) {
ServiceClient serviceClient = null;
try {
String namespace = namespaceMapping.get(this.endpoint);
String endpointName = endpointMapping.get("async" + this.endpoint);
serviceClient = scp.borrowObject();
// for endpoints not in PDA Properties
if (endpointName == null)
if (message.get("ZONE") != null)
{ String queue = endpointName.substring(0, endpointName.indexOf("?")) + "ProxyCBR"; String transportInfo = endpointName.substring(endpointName.indexOf("?")); endpointName = queue + transportInfo; } if (endpointName.startsWith("jms")) {
if (priorityAsync != null)
if (timeToLiveAsync != null)
{ serviceClient.getOptions().setProperty(JMSConstants.JMS_TIME_TO_LIVE, timeToLiveAsync); }if (deliveryModeAsync != null)
{ serviceClient.getOptions().setProperty(JMSConstants.JMS_DELIVERY_MODE, deliveryModeAsync); }}
// Add the operation to it.
AxisOperation operation = new OutOnlyAxisOperation();
operation.setName(new QName(namespace, this.action, prefix));
serviceClient.getAxisService().addOperation(operation);
// Set the endpoint and action.
serviceClient.getOptions().setTo(new EndpointReference(endpointName));
serviceClient.getOptions().setProperty(org.apache.axis2.Constants.Configuration.MESSAGE_TYPE, messageType);
// Add the message to the SOAP message.
OMFactory omFactory = OMAbstractFactory.getOMFactory();
OMElement actionElement = omFactory.createOMElement(this.action, null);
// Grab the root element
actionElement.addChild(message.wso2());
actionElement.setNamespace(new OMNamespaceImpl(namespace, prefix));
LoggingAndReport.debug(ServiceInvoker.class.getName(), "deliverAsync", "endpointName: " + endpointName);
LoggingAndReport.debug(ServiceInvoker.class.getName(), "deliverAsync", "action: " + this.action);
// Send the message.
serviceClient.fireAndForget(new QName(namespace, this.action, prefix), actionElement);
Thread.sleep(1000);
omFactory = null;
actionElement = null;
operation = null;
} catch (Exception ex)
finally{
//Cleanup Connection if necessary
try
catch (AxisFault e)
{ e.printStackTrace(); } }
}
The error in the logs is a java.lang.NoSuchMethodError. The TransportUtils, MessageContext and MessageFormatter class files all exist in both the wso2v6 and wso2v14 version of the axis2 jar.
Since the error is referencing TransportUtils, I went ahead and reverse engineered both versions of that class file. The getMessageFormatter method does NOT exist in the wso2v14 version of the TransportUtils class. That being said, I do see where it exists now (BaseUtils) but it's the code from within axis2 that is failing. I cannot make the change.