axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5739) calling ServiceClient.fireAndForget and receiving java.lang.NoSuchMethodError getMessageFormatter
Date Wed, 10 Feb 2016 19:54:18 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141537#comment-15141537
] 

Andreas Veithen commented on AXIS2-5739:
----------------------------------------

> Are these not part of the axis2 libraries. You will notice there are no wso2 errors displayed.

You are drawing an incorrect conclusion here. Apache Axis2 is an Open Source project and anybody
can download the sources, modify them and build their own artifacts. Ideally people or companies
doing that should change the package names to avoid confusion, but not everybody does this.
In particular, WSO2 (unlike Oracle e.g.) is known not to rename packages. Therefore, just
because "org.apache.axis2" appears in the stack trace doesn't mean that an Apache Axis2 release
distributed by the ASF is used.

> Maybe the confusion is in how we named our versions in our maven repository. But, that
has nothing to do with wso2 other than that we are keeping track of which versions we are
maintaining together.

Why would you download an Apache Axis2 release distributed by the ASF and then change the
version to "...-wso2vXXX" (which is actually what WSO2 uses for their forks). If you have
an artifact with such a version number in your Maven repository, then the only reasonable
conclusion is that it is not from an Apache Axis2 release, but coming from WSO2.

> The axis2 libraries experienced a very similar error in 2013 and it was patched.

No, that issue was discussed on a WSO2 mailing list and is related to a problem in their fork,
not in Apache Axis2:

http://mail.wso2.org/mailarchive/dev/2013-May/017471.html

> calling ServiceClient.fireAndForget and receiving java.lang.NoSuchMethodError getMessageFormatter
> -------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5739
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5739
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.7.0
>         Environment: linux
>            Reporter: erica peters
>            Priority: Critical
>
> 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) {
> 				endpointName = endpointMapping.get(this.endpoint);
> 			}
> 			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) {
> 					serviceClient.getOptions().setProperty(JMSConstants.JMS_PRIORITY, priorityAsync);
> 				}
> 				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) {
> 			LoggingAndReport.error(ServiceInvoker.class.getName(), "deliverAsync", GeneralUtils.getStackTrace(ex));
> 		}
> 		finally{
> 			//Cleanup Connection if necessary
> 			try {
> 				serviceClient.cleanupTransport();
> 				scp.returnObject(serviceClient);
> 			} 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message