Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-961

Launching OpenEJB with WTP is tricky

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: (not version related)
    • Component/s: tomee
    • Labels:
      None
    • Environment:
      OpenEJB 3.1, Tomcat 5.5, WTP 3.

      Description

      I've been working with OpenEJB, Tomcat 5.5 and WTP for some time and I have a problem regarding the OpenEJB deployment in Tomcat.

      By default, OpenEJB is installed into Tomcat itself and everything works fine.
      With WTP, we have the possibility to let the Tomcat installation unchanged and define a Context that points to our web application. (The context is defined in the server.xml configuration file). Doing that allows us to put our web application wherever we want.
      Currently, defining OpenEJB as a context in Tomcat fails if OpenEJB is not in the Tomcat appBase directory : an exception is launched at startup :

      java.lang.NullPointerException
      at org.apache.openejb.tomcat.loader.OpenEJBListener.lifecycleEvent(OpenEJBListener.java:46)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
      at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:757)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
      at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

      By defining OpenEJB as a context, I mean adding something like that in the server.xml :
      <Context docBase="D:\tempWebApp\openejb-tomcat-webapp-3.1.0" path="" reloadable="false"/>

      It appears that OpenEJB looks up for the openejb web app in the appBase of Tomcat only. So defining the web app in a context does not work properly.

        Attachments

        1. OpenEJBListenerPatch.txt
          4 kB
          Jean-Sébastien Scrève

          Activity

            People

            • Assignee:
              jgallimore Jonathan Gallimore
              Reporter:
              jean-sebastien.screve@atosorigin.com Jean-Sébastien Scrève
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: