Problem with appendToDocumentList

Hi,

I am trying to append a document to document list using appendToDocumentList.
Intially it was working fine, but all of a sudden getting this error. I haven’t done any chances to the flow service.

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to [Lcom.wm.data.IData;

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to [Lcom.wm.data.IData;
at pub.list.appendToDocumentList(list.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:439)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:194)
at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:584)
at com.wm.lang.flow.FlowState.step(FlowState.java:444)
at com.wm.lang.flow.FlowState.invoke(FlowState.java:409)
at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1057)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:46)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:160)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:181)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:355)
at com.wm.util.pool.PooledThread.run(PooledThread.java:131)
at java.lang.Thread.run(Thread.java:662)
Intergration Server version is 8.2 SP2

Please help me to resolve this.

solved…

sounds not very familiar problem, can you please post the scenario and resolution here?

Please check the input document for appendToDocumentList…make sure it is a doclist in case input to AppendToDocumentList is Doc List and if it is Doc in the input is Doc

Hi,

I am trying to append a document to document list using appendToDocumentList.
Intially it was working fine, but all of a sudden getting this error. I haven’t done any chances to the flow service.

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to [Lcom.wm.data.IData;

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to [Lcom.wm.data.IData;
at pub.list.appendToDocumentList(list.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

I am facing the same issue.Could you please help me to resolve this.

Thanks
Sushma

Check your mapping and re-do the mapping for appendToDocumentList.

Sushma – If you debug the code then you will understand the issue more clearly. Earlier you might be passing different values and now they may be different.

Thanks,

Hi,

Thanks for the immediate response.

I am altering my question based on my exact requirement.

I have an XML file with only one record in it and I want to append the future records in to the same file.

I am using appendToDocument list service for the same and which is error out because of the single existing record reflecting as a document instead of document list which is an input to appendToDocument list service.

Can you provide a solution for this situation.

Thanks,

Sushma – Map the doc to ‘fromItem’ and check is the map works.

Thanks,

@MR as173d: There are 2 things here. 1) Single record already present in the file which is reflecting as a document because of single entry.
2) New record to be inserted also being a document instead of document list.

Can you please let me know the solution for this.

thanks,
Naveen

Hi,

can you share some screnshots of your service as well as description of the document structure?

I assume following flow:

  • read file as XML String
  • transform XML String to document
  • extract the document list from the document
  • add the new document to the list
  • put the list back to main document
  • transform document to XML String
  • write the XML String to the file

I am aware that some of the steps might be 2-step implementations or that some of them can be done in one single step.

@Naveen:
point 2 is clear.
point 1 check my pseudo code above (you might need to define an empty list, first add the existing single entry to it and then add the new entry.

Regards,
Holger

Naveen – I was quite busy with my office work, so didn’t get time to respond earlier. Please share your screen shots showing your implementation. Holger pseudo code is fine, you can use it as reference. If required go through BIS guide to more understand service usage.

Thanks,

Hi,

I am trying to append a document to document list using appendToDocumentList.
Intially it was working fine, but all of a sudden getting this error. I haven’t done any chances to the flow service.

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to [Lcom.wm.data.IData;

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to [Lcom.wm.data.IData;
at pub.list.appendToDocumentList(list.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

I am facing the same issue.Could you please help me to resolve this.

Is it prod? Did you follow the steps suggested in this thread?