Posts in Category "SDK"

LiveCycle ES: ALC-DSC-119-000: InvalidCoercionException using a custom component

Issue

The exception below occurs when using a custom component (DSC) in LiveCycle ES 8.2.1 designed to extend the functionality provided by the services from Adobe. The component includes the TaskManager DSC JAR file.

####<09-Jul-2010 15:04:21 o'clock CEST> <Error> <com.adobe.workflow.AWS> <PI> <server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> 
<<anonymous>> <BEA1-2CB96822045F171B0B4D> <> <1278680661381> <000000> <stalling action-instance: 2101 with message: Cannot coerce object: 
com.adobe.idp.taskmanager.dsc.userservice.UserServiceInfo@33142fb of type: com.adobe.idp.taskmanager.dsc.userservice.UserServiceInfo to type: 
class com.adobe.idp.taskmanager.dsc.userservice.UserServiceInfo:

ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: com.adobe.idp.taskmanager.dsc.userservice.UserServiceInfo@33142fb of type: 
com.adobe.idp.taskmanager.dsc.userservice.UserServiceInfo to type: class com.adobe.idp.taskmanager.dsc.userservice.UserServiceInfo
at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:1047)
at com.adobe.workflow.datatype.CoercionUtil.toType(CoercionUtil.java:168)
at com.adobe.workflow.engine.PEUtil.processMapping(PEUtil.java:968)
at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:666)
at com.adobe.workflow.engine.SynchronousBranch.handleInvokeAction(SynchronousBranch.java:466)
at com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:863)
at com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBean.java:2773)
at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncInvokeProcessCommand(ProcessEngineBMTBean.java:704)
at com.adobe.workflow.engine.adobe_ProcessEngineBMTEJB_e5zjcz_ELOImpl.asyncInvokeProcessCommand(adobe_ProcessEngineBMTEJB_e5zjcz_ELOImpl.java:1697)
at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControllerBean.java:156)
at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandControllerBean.java:99)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:3962)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

Reason

This error occurs when you include the TaskManager DSC JAR in your component. The TaskManager DSC (that is, the service itself) is not meant for use as a library.

Solution

Remove the TaskManager JAR from your component and use the libraries provided with the SDK. Or, extract any required classes from the DSC JAR and include them in your component.

reference (181617740/2660587)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 1.0/10 (1 vote cast)

LiveCycle ES2: NoSuchMethodError calling the Java API PDFUtilityServiceClient.getPDFProperties()

Issue

 If you are using the Java API from LiveCycle ES2 to interact with PDF documents you may notice the following exception when calling the PDFUtilityServiceClient.getPDFProperties() method:

2010-05-25 15:21:35,120 DEBUG main - Class - isDynamicOrShell: start pdf=<document state="passive" senderVersion="0" persistent="false" senderPersistent="false" passivated="true" senderPassivated="false" deserialized="false" senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="false" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="0"><cacheId/><localBackendId/><globalBackendId><DocumentFileID fileName="C:\DOKUME~1\j253720\LOKALE~1\Temp\AdobeDocumentStorage\global\removeOn2010Y05M25D15h31m34s.1274794294000\1585088904463767867"/><globalBackendId/><senderLocalBackendId/><senderGlobalBackendId/><inline/><attributes file="junitWithLinkages\files\Ablage_Und_Archiv_PDF\Testpdf_S100421D421800200807141621520915_XFAFORM_dynamisch_1_Sig_SignoTec.pdf"/></document>
2010-05-25 15:21:35,120 DEBUG main - Class - getServiceClientFactory() - getting factory authenticated DSC_CREDENTIAL_USERNAME=administrator
2010-05-25 15:21:35,198 DEBUG main - JUnitExaminePDFCharacteristics - Error in TestIsDynamicOrShell
ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal Error.
 at com.adobe.livecycle.pdfutility.client.PDFUtilityServiceClient.getPDFProperties(PDFUtilityServiceClient.java:134)
 at osplus.dms.service.renderengine.livecycle.ExaminePDFCharacteristics.isDynamicOrShell(ExaminePDFCharacteristics.java:40)
 at mainapp.util.JUnitExaminePDFCharacteristics.testIsDynamicOrShell(JUnitExaminePDFCharacteristics.java:43)
 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 junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare(TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:118)
 at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NoSuchMethodError: com.adobe.idp.Document.setInitialContext(Ljavax/naming/InitialContext;)V
 at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java:178)
 at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:66)
 at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
 at com.adobe.livecycle.pdfutility.client.PDFUtilityServiceClient.getPDFProperties(PDFUtilityServiceClient.java:107)
 ... 18 more
Caused by: java.lang.NoSuchMethodError: com.adobe.idp.Document.setInitialContext(Ljavax/naming/InitialContext;)V
 at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initJndiContext(EjbMessageDispatcher.java:231)
 at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.getJndiContext(EjbMessageDispatcher.java:241)
 at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher.java:91)
 at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java:141)
 ... 21 more

Solution

 This exception occurs when you try to call the method on the client side.  You need to call this method on the server side.

reference: (181607409)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

LiveCycle ES: TaskPermissionsException using TaskManager.getTaskInfo()

Issue

When you use the LiveCycle ES APIs to access tasks through the TaskManager.getTaskInfo() method, LiveCycle may return the following error:

TaskPermissionsException User: A50D7ECD-15F5-6B60-9619-44F68536EC32 does have access to get the data for the task: 560701.

You may be using code similar to the following when trying to access the tasks:

TaskManager taskManager = TaskManagerClientFactory.getTaskManager(connectionFactory.getAlcServerConnection());

TaskInfo taskInfo = taskManager.getTaskInfo(new Long(taskId)); 

If you do not have the right permissions for the user context running this code, then you will receive the exception above.

Solution

To execute this method with a user other than the super administrator, manually add the Workflow Process Administrator Role to that user. You can add this role to the user account in the adminui (Home > Settings > User Management > Role Management).

reference: (181498712)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 10.0/10 (1 vote cast)

LiveCycle ES: InvalidCoercionException when using TaskManagerQueryService.taskSearch(TaskSearchFilter filter)

Issue

When you use the API in LiveCycle ES to call the method, “TaskManagerQueryService.taskSearch(TaskSearchFilter filter),” the following exception may occur:

ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: 
com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter@1972b9a of type: 
com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter to type: 
class com.adobe.idp.taskmanager.dsc.client.query.TaskSearchFilter
 at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:1047)
 at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:127)
 at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
 at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
 at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:342)
 at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(EjbTransactionCMTAdapterBean.java:212)
 at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapter_z73hg_ELOImpl.doSupports

Solution

  1.  Make sure that the processId object passed into the filter.addCondition() is a valid object.
  2. Verify that the libraries you are importing contain no abstract references to classes with similar names and make sure that they are the latest versions.

Additional Information

Here is the code which would generate the error message above (or download here):

____________________________

 

ServiceClientFactory factory = ServiceClientFactory.createInstance(context);

TaskManagerQueryService queryManager = TaskManagerClientFactory.getQueryManager(factory);

TaskManager taskManager = TaskManagerClientFactory.getTaskManager(factory);

TaskSearchFilter filter = new TaskSearchFilter();

filter.addCondition(TaskSearchingConstants.pPROCESS_INSTANCE_ID, Operator.EQUALS, processId);

filter.addSortAsc(TaskSearchingConstants.pPROCESS_START_TIME);

// To look on every task !!! Need to have an Administrator context!!!

filter.setAdminIgnoreAllAcls(true);

List<TaskRow> result = queryManager.taskSearch(filter);

____________________________

reference: (181492707)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

LiveCycle ES: IDPSystemExceptionorigin using DirectoryManagerServiceClient.findGroupMembers()

Issue

When you use the LiveCycle ES API method “DirectoryManagerServiceClient.findGroupMembers()” in a custom application, the following exception may occur:

####<Mar 8, 2010 9:31:28 AM MET> <Info> <EJB> <sunc01126> <wl01ialc01> <[ACTIVE] ExecuteThread: '1' for queue: 
'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-0F2A55F8B8D325A5DE0E> <> <1268037088883> <BEA-010051> 
<EJB Exception occurred during invocation from home: 
com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean_jrc290_LocalHomeImpl@ad9846 threw exception: 
com.adobe.idp.common.errors.exception.IDPSystemExceptionorigin: | 
[com.adobe.idp.storeprovider.jdbc.DBObjectSet] errorCode:12290 errorCodeHEX:0x3002 message:nextElement failure| 
[com.adobe.idp.storeprovider.jdbc.DBResult] errorCode:12290 errorCodeHEX:0x3002 message:object update failure| 
[com.adobe.idp.common.infomodel.StoreId] errorCode:12550 errorCodeHEX:0x3106 message:string length wrong
com.adobe.idp.common.errors.exception.IDPSystemExceptionorigin: | 
[com.adobe.idp.storeprovider.jdbc.DBObjectSet] errorCode:12290 errorCodeHEX:0x3002 message:nextElement failure| 
[com.adobe.idp.storeprovider.jdbc.DBResult] errorCode:12290 errorCodeHEX:0x3002 message:object update failure| 
[com.adobe.idp.common.infomodel.StoreId] errorCode:12550 errorCodeHEX:0x3106 message:string length wrong
 at com.adobe.idp.common.util.IDPUtil.raiseIDPSystemException(IDPUtil.java:147)
 at com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean.findGroupMembers(DirectoryServicesManagerBean.java:4261)
 at com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean_jrc290_ELOImpl.findGroupMembers(DirectoryServicesManagerBean_jrc290_ELOImpl.java:1504)
 at com.adobe.idp.um.api.impl.DirectoryManagerImpl.findGroupMembers(DirectoryManagerImpl.java:928)
 at com.adobe.idp.um.dscservice.DirectoryManagerServiceImpl.findGroupMembers(DirectoryManagerServiceImpl.java:238)
 at sun.reflect.GeneratedMethodAccessor1366.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)

 Solution

  1. Validate the GroupOID string and ensure that it is not the standard Group name, but an identifier of 36 characters.
  2. Validate the members of the group to ensure that they are valid objects. It is possible that one of the members has been corrupted due to manual changes through the API. Remove any corrupt members and re-create them to proceed.

Additional information

The most likely cause of this exception is that there is an invalid GroupOID being passed into the search filter used in the findGroupMembers() method. The OID strings are identifiers with 36 characters. You cannot use the standard Group name for the search filter. You can verify the GroupOID and the members of the group are valid by using the following code:
_____________________________________

DirectoryManagerServiceClient dmsc = new DirectoryManagerServiceClient(myFactory);
Principal group = dmsc.findPrincipal("9462F437-8669-0D04-24F8-F00CDF80A09E");
System.out.println("Group found: "+group.getCommonName());

GroupMembershipSearchFilter gsf = new GroupMembershipSearchFilter();
gsf.setGroupOid("9462F437-8669-0D04-24F8-F00CDF80A09E");

List<Principal> members = dmsc.findGroupMembers(gsf);
System.out.println("Members found:"+members.size());

for(Principal p : members){
 System.out.println("Principal found: " + p.getCommonName());
}
__________________________________________

reference: (181484795)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

LiveCycle ES: ClassCastException calling deletePermsForPrincipalForRes(String, String, List)

Issue

If you are trying to remove permissions for a service in LiveCycle ES using the API method
  AuthorizationManager.deletePermsForPrincipalForRes(String principalOid, String resourceId, List permList)
you may encounter the following exception running your Java code:

| [com.adobe.idp.um.api.impl.AuthorizationManagerImpl] errorCode:16385 errorCodeHEX:0x4001 message:public method - 
| [IDPLoggedException] errorCode:8193 errorCodeHEX:0x2001 message:public method - chainedException:java.lang.ClassCastException: 
com.adobe.idp.um.api.infomodel.impl.PermissionImplchainedExceptionMessage:com.adobe.idp.um.api.infomodel.impl.PermissionImpl 
chainedException trace:java.lang.ClassCastException: com.adobe.idp.um.api.infomodel.impl.PermissionImpl
    at com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean.modifyPermsToPrincipalForRes(DirectoryServicesManagerBean.java:7602)
    at com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean.deletePermsForPrincipalForRes(DirectoryServicesManagerBean.java:7752)
    at com.adobe.idp.um.businesslogic.directoryservices.DirectoryServicesManagerBean_jrc290_ELOImpl.deletePermsForPrincipalForRes(DirectoryServicesManagerBean_jrc290_ELOImpl.java:2066)
    at com.adobe.idp.um.api.impl.AuthorizationManagerImpl.deletePermsForPrincipalForRes(AuthorizationManagerImpl.java:860)
    at com.adobe.idp.um.dscservice.AuthorizationManagerServiceImpl.deletePermsForPrincipalForRes(AuthorizationManagerServiceImpl.java:407)
    ....

Solution

This exception occurs if you try to pass a List of <Permission> objects to the method for the last argument. This List should display a List of <String> objects containing the permission OIDs for each permission object you want to remove.

Here is some sample code (ManageRolesAndPermissionsTest) to fix this issue.

Additional information

The current JavaDoc reference for LiveCycle ES is available at:

http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/javadoc/com/adobe/idp/um/api/AuthorizationManager.html#deletePermsForPrincipalForRes%28%29

reference: (181407999/2541386)

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)