cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in JMS Receiver Adapter with special characters (Ž)

Former Member
0 Kudos

Hello:

We've an integration scenario with a JMS Receiver Adapter who sends JMS Messages from SAP to an external System. The message who we send is in xml format. This scenario is working fine, but recently we've found problems, with messages that contains special characters like Ž. The problem appears in the JMS Adapter. In the communication channel we can see the message:

Error while processing message '4f90c60d-326b-5faf-e100-0000ac16cf07';  detailed error description: java.lang.NullPointerException: while trying to invoke the method java.lang.Package.getName() of an object returned from java.lang.Class.getPackage() at com.sap.aii.af.service.util.ChainedRuntimeException.getMessage(ChainedRuntimeException.java:91)

And when we inspect the message in the audit log we can see:

....

Success MP: Entering module processor

Success MP: Processing local module localejbs/SAP XI JMS Adapter/ConvertMessageToBinary

Success MP: Processing local module localejbs/SAP XI JMS Adapter/SendBinarytoXIJMSService

Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException

In the Module Tab of the communication channel we've the modules:

SAP XI JMS Adapter/ConvertMessageToBinary

SAP XI JMS Adapter/SendBinarytoXIJMSService--> ModuleKey: exit -> JMSMessageType:Text

As we can see the problem is in the SendBinarytoXIJMSService module, who it's not capable to process the character Ž.

The messages is UTF-8 encoded (<?xml version="1.0" encoding="UTF-8" ?>)

We've tested adding the param JMSMessageType:bytes but with the same result.

¿ Do you know a way to avoid the problem ?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

try with jms message type parameter set to bytes in adapter module configuration for SendBinarytoXIJMSService module in receiver jms comm channel and see if it works.

Former Member
0 Kudos

We've tried it as i said in my prev. message.

We've tested adding the param JMSMessageType:bytes but with the same result.

We've tryed with other modules like MessageTransformBean  with the parameter

XML2Plain - Transform.ContentType - application/xml but with identical result (error)

former_member184681
Active Contributor
0 Kudos

Hi Fernando,

Are you sure your JMS receiver accepts the UTF-8 encoded message? Maybe you will simply have to modify the encoding of messages sent? You could use Text Codepage Conversion Bean or Message Transform Bean adapter modules for this purpose.

Hope this helps,

Greg

Former Member
0 Kudos

Yes, I'm sure about JMS receiver accepts UTF-8 encoded message. As I said the channel works fine, we only find problem with special characters (like Ž), but if we eliminate this special characters and resend the message the channel works fine.