Exception while routing EDI doc to TN

Hi,

Can any one please help me in resolving this issue. I am trying to route a generated 4030 EDI 820 document to TN using “wm.tn.doc.xml:routeXml” service. The Trading Partner profiles for Sender as well receiver, TPA exists in TN.Also the document is installed in TN. And I am getting the following error message.

wm.tn.doc:recognize java.lang.NullPointerException java.lang.NullPointerException at com.wm.data.ValuesEmulator.get(ValuesEmulator.java:20) at wm.b2b.editn.EDIEnvelopeDocType$EnvelopeStatus.getSettings(EDIEnvelopeDocType.java:988) at wm.b2b.editn.EDIEnvelopeDocType.createEnvelope(EDIEnvelopeDocType.java:2179) at com.wm.app.tn.doc.BizDocTypeReg.recognizeAndCreate(BizDocTypeReg.java:505) at wm.tn.doc.recognize(doc.java:672) at sun.reflect.GeneratedMethodAccessor423.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:287) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:587) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:229) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:199) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:407) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:503) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:367) at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246) at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:157) at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324) at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:581) at com.wm.lang.flow.FlowState.step(FlowState.java:438) at com.wm.lang.flow.FlowState.invoke(FlowState.java:403) at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1749) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:587) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:229) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:199) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:407) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:503) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:367) at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246) at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:157) at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324) at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:581) at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:487) at com.wm.lang.flow.FlowState.invoke(FlowState.java:376) at wm.server.flowimpl.stepFlow(flowimpl.java:183) at sun.reflect.GeneratedMethodAccessor371.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:294) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:587) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:229) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:199) at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:39) at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:407) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:503) at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:367) at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246) at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119) at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:167) at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:298) at com.wm.util.pool.PooledThread.run(PooledThread.java:105) at java.lang.Thread.run(Thread.java:534)

From the error stack Trace I understand that it got problems in “wm.tn.doc:recognize” service without specific error message even in the piepline. Your suggestions/help would be much appreciated.

-Dinakar

Yes the error is in recognize…

Are you seeing this error in the ActivityLog?? Is X12 4030 820,X12 Group,X12Envelope getting created after your routing and shows up in the Transaction Analysis section?? At what level you are getting this error in TN …once you step after routeXML step and you see this error in TN?? Also what is your processing rule doctype criteria looking for X12Envelope or Transaction level??

HTH,
RMG

Hi RMG, Thanks for the quick reply. The document is not received in TN and so no Activity log information. The error is showing me in webMethods service where I am routing the document to TN using routeXml. I am seeing this error in the getLastError catch block in my service. And my processing rule doc type is X12 Envelope since it is outbound that needs to be delivered to the Trading Partners. I am using webMethods 6.1.1 plus SP2.

Do you have a variable named edidata in the pipeline when you call routeXml?

RMG,

Yes, I have edidata variable in the pipeline while invoking routeXml service and the generated EDI 820 string data is stored in it. I am not using TN_parms since it is optional.

The result of addICEnvelope I am mapping to edidata in DocToDeliver document and giving this DocToDeliver as the scope in the routeXml service. Is it some thing wrong from webMethods service side or Trading Networks side?

  • Dinakar.

Are you specifying a scope when calling the service? Can you post a screenshot of the step showing the Pipeline pane?

Dinakar,

You can route the edidata with out using scope also…Once you add the Envelopes to the edidata using addICEnvelope service you can just map documentlist output to the same edidata and then map this edidata to routeXML(node) this should be cleaner way.

Also check if you’re missing anything in the addICEnvelope,for testing use envelopeProcess service it will validate the envelopes…just run the envelopeProcess service individually and past the edidata input and see the pipe results.

Yeh ofcourse no need to use TN_PARAMS…

HTH,
RMG

Rob,

Here are the screenshots of the pipeline.

  • Dinakar.

I am using the document name (DocToDeliver) in the scope property for the routeXml service. The Envelope, Group and Transaction level data is showing properly in the Pipeline. But I am seeing the initially posted message in the localizedError variable.

  • Dinakar.

Sorry if I wasn’t clear. I wanted screen shots of the Pipeline tab–which is the window below the FLOW service pane. You posted the Results pane. Please post a screenshot with the routeXml step highlighted and the Pipeline tab visible.

Are the Results you posted before or after the error occurs?

Sorry I was misunderstood. Here is the screen shot of the Pipeline information for routeXml.

-Dinakar.

Did you tried testing with out using scope as told above?? I believe the need of Scope is just it will send the wanted pipeline variable to TN instead of sending entire pipeline stuff internally to TN.

Is your scope “DocToDeliver” record has the edidata string wrapped inside it?? then only scope works.

HTH,
RMG

I tried using edidata variable directly mapped to node of the routeXml service. Even then it didnt work.

Yes, the edidata is wrapped inside DocToDeliver document in the addICEnvelope service just before routeXml.

  • Dinakar.

The use of the scope appears to be okay.

I have some other things that I’d check but I think now we’re getting into deeper troubleshooting than is appropriate for the forums. You’ll probably be best served by opening a ticket with wM support and doing a WebEx session with them.

Mapping edidata to the node input is not necessary. If edidata is present in the pipeline, it will be processed, regardless of the presence/absence of node. Plus, node must be a specific object type when it is used, not a string.

RMG/Rob,

My problem got fixed with no change either in the webMethods service nor in the TN. It was just a restart of Integration Server. But restart of IS was accidental and had to do for some other reasons. After restart suddenly noticed the service routing the document successfully to TN and everything from there onwards as configured. Thanks for your help.

  • Dinakar.

:slight_smile: Restart option always helps no matter what the issue is…thats what it is…:wink:

-RMG

Hello,
I am also getting the similar exception while using wm.tn.receive service
to be precie the error occurs when the Flow service contaning wm.tn.receive is called from the webSphere MQ adapter Notification. If I save pipeline and restore then wm.tn.receive works fine because when I restore the pipeline and trace the flow the document get posted with my username. But when webSphere MQ adapter Notification executes the Flow service contaning wm.tn.receive throws below exception saying “No session available”

wm.tn.doc:checkUser com.wm.app.b2b.server.ServiceException No session available com.wm.app.b2b.server.ServiceException: No session available at wm.tn.docimpl.checkUser(docimpl.java:1067) at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code)) at java.lang.reflect.Method.invoke(Method.java(Compiled Code)) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java(Compiled Code)) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java(Compiled Code)) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java(Compiled Code)) at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java(Compiled Code)) at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java(Compiled Code)) at com.wm.app.b2b.server.ACLManager.process(ACLManager.java(Compiled Code))

What happens when you use wm.tn.doc.xml:routeXML service in replace of wm.tn:receive? Can you try this test aswell??

HTH,
RMG