activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "REJI R S (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQ-1924) Error: unexpected message type received - expected BytesMessage - While invoking the client program.
Date Tue, 02 Sep 2008 13:51:52 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

REJI R S updated AMQ-1924:
--------------------------

    Description: 
i am trying to invoke a webservice using JMS transport. (SOAP over JMS). i have configured
Axis2.xml properly, added following entry http://ws.apache.org/axis2/1_1/jms-transport.html
followed this url for adding these entry.

 <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
       <parameter name="myTopicConnectionFactory">
        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
        	<parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
        </parameter>

        <parameter name="myQueueConnectionFactory">
        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
        	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
        </parameter>
	
        <parameter name="default">
        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
        	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
        </parameter>
    </transportReceiver>

i am able to deploy the webservice in Axis2 and wsdl was also generated properly. Using ActiveMQAxisClient.java
program invoking the webservice. The webserice is getting invoked and seeing loggers added
in the webservice method. But the method is not getting properly and getting the below exception,

log4j:WARN No appenders could be found for logger (org.apache.axis.AxisEngine).
log4j:WARN Please initialize the log4j system properly.
before invoke
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode: 
 faultString: Failed in GetTAddressImpl(); nested exception is: 
	failedSend; nested exception is: 
	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received -
expected BytesMessage
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}hostname:chn705087

Failed in GetTAddressImpl(); nested exception is: 
	failedSend; nested exception is: 
	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received -
expected BytesMessage
	at sample.addressbook.rpcclient.ActiveMQAxisClient.getTAddress(ActiveMQAxisClient.java:78)
	at sample.addressbook.rpcclient.ActiveMQAxisClient.main(ActiveMQAxisClient.java:42)
Caused by: failedSend; nested exception is: 
	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received -
expected BytesMessage
	at org.apache.axis.transport.jms.JMSSender.invoke(JMSSender.java:107)
	at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
	at org.apache.axis.client.Call.invoke(Call.java:2767)
	at org.apache.axis.client.Call.invoke(Call.java:2443)
	at org.apache.axis.client.Call.invoke(Call.java:2366)
	at org.apache.axis.client.Call.invoke(Call.java:1812)
	at sample.addressbook.rpcclient.ActiveMQAxisClient.getTAddress(ActiveMQAxisClient.java:71)
	... 1 more
Caused by: org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received
- expected BytesMessage
	at org.apache.axis.transport.jms.JMSConnector$SyncConnection$SendSession.call(JMSConnector.java:693)
	at org.apache.axis.transport.jms.JMSConnector$SyncConnection.call(JMSConnector.java:485)
	at org.apache.axis.transport.jms.JMSEndpoint.call(JMSEndpoint.java:71)
	at org.apache.axis.transport.jms.JMSSender.invoke(JMSSender.java:96)
	... 11 more

Can anybody suggest me a solution for this. Is this a bug in ActiveMQ. i believe ActiveMQ
is returning ActiveMQTextMessage, and the reciever is expecting ByteMessage. is there any
solution available for this.

I have attached the Client program ActiveMQAxisClient.java and all other files used to deploy
the webservice.

Thanks in advance,

Regards,
Reji


  was:
i am trying to invoke a webservice using JMS transport. (SOAP over JMS). i have configured
Axis2.xml properly, added following entry http://ws.apache.org/axis2/1_1/jms-transport.html
followed this url for adding these entry.

 <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
       <parameter name="myTopicConnectionFactory">
        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
        	<parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
        </parameter>

        <parameter name="myQueueConnectionFactory">
        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
        	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
        </parameter>
	
        <parameter name="default">
        	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
        	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
        </parameter>
    </transportReceiver>

i am able to deploy the webservice in Axis2 and wsdl was also generated properly. Using ActiveMQAxisClient.java
program invoking the webservice. The webserice is getting invoked and seeing loggers added
in the webservice method. But the method is not getting properly and getting the below exception,

log4j:WARN No appenders could be found for logger (org.apache.axis.AxisEngine).
log4j:WARN Please initialize the log4j system properly.
before invoke
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode: 
 faultString: Failed in GetTAddressImpl(); nested exception is: 
	failedSend; nested exception is: 
	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received -
expected BytesMessage
 faultActor: 
 faultNode: 
 faultDetail: 
	{http://xml.apache.org/axis/}hostname:chn705087

Failed in GetTAddressImpl(); nested exception is: 
	failedSend; nested exception is: 
	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received -
expected BytesMessage
	at sample.addressbook.rpcclient.ActiveMQAxisClient.getTAddress(ActiveMQAxisClient.java:78)
	at sample.addressbook.rpcclient.ActiveMQAxisClient.main(ActiveMQAxisClient.java:42)
Caused by: failedSend; nested exception is: 
	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received -
expected BytesMessage
	at org.apache.axis.transport.jms.JMSSender.invoke(JMSSender.java:107)
	at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
	at org.apache.axis.client.Call.invoke(Call.java:2767)
	at org.apache.axis.client.Call.invoke(Call.java:2443)
	at org.apache.axis.client.Call.invoke(Call.java:2366)
	at org.apache.axis.client.Call.invoke(Call.java:1812)
	at sample.addressbook.rpcclient.ActiveMQAxisClient.getTAddress(ActiveMQAxisClient.java:71)
	... 1 more
Caused by: org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received
- expected BytesMessage
	at org.apache.axis.transport.jms.JMSConnector$SyncConnection$SendSession.call(JMSConnector.java:693)
	at org.apache.axis.transport.jms.JMSConnector$SyncConnection.call(JMSConnector.java:485)
	at org.apache.axis.transport.jms.JMSEndpoint.call(JMSEndpoint.java:71)
	at org.apache.axis.transport.jms.JMSSender.invoke(JMSSender.java:96)
	... 11 more

Can anybody suggest me a solution for this. Is this a bug in ActiveMQ. i believe ActiveMQ
is returning ActiveMQTextMessage, and the reciever is expecting ByteMessage. is there any
solution available for this.

Thanks in advance,

Regards,
Reji



> Error: unexpected message type received - expected BytesMessage - While invoking the
client program.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1924
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1924
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>         Environment: SOAP Server used: AXIS2
> JMS server: apache-activemq-5.0.0
> OS: windows
> Java 1.4
>            Reporter: REJI R S
>         Attachments: ActiveMQAxisClient.java, AXISJMS.ZIP
>
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> i am trying to invoke a webservice using JMS transport. (SOAP over JMS). i have configured
Axis2.xml properly, added following entry http://ws.apache.org/axis2/1_1/jms-transport.html
followed this url for adding these entry.
>  <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
>        <parameter name="myTopicConnectionFactory">
>         	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
>         	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
>         	<parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
>         </parameter>
>         <parameter name="myQueueConnectionFactory">
>         	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
>         	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
>         	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
>         </parameter>
> 	
>         <parameter name="default">
>         	<parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
>         	<parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
>         	<parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
>         </parameter>
>     </transportReceiver>
> i am able to deploy the webservice in Axis2 and wsdl was also generated properly. Using
ActiveMQAxisClient.java program invoking the webservice. The webserice is getting invoked
and seeing loggers added in the webservice method. But the method is not getting properly
and getting the below exception,
> log4j:WARN No appenders could be found for logger (org.apache.axis.AxisEngine).
> log4j:WARN Please initialize the log4j system properly.
> before invoke
> Exception in thread "main" AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
>  faultSubcode: 
>  faultString: Failed in GetTAddressImpl(); nested exception is: 
> 	failedSend; nested exception is: 
> 	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received
- expected BytesMessage
>  faultActor: 
>  faultNode: 
>  faultDetail: 
> 	{http://xml.apache.org/axis/}hostname:chn705087
> Failed in GetTAddressImpl(); nested exception is: 
> 	failedSend; nested exception is: 
> 	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received
- expected BytesMessage
> 	at sample.addressbook.rpcclient.ActiveMQAxisClient.getTAddress(ActiveMQAxisClient.java:78)
> 	at sample.addressbook.rpcclient.ActiveMQAxisClient.main(ActiveMQAxisClient.java:42)
> Caused by: failedSend; nested exception is: 
> 	org.apache.axis.transport.jms.InvokeException: Error: unexpected message type received
- expected BytesMessage
> 	at org.apache.axis.transport.jms.JMSSender.invoke(JMSSender.java:107)
> 	at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
> 	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> 	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> 	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
> 	at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
> 	at org.apache.axis.client.Call.invoke(Call.java:2767)
> 	at org.apache.axis.client.Call.invoke(Call.java:2443)
> 	at org.apache.axis.client.Call.invoke(Call.java:2366)
> 	at org.apache.axis.client.Call.invoke(Call.java:1812)
> 	at sample.addressbook.rpcclient.ActiveMQAxisClient.getTAddress(ActiveMQAxisClient.java:71)
> 	... 1 more
> Caused by: org.apache.axis.transport.jms.InvokeException: Error: unexpected message type
received - expected BytesMessage
> 	at org.apache.axis.transport.jms.JMSConnector$SyncConnection$SendSession.call(JMSConnector.java:693)
> 	at org.apache.axis.transport.jms.JMSConnector$SyncConnection.call(JMSConnector.java:485)
> 	at org.apache.axis.transport.jms.JMSEndpoint.call(JMSEndpoint.java:71)
> 	at org.apache.axis.transport.jms.JMSSender.invoke(JMSSender.java:96)
> 	... 11 more
> Can anybody suggest me a solution for this. Is this a bug in ActiveMQ. i believe ActiveMQ
is returning ActiveMQTextMessage, and the reciever is expecting ByteMessage. is there any
solution available for this.
> I have attached the Client program ActiveMQAxisClient.java and all other files used to
deploy the webservice.
> Thanks in advance,
> Regards,
> Reji

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message