Last updated on
16 May 2021
Issue
When you use the API code as found in the Developer Guide for Reader Extensions 7.2.2 (developer_guide.pdf ) to provide additional permissions to PDF documents, you receive the following exception:
java.rmi.RemoteException: UserTransaction not bound at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169) at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538) at org.apache.axis.Message.getSOAPEnvelope(Message.java:376) at org.apache.axis.client.Call.invokeEngine(Call.java:2583) at org.apache.axis.client.Call.invoke(Call.java:2553) at org.apache.axis.client.Call.invoke(Call.java:2248) at org.apache.axis.client.Call.invoke(Call.java:2171) at org.apache.axis.client.Call.invoke(Call.java:1691) at com.twowin.client.wsdl.AdobeExtensionServiceSoapBindingStub.readerExtend(AdobeExtensionServiceSoapBindingStub.java:107) at com.twowin.client.ARESClient.doPost(ARESClient.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)
Solution
Use one or both of these solutions, as required:
- DataManager and PDFMM cannot be accessed remotely. Therefore, run your client code on the same server as ARES. Write your own EJB on the ARES server, with remote connections, and then call this code from the remote machine.
- Make sure that the EJB transaction-type is Bean and not Container:
in ejb-jar.xml, change the transaction type from Container to Bean:
<!-- Session Beans --> <session > <description><![CDATA[The typical Session Bean this time as a web-service.]]></description> <display-name>Adobe Extension Web Service for JBoss.Net</display-name> <ejb-name>AdobeExtensionService</ejb-name> <home>com.twowin.services.AdobeExtensionServiceHome</home> <remote>com.twowin.services.AdobeExtensionService</remote> <ejb-class>com.twowin.services.AdobeExtensionServiceBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Bean</transaction-type>
Then, repackage the .ear file and deploy it to your application server.
Additional information
This exception is thrown when trying to start a transaction, and the DataManager and PDFMM objects returned from the JNDI namingcontext.lookup() are null.
Providing additional permisions to PDF documents using the Adobe Reader Extensions Web UI works as expected.