user977505
user977505

Reputation: 559

TomEE lookup errors

I've a WebApp that uses tomcat and openejb in separate installations. I'm trying to move this to a TomEE (web profile / plus) environment and I'm running into lookup errors. JNDIContext is throwing a java.lang.NullPointerException.

I tried w/ TomEE web profile first. My webapp also uses web services and google search lead me to try TomEE plus because the web profile doesn't support web services. No luck w/ this version either.

One difference between the two version is that in the TomEE web profile, I see all the Remote objects when I access the openejb webapp. However I don't see them w/ TomEE plus version.

http://localhost:8080/openejb/viewjndi.jsp

Any suggestions of how I could resolve this? I'm guessing it is configuration issue and I don't know which one.

Here is the complete stack trace:

java.lang.NullPointerException
    org.apache.openejb.client.JNDIContext.createBusinessObject(JNDIContext.java:203)
    org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:247)
    javax.naming.InitialContext.lookup(InitialContext.java:392)
    org.bluebox.customer.client.CustomerConnection.getCustomerAccountRemote(CustomerConnection.java:67)
    org.bluebox.customer.client.CustomerLogin.prepare(CustomerLogin.java:65)
    com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:167)
    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
    org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:434)

Upvotes: 2

Views: 565

Answers (1)

David Blevins
David Blevins

Reputation: 19378

TomEE Plus is definitely the right distro to use if migrating from an OpenEJB/Tomcat install. They match identically in features with the difference that the stack now supports full EJB 3.1, JAP 2.0 and JAX-RS. The Web Profile version of TomEE is quite a bit leaner and lacks WebServices, JMS and any non-WebProfile requirement. Here's a brief comparison of APIs supported.

That looks like a bug that was fixed with TomEE 1.0.0-beta-2 released in January. If you can give it a try, it'd be wonderful. We will absolutely want to make sure any issues you might face are cleared up before the 1.0.0 GA.

Upvotes: 2

Related Questions