For the mail I don't know much without more details but I know for instance Yahoo has some servers not respecting standard protocols.
For the attachment: TomEE 7.0.0-M2 got Part support in embedded mode, maybe that's the issue you hit. Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2016-03-04 18:41 GMT+01:00 jitesh dundas <[email protected]>: > HI, > > We were able to get the emails to go out and the application to work by > removing the geronimo JAR with the sun javamail JAR.I also had to add the > osgi-locator JAR there to fix it. > > However, we get a strange issue where the file attachments are always null. > > ava.lang.NullPointerException > at > > com.platform28.mail.connector.api.EmailConnectorService.reply(EmailConnectorService.java:162) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > > org.apache.openejb.server.cxf.rs.PojoInvoker.performInvocation(PojoInvoker.java:43) > at > > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165) > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89) > at > > org.apache.openejb.server.cxf.rs.AutoJAXRSInvoker.invoke(AutoJAXRSInvoker.java:68) > at > > org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57) > at > > org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93) > at > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) > at > > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) > at > > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240) > at > > org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:227) > at > > org.apache.openejb.server.cxf.rs.CxfRsHttpListener.onMessage(CxfRsHttpListener.java:208) > at > > org.apache.openejb.server.httpd.OpenEJBHttpRegistry$ClassLoaderHttpListener.onMessage(OpenEJBHttpRegistry.java:111) > at > > org.apache.openejb.server.httpd.HttpListenerRegistry.onMessage(HttpListenerRegistry.java:71) > at > > org.apache.openejb.server.httpd.OpenEJBHttpRegistry$ClassLoaderHttpListener.onMessage(OpenEJBHttpRegistry.java:111) > at > > org.apache.openejb.server.httpd.OpenEJBHttpServer.process(OpenEJBHttpServer.java:262) > at > > org.apache.openejb.server.httpd.OpenEJBHttpServer.processRequest(OpenEJBHttpServer.java:195) > at > > org.apache.openejb.server.httpd.OpenEJBHttpServer.service(OpenEJBHttpServer.java:110) > at > > org.apache.openejb.server.httpd.HttpEjbServer.service(HttpEjbServer.java:63) > at > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > at > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > at > org.apache.openejb.server.ServiceStats.service(ServiceStats.java:54) > at > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > at > org.apache.openejb.server.ServiceLogger.service(ServiceLogger.java:93) > at > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > at > org.apache.openejb.server.ServicePool.access$201(ServicePool.java:39) > at > org.apache.openejb.server.ServicePool$3.run(ServicePool.java:198) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > > > Here is the setup information:- > 1) We have a client side software which sends out emails. > 2) These emails come out to the the sever holding the session manager. > 3) The data is sent from the client side to the server side via REST API > calls( REST APIs are hosted in the application hosted on the openEJB > vserver on the server side). The client laptop makes REST calls to this > server's REST APIs in the application. > 4) When the user sends a reply, it keeps failing with the above error. > > 5) The issue is this:- The reply request sent via JSON request has to send > a parameter - >@FormDataParam("attachmentFile") List<FormDataBodyPart> > attachments. This has a list of attachments. > > FOr some reason, the files in this are coming as null. If I put a null > check, then it works fine. > > for (FormDataBodyPart file : attachments) { > > if ( file != null) { > > //process further > > } > > } > > I can bypass the above error with the if ( file!=null) check . this lets me > send replies out without attachments. Howver, I still cannot attachments. > No issues were seen on the client side. > > Is there a JAR conflict issue that maybe possible here? How do I fix this? > Please ntoe that this was working earlier and no code change has been done > to this code. > > > > > > > Thanks & Regards, > Jitesh Dundas > > Phone - 732-357-6292 > > > > > On Wed, Mar 2, 2016 at 5:06 PM, Romain Manni-Bucau <[email protected]> > wrote: > > > 2016-03-02 23:04 GMT+01:00 jitesh dundas <[email protected]>: > > > > > Hi, > > > > > > My comments below:- > > > > > > *What's your setup? * > > > We have a maven build based WAR which is using EJBs and REST APIs for > > email > > > communication. The problem is that we recently moved from resin-4.0.36 > to > > > OpenEJB 4.7.3 . We are still facing issues with it. > > > > > > > > Well the question is how do you configure JAXRS, scanning etc...(side > note: > > if you have a sample reproducing your issue you can share on github it > > would avoid some ping pong on the list) > > > > > > > We are using jersey JARs for our app. Until this error started coming > up. > > > We have defined our Jersey Servlet in the web.xml too. > > > > > > All our dependencies are in the pom.xml . > > > > > > *Seems you use default CXF provider.* > > > No we are using Jersey libs for our REST APIs. > > > > > > > > But you are if you read your stacktrace: see > org.apache.openejb.server.cxf. > > rs.AutoJAXRSInvoker > > > > > > > Thanks & Regards, > > > Jitesh Dundas > > > > > > Phone - 732-357-6292 > > > > > > > > > > > > > > > On Wed, Mar 2, 2016 at 4:52 PM, Romain Manni-Bucau < > > [email protected]> > > > wrote: > > > > > > > Hi > > > > > > > > What's your setup? Seems you use default CXF provider. > > > > > > > > > > > > Romain Manni-Bucau > > > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > > > <http://rmannibucau.wordpress.com> | Github < > > > > https://github.com/rmannibucau> | > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > > > > <http://www.tomitribe.com> > > > > > > > > 2016-03-02 22:39 GMT+01:00 jitesh dundas <[email protected]>: > > > > > > > > > Hi, > > > > > > > > > > OpenEJB 4.7.3 and > > > > > Jersey 1.17 > > > > > > > > > > These are being used in our WAR that is running on OpenEJB( > mentioned > > > > > above). For some reason, we keep hitting this error. > > > > > > > > > > I suspect that there is an issue on the Jersey configuration ( it > is > > > > > defined in web.xml for the Jersey Servlet configuration). > > > > > Below is the error that I get:- > > > > > > > > > > It is coming in our REST API which is getting hit from another > > client. > > > > The > > > > > REST API is in written Jersey ( shown above) libs. > > > > > > > > > > java.lang.NullPointerException > > > > > at > > > > > > > > > > > > > > > > > > > > com.platform28.mail.connector.api.EmailConnectorService.reply(EmailConnectorService.java:157) > > > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > > > at > > > > > > > > > > > > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > > > > at > > > > > > > > > > > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > > > > at java.lang.reflect.Method.invoke(Method.java:606) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.cxf.rs.PojoInvoker.performInvocation(PojoInvoker.java:43) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) > > > > > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165) > > > > > at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.cxf.rs.AutoJAXRSInvoker.invoke(AutoJAXRSInvoker.java:68) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:227) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.cxf.rs.CxfRsHttpListener.onMessage(CxfRsHttpListener.java:208) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.httpd.OpenEJBHttpRegistry$ClassLoaderHttpListener.onMessage(OpenEJBHttpRegistry.java:111) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.httpd.HttpListenerRegistry.onMessage(HttpListenerRegistry.java:71) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.httpd.OpenEJBHttpRegistry$ClassLoaderHttpListener.onMessage(OpenEJBHttpRegistry.java:111) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.httpd.OpenEJBHttpServer.process(OpenEJBHttpServer.java:262) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.httpd.OpenEJBHttpServer.processRequest(OpenEJBHttpServer.java:195) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.httpd.OpenEJBHttpServer.service(OpenEJBHttpServer.java:110) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.httpd.HttpEjbServer.service(HttpEjbServer.java:63) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > > > > > at > > org.apache.openejb.server.ServiceStats.service(ServiceStats.java:54) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > > > > > at > > > org.apache.openejb.server.ServiceLogger.service(ServiceLogger.java:93) > > > > > at > > > > > > > > > > > > > > > > > > > > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:65) > > > > > at > > > org.apache.openejb.server.ServicePool.access$201(ServicePool.java:39) > > > > > at > org.apache.openejb.server.ServicePool$3.run(ServicePool.java:198) > > > > > at > > > > > > > > > > > > > > > > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > > > > > at > > > > > > > > > > > > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > > > > > at java.lang.Thread.run(Thread.java:745) > > > > > > > > > > > > > > > I am stuck at this. Can anyone help? > > > > > > > > > > Thanks & Regards, > > > > > Jitesh Dundas > > > > > > > > > > Phone - 732-357-6292 > > > > > > > > > > > > > > >
