on 02-16-2019 8:39 PM
Hello Experts .
I am getting java.lang.nullpointerexception in the below Groovy script Execution.
import com.sap.gateway.ip.core.customdev.util.Message
import com.equalize.cpi.converter.FormatConversionBean
def Message processData(Message message)
{ def fcb = new FormatConversionBean(message.exchange, message.getProperties())
def output = fcb.convert() message.setBody(output)
return message }
I have uploaded a Jar file(https://github.com/engswee/equalize-cpi-converter/releases/latest) in the Resources .
It is meant for conversion of file formats. I am looking forward to convert XML to flat file format. I have downloaded the jar file as mentioned in the below link
https://blogs.sap.com/2018/09/04/formatconversionbean-arrives-in-cpi/
I have set the parameters in the content modifier(set-parameters.png).
I have used the below xml as source
<?xml version=”1.0″ encoding=”UTF-8″?>
<ns0:MT_Deep xmlns:ns0=”urn:equalize/DeepFCC”>
<Delivery>
<Type>D</Type>
<DeliveryNo>Delivery2</DeliveryNo>
<Order>
<Type>O</Type>
<DeliveryNo>Delivery2</DeliveryNo>
<OrderNo>Order2_A</OrderNo>
<Item>
<Type>I</Type>
<OrderNo>Order2_A</OrderNo>
<ItemNo>10</ItemNo>
<Quantity>90</Quantity>
</Item>
<Item>
<Type>I</Type>
<OrderNo>Order2_A</OrderNo>
<ItemNo>20</ItemNo>
<Quantity>80</Quantity>
</Item>
</Order>
</Delivery>
</ns0:MT_Deep>
When I deploy and run the iflow I get java.lang.nullpointerexception in Groovy script Execution
Can you please let me know if I have missed out on anything?
Appreciate your support
Regards
Advit
My issue has been solved. I had named the groovy script with extension ".GROOVY" instead of ".groovy". It must be lowercase.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Advit, @advit_ramesh1
I am getting this same error. Do you mean you didn't name the script with the .groovy extension or was it another issue? I have this same error and unable to solve the problem.
I appreciate any help you can provide.
Thank you,
Rhonda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.