I have created a custom Java component for use in LC Process Mgr.
Upon invoke of process containing component, component fails with the following message:
2011-02-28 16:28:31,260 ERROR [com.adobe.workflow.AWS] Cannot coerce object: com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter@cf7e441 of type: com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter to type: class com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter
Code is pretty basic:
ServiceClientFactory myFactory = ServiceClientFactory.createInstance();
TaskManagerQueryService queryManager = TaskManagerClientFactory.getQueryManager(myFactory);
TaskSearchFilter filter = new TaskSearchFilter();
filter.addCondition(TaskSearchingConstants.pSTATUS, Operator.EQUALS, "3");
List<TaskRow> result = queryManager.taskSearch(filter);
Error seems to occur with the creation of the List. This code works ok when run as standalone file in either Eclipse or Netbeans but not within the component.
All necessary JARs are included and are listed in the class-path in component.xml.
Does anyone have any ideas?
Thanks,
David
Solved! Go to Solution.
Views
Replies
Total Likes
Looks like a class loader issue. Usually this is caused by having the a class (TaskSearchFilte) in your component that on the server. In other words there are two copies of the TaskSearchFilte class - yours and the one already in LiveCycle - and they are in conflict.
If that's the case, the solution is simple:
<import-packages>
<package version="1.0">com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter</package>
<!-- add more as needed -->
</import-packages>
Views
Replies
Total Likes
Looks like a class loader issue. Usually this is caused by having the a class (TaskSearchFilte) in your component that on the server. In other words there are two copies of the TaskSearchFilte class - yours and the one already in LiveCycle - and they are in conflict.
If that's the case, the solution is simple:
<import-packages>
<package version="1.0">com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter</package>
<!-- add more as needed -->
</import-packages>
Views
Replies
Total Likes
Hodmi,
Thank you for your help. Your suggestion worked correctly, and the component is running well.
I removed the taskmanager-client.jar from the library and added a reference to it in the buildpath. Also added the reference to the package in the component.xml within the import-packages.
I appreciate your help with this issue.
Cheers!
David
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies