Hello everyone.

I'm trying to work with Tomcat6, OpenEJB3, Maven and Eclipse.


I have a tomcat6 installation with OpenEJB3 installed on it.

I would like to both from Eclipse via a launcher in which I would set the
catalina.base and openejb.base properties to address a customized /conf
directory.

This conf directory resides outside the tomcat6 installation directory.


My webapp is somewhere else too, so I would like to add a personalized
context in my server.xml file...

I hope my intention is clear, but I'll sumup a bit :


I launch Tomcat with the following arguments :



-Dcatalina.home="C:\apache-tomcat-6.0.14" -Dcatalina.base="C:\MyApp\tomcat"
-Dopenejb.home="C:\apache-tomcat-6.0.14" -Dopenejb.base="C:\MyApp\tomcat"


The MyApp dir is as follows :



MyApp
+--- tomcat
|     + server.xml
|     + openejb.xml
|     + web.xml
|     + logging.properties, catalina.policy, catalina.properties,
context.xml, tomcat-users.xml
+--- webapps
|     + openejb
|     + MyWebApp
+--- src   (as per Maven2 layout)
+--- target   (as per Maven2 layout)
      + MyWebApp


So far so good.

When I start Tomcat, everything works just fine.


The server.xml contains just Service/Engine/Host, Host points to
MyApp/webapps and the two contexts are guessed as expected.


The problems arrise when I try to locate MyWebApp elsewhere (namely in
MyApp/target/MyWebApp).


To do so, I deleted the MyApp/webapps/MyWebApp dir and changed the
server.xml to add the new context :



     <Context docBase="../../target/MyWebApp" />


Nothing complex... But Tomcat tries to load MyWebApp before openejb, as
expected from the specifications... Hence the deployment fails.



Well, to address that, I tried to add explicitely the openejb context before
MyWebApp :



     <Context docBase="openejb" />
     <Context docBase="../../target/MyWebApp" />


Then the startup fails... I then tried to start just openEJB by removing the
MyWebApp context from the server.xml... Same exception...

Here is the exception for the sake of completeness, but I think it will be
of no help...


5 juin 2008 11:41:09 org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Program
Files\Java\jdk1.5.0_13\bin;.;C:\WINNT\system32;C:\WINNT;C:\Program
Files\Java\jdk1.5.0_13\jre\bin;C:\program
files\java\jdk1.5.0_13\bin\..\jre\bin\client;C:\program
files\java\jdk1.5.0_13\bin\..\jre\bin;C:\program
files\java\jdk1.5.0_13\bin;N:\Framework\etc;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
Files\Rational\common;C:\SFU\common\;C:\Program Files\Fichiers
communs\GTK\2.0\bin;C:\Program Files\MySQL\MySQL Server
5.0\bin;C:\Python25;C:\Python25\Scripts;C:\Program
Files\QuickTime\QTSystem\;C:\apache-2.2\php5;C:\apache-2.2\bin;C:\maven\bin;C:\Program
Files\PuTTY;N:\Framework\etc;C:\Perl\bin;C:\program
files\java\jdk1.5.0_13\bin;C:\program
files\java\jdk1.5.0_13\bin;N:\Framework\etc;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
Files\Rational\common;C:\SFU\common\;C:\Program Files\Fichiers
communs\GTK\2.0\bin;C:\Program Files\MySQL\MySQL Server
5.0\bin;C:\Python25;C:\Python25\Scripts;C:\Program Files\QuickTime\QTSystem\
5 juin 2008 11:41:09 org.apache.coyote.http11.Http11Protocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
5 juin 2008 11:41:09 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1224 ms
5 juin 2008 11:41:09 org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
5 juin 2008 11:41:09 org.apache.catalina.mbeans.ServerLifecycleListener
createMBeans
GRAVE: createMBeans: Throwable
java.lang.NullPointerException
        at
org.apache.catalina.mbeans.MBeanUtils.createObjectName(MBeanUtils.java:1080)
        at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:497)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:570)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:366)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:535)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:498)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:660)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:628)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:278)
        at
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLifecycleListener.java:129)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:703)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
        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.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
5 juin 2008 11:41:09 org.apache.catalina.core.StandardService start
INFO: Démarrage du service Catalina
5 juin 2008 11:41:09 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
5 juin 2008 11:41:09 org.apache.catalina.startup.Catalina start
GRAVE: Catalina.start: 
LifecycleException:  Error initializaing :  java.lang.NullPointerException
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4075)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
        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.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
5 juin 2008 11:41:09 org.apache.catalina.startup.Catalina start
INFO: Server startup in 156 ms


Since then I'm stuck.

Have I missed something ???

If you have any suggestion, feel free


Regards,


Juan Manuel
-- 
View this message in context: 
http://www.nabble.com/OpenEJB.war-outside-webapps-tp17666227p17666227.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to