Ultimo aggiornamento il
3 mag 2021
Problema
Quando si utilizza il codice API contenuto nella Developer Guide per Reader Extensions 7.2.2 (developer_guide.pdf ) per fornire ulteriori autorizzazioni ai documenti PDF, si riceve la seguente eccezione:
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)
Soluzione
Utilizza una o entrambe le soluzioni, a seconda delle necessità
- DataManager e PDFMM non sono accessibili da remoto. Pertanto, devi eseguire il tuo codice cliente sullo stesso server di ARES. Scrivi la tua EJB sul server ARES con connessioni remote, e poi chiama questo codice dalla macchina remota.
- Assicurati che il tipo di transazione EJB sia Bean e non Container::
nel file ejb-jar.xml, cambia il tipo di transazione da Container a 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>
Poi, ricompila il file .ear e distribuiscilo sul tuo application server.
Informazioni aggiuntive
Questa eccezione si verifica quando si tenta di avviare una transazione e gli oggetti DataManager e PDFMM restituiti dal file JNDI namingcontext.lookup() sono nulli.
Fornisci permessi aggiuntivi ai documenti PDF utilizzando l'interfaccia web di Adobe Reader Extensions.