Expand my Community achievements bar.

Linkage Error on PDFManipulation.exe

Avatar

Former Community Member
Hi,



I'm trying to attach a policy to a PDF. I have setup APS 7.2.2 and ALDS 7.2 with SSL on JBoss 3.2.5 using manual installation.



I got an exception when I try to execute the following code:



Properties p = new Properties();

p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

p.put(Context.PROVIDER_URL, "jnp://localhost:1099");

p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

Context namingCtx = new InitialContext(p);



ConnectionFactory dmConnFactory = null;

Object dmObj = namingCtx.lookup("DataManagerService");

dmConnFactory = (ConnectionFactory)PortableRemoteObject.narrow(dmObj, ConnectionFactory.class);



ConnectionFactory pdfConnFactory = null;

pdfConnFactory = Utilities.serviceLookup("PDFManipulation");



UserTransaction transaction = (UserTransaction)namingCtx.lookup("UserTransaction");

transaction.begin();



DataManager dataManager = DataManagerHelper.narrow((org.omg.CORBA.Object)dmConnFactory.getConnection());



PDFFactory pdfFactory = PDFFactoryHelper.narrow((org.omg.CORBA.Object)pdfConnFactory.getConnection());

...



-----------------------------------

Then exception occurs at pdfConnFactory.getConnection():



2007-01-22 20:02:26,171 ERROR [com.adobe.service.ProcessResource] BMC001: Unexpected exception while resolving a connection to an Adobe Service upon another Adobe Service request.

java.lang.LinkageError: loader constraints violated when linking com/adobe/service/ConnectionFactory class

at com.adobe.service.PlatformImpl.lookup(PlatformImpl.java:50)

at com.adobe.service.ProcessResource$ManagerImpl.getResource(ProcessResource.java:1216)

at com.adobe.service.ManagerPOATie.getResource(ManagerPOATie.java:127)

at com.adobe.service.ManagerPOA._invoke(ManagerPOA.java:246)

at org.jacorb.poa.RequestProcessor.invokeOperation(Unknown Source)

at org.jacorb.poa.RequestProcessor.process(Unknown Source)

at org.jacorb.poa.RequestProcessor.run(Unknown Source)

2007-01-22 20:02:26,171 INFO [STDOUT] CORBA System Exception: 1096024112 : INV_OBJREF_InvokeOnNilObjRef : INV_OBJREF

2007-01-22 20:02:26,171 INFO [STDOUT] omniORB: ERROR -- the application attempted to invoke an operation on a nil reference.

CORBA System Exception: 1096024112 : INV_OBJREF_InvokeOnNilObjRef : INV_OBJREF

2007-01-22 20:02:26,281 WARN [com.adobe.service.ProcessResource] BMC024: Service PDFManipulation: Process ProcessResource(name=PDFManipulation.exe,pid=5052) terminated abnormally with error code {3}



It seems that PDFManipulation.exe is trying to invoke something with a nil reference.



Any help is appreciated.



Thanks,

Joe
1 Reply

Avatar

Former Community Member
I have found a solution.



The problem was I had the code above in a web service app(WSR). Making API calls to LiveCycle from a web service app is considered as remote calls, which Document Security doesn't allow. I think that why I have a Linkage Error.



My solution is to build a web app(WAR) to act as a bridge between the WSR and LiveCycle. The WAR is simply a servlet where all the LiveCycle API calls are (the above code), then the WSR calls the WAR to invoke LiveCycle. Basically, all the LiveCycle API has to be in the WAR.



Joe