In Tomee 1.7.x I was able to use a remote bean to generate PDF files and return them to the browser. Now I am preparing the migration to Tomee 7.0.2 and it no longer works. I have no idea where to look.
Here is a link to the different classes:
- The ServiceLocator : https://github.com/mdebooy/DoosUtils/blob/master/doosutils-components/src/main/java/eu/debooy/doosutils/service/ServiceLocator.java - The ExportService : https://github.com/mdebooy/DOOS/blob/master/doos-web/src/main/java/eu/debooy/doos/service/ExportService.java - The Remote Interface: https://github.com/mdebooy/DOOS/blob/master/doos-components/src/main/java/eu/debooy/doos/component/business/IExport.java
 - The class that calls the Export Service
: https://github.com/mdebooy/DOOS/blob/master/doos-components/src/main/java/eu/debooy/doos/component/Export.java
 - A bean that uses Export.java
: https://github.com/mdebooy/DOOS/blob/master/doos-web/src/main/java/eu/debooy/doos/controller/TaalController.java

----
Here are the log messages in version 1.7.3:
catalina.out:INFO: Jndi(name=ExportServiceRemote) --> Ejb(deployment-id=ExportService)

eu.debooy.2017-02-03.log:FINE: /ExportServiceRemote org.apache.openejb.core.ivm.naming.BusinessRemoteReference

----
Here are the log messages in version 7.0.2:
catalina.out:12-Feb-2017 20:31:13.322 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.JndiBuilder.bind Jndi(name=ExportServiceRemote) --> Ejb(deployment-id=ExportService) catalina.out:12-Feb-2017 20:31:31.818 INFO [ajp-nio-8009-exec-2] org.apache.openejb.client.EventLogger.log RemoteInitialContextCreated{providerUri=http://127.0.0.1:8080/tomee/ejb} catalina.out:12-Feb-2017 20:31:31.925 WARNING [ajp-nio-8009-exec-2] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LIST:/ {error=Cannot open input stream to server: } catalina.out:12-Feb-2017 20:31:31.931 WARNING [ajp-nio-8009-exec-2] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LIST:/ {error=Cannot open input stream to server: } catalina.out:12-Feb-2017 20:31:31.963 INFO [ajp-nio-8009-exec-2] null.openjpa.Runtime Starting OpenJPA 2.4.1 catalina.out:12-Feb-2017 20:31:32.171 INFO [ajp-nio-8009-exec-2] null.openjpa.jdbc.JDBC Using dictionary class "org.apache.openjpa.jdbc.sql.PostgresDictionary" (PostgreSQL 9.5.5 ,PostgreSQL Native Driver PostgreSQL 9.4.1212). catalina.out:12-Feb-2017 20:31:32.194 INFO [ajp-nio-8009-exec-2] null.openjpa.jdbc.JDBC Connected to PostgreSQL version 9.9 using JDBC driver PostgreSQL Native Driver version PostgreSQL 9.4.1212. catalina.out:12-Feb-2017 20:31:33.299 WARNING [ajp-nio-8009-exec-2] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LIST:/ {error=Cannot open input stream to server: } catalina.out:12-Feb-2017 20:31:33.305 WARNING [ajp-nio-8009-exec-2] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LIST:/ {error=Cannot open input stream to server: } catalina.out:12-Feb-2017 20:31:36.496 WARNING [ajp-nio-8009-exec-4] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LIST:/ {error=Cannot open input stream to server: } catalina.out:12-Feb-2017 20:31:36.505 WARNING [ajp-nio-8009-exec-4] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LIST:/ {error=Cannot open input stream to server: } catalina.out:12-Feb-2017 20:31:42.536 WARNING [ajp-nio-8009-exec-8] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LIST:/ {error=Cannot open input stream to server: } catalina.out:12-Feb-2017 20:31:42.541 WARNING [ajp-nio-8009-exec-8] org.apache.openejb.client.EventLogger.log RequestFailed{server=http://127.0.0.1:8080/tomee/ejb} JNDI_LOOKUP:/ExportServiceRemote {error=Cannot open input stream to server: }

eu.debooy.2017-02-12.log:12-Feb-2017 20:31:42.532 FINE [ajp-nio-8009-exec-8] eu.debooy.doosutils.service.ServiceLocator.lookup Zoek JNDI: ExportServiceRemote eu.debooy.2017-02-12.log:12-Feb-2017 20:31:42.536 SEVERE [ajp-nio-8009-exec-8] eu.debooy.doosutils.service.ServiceLocator.lookup JNDI: ExportServiceRemote [Cannot list '/'.] eu.debooy.2017-02-12.log:12-Feb-2017 20:31:42.541 SEVERE [ajp-nio-8009-exec-8] eu.debooy.doosutils.service.ServiceLocator.lookup JNDI: ExportServiceRemote [Cannot lookup '/ExportServiceRemote'.] localhost.2017-02-12.log:12-Feb-2017 20:31:42.548 SEVERE [ajp-nio-8009-exec-8] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [Faces Servlet] in context with path [/doos] threw exception [javax.el.ELException: java.lang.IllegalArgumentException: javax.naming.NamingException: Cannot lookup '/ExportServiceRemote'. [Root exception is java.rmi.RemoteException: Cannot read the response from the server (OEJP/4.6) : Cannot open input stream to server: ; nested exception is: java.io.IOException: Cannot open input stream to server: ]] with root cause
 java.io.FileNotFoundException: http://127.0.0.1:8080/tomee/ejb
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) at org.apache.openejb.client.HttpConnectionFactory$HttpConnection.getInputStream(HttpConnectionFactory.java:182)
        at org.apache.openejb.client.Client.processRequest(Client.java:262)
        at org.apache.openejb.client.Client.request(Client.java:139)
at org.apache.openejb.client.JNDIContext.request(JNDIContext.java:211) at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:399)
        at javax.naming.InitialContext.lookup(InitialContext.java:417)
at eu.debooy.doosutils.service.ServiceLocator.lookup(ServiceLocator.java:187)
        at eu.debooy.doos.component.Export.export(Export.java:40)

What has changed between 1.7 and 7.0 at this level?

Reply via email to