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)

Comments are closed.