cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with DeepFCCBean

Former Member
0 Kudos

Dear all,

we habe an issue with the modul DeepFCCBean, what works perfect for a lot of different sceanrios.

The adapter config is:

In case the last field contains an error we get an exception -  if not it works fine.

Do you have an idea what to do to fix the issue?

working file (separator is a tab):

WB 1071 4 4711 936 5 1 1 1 1 10 ST 201506291624370364 11 1 1 1
WB 1071 4 4711 936 5 1 1 1 1 10 ST 201506291624370364 11 1 1 1

not working file (just deleted last "1"):

WB 1071 4 4711 936 5 1 1 1 1 10 ST 201506291624370379 11 1 1
WB 1071 4 4711 936 5 1 1 1 1 10 ST 201506291624370379 11 1 1

Exception:

Caused by: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: sap.com/com.equalize.xpi.af.modules.app) Exception raised from invocation of public com.sap.aii.af.lib.mp.module.ModuleData com.equalize.xpi.af.modules.util.AbstractModule.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.equalize.xpi.af.modules.FormatConversionBean@7b1a02ef for bean sap.com/com.equalize.xpi.af.modules.app*xml|com.equalize.xpi.af.modules.ejb.jar*xml|FormatConversionBean in application sap.com/com.equalize.xpi.af.modules.app.; nested exception is: java.lang.NullPointerException: while trying to invoke the method java.lang.String.trim() of a null object loaded from local variable 'fieldValue'

at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:88)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37)

... 49 more

Caused by: java.lang.NullPointerException: while trying to invoke the method java.lang.String.trim() of a null object loaded from local variable 'fieldValue'

at com.equalize.xpi.af.modules.util.RecordTypeParameters.createNewField(RecordTypeParameters.java:201)

at com.equalize.xpi.af.modules.util.RecordTypeParameters.extractLineContents(RecordTypeParameters.java:185)

at com.equalize.xpi.af.modules.deepfcc.DeepPlain2XMLConverter.extractLineToFieldList(DeepPlain2XMLConverter.java:142)

at com.equalize.xpi.af.modules.deepfcc.DeepPlain2XMLConverter.generateNestedContents(DeepPlain2XMLConverter.java:114)

at com.equalize.xpi.af.modules.deepfcc.DeepPlain2XMLConverter.parseInput(DeepPlain2XMLConverter.java:68)

at com.equalize.xpi.af.modules.FormatConversionBean.processModule(FormatConversionBean.java:14)

at com.equalize.xpi.af.modules.util.AbstractModule.process(AbstractModule.java:49)

at sun.reflect.GeneratedMethodAccessor2363.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)

... 55 more

Best Regards,

Thorsten

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi Thorsten

Thanks for providing details for the issue.

I've tried testing it out but could not reproduce the error.

I've tried removing the values from the last few fields as shown below.

And it still produces the result with those fields having empty value in the XML.

Can you please provide the following?

1. Attach the actual text file that fails in this thread.

2. Check if the EAR file that was deployed in your system is the latest one. The latest version was released on 11 Sep 2015.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng Swee,

yes, it is the latest version.

The files are:

working file
not working file

What else could be a potential problem?
We grab the file via normal file adapter.


Best Regards,
Thorsten

engswee
Active Contributor
0 Kudos

Hi Thorsten

I've tried testing this a few rounds but still could not reproduce the error. I'm really not sure why it's not working on your system.

What is your PI version and SP level?

Are there any modules before FormatConversionBean?

Did you try with different EOL characters - CRLF or just LF?

One last thought on this, since the file has just 1 record structure, perhaps you should fallback on using the standard adapter's FCC.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng Swee,

i can't switch to standard adapter's FCC because there is a big structure with nested elements for what i will love to have the module. (I just simplified the example)

There is another interesting thing i found out:

When i add parameter trimContents = 'N' the module is running sucessful. With the default trimContents = 'Y' it still fails.
But with trimContents = 'N', the last field is missing in the xml structure.


We have a normal File adapter with NFS, binary mode and no other module in the chain.


I debugged the RecordTypeParameters:

private String[] splitLineBySeparator(String input)


The split:

MyStringTokenizer tokenizer = new MyStringTokenizer(  "WB 1071 4 4711 936 5 10 ST 201506291624370379 1 1 1 ", " ", "",  "", "", "", true);

gives a null at the end, what seems to be the problem:

Empty entries in the middle of the record are looking well:



It would be perfect, if you could check it?


Best Regards,
Thorsten

engswee
Active Contributor
0 Kudos

Hi Thorsten

I managed to figure out why I couldn't reproduce the error earlier. In your module configuration, you specified Field8 twice, so there was a total of 17 fields. However, I manually typed the field names and did not have the duplicate Field8, so the total fields were 16.

Once I added a 17th field, I managed to reproduce the error.

I've done a quick fix for this and released a new version of the EAR file. Basically the fix will just add empty XML tags for the fields that are non existent at the end of the line.

In the longer run, this issue has helped to show a few areas in the module that could be enhanced in order to handle deviations/errors properly and provide a more accurate error to the developer.

These enhancements will take a bit longer to deliver, so I hope you can live with the quick fix at the moment.

Rgds

Eng Swee

Answers (0)