tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zach Romans <Zach.Rom...@Sun.COM>
Subject Re: OpenEJB/Tomcat 6 manual integration help
Date Wed, 15 Apr 2009 17:42:19 GMT
Hi David,

I couldn't get the installer to work in my environment.  It came back saying 
it couldn't find my catalina.sh file.  Not sure why, but that's OK, as
my Tomcat installation is mildly tweaked so I can keep all (or as many as 
possible) of the Tomcat distribution files "stock".  And so a manual 
integration is vastly preferable to me.

By Reading The Friendly Source for Installer.java I figured out that I needed 
the Tomcat-specific loader JAR file and Listener classname.

Also figured out the catalina.sh addition, and put that in my environment 
setup script (i.e. set the -javaagent in JAVA_OPTS prior to calling catalina.sh.)

All I have left to do is extract the openejb.conf and logging.properties files 
into my $CATALINA_HOME/conf (sourced, respectively, from default.openejb.conf 
and logging.properties in the openejb-core-3.1.jar file.)

For the benefit of Unix hack SA dinosaurs like me, it would be great to have a 
documented/supported recipe for a manual integration. :-)

Thanks!

- z



David Blevins wrote, On 4/15/2009 9:18 AM:
> Hi Zach,
> 
> Those directions should probably be deleted.  Simply deploying the 
> openejb.war and then running through the "installer" link at 
> http://localhost:8080/openejb/ is definitely the best approach.  It will 
> do the installation steps for you and tell you what it's doing.
> 
> In 3.1 we updated the integration a bit and it looks like we forgot to 
> update that page to reflect it.  Add the openejb-tomcat-loader-3.1.jar 
> to $CATALINA_HOME/lib and change the listener classname from 
> "org.apache.openejb.loader.OpenEJBListener" to 
> "org.apache.openejb.tomcat.loader.OpenEJBListener"
> 
> Definitely let us know if you have any more issues.
> 
> -David
> 
> On Apr 14, 2009, at 9:22 AM, Zach Romans wrote:
> 
>> Hello,
>>
>> I am getting a ClassNotFoundException for 
>> org.apache.openejb.loader.OpenEJBListener on Tomcat startup after 
>> copying the openejb-loader-3.1.jar into $CATALINA_HOME/lib and adding 
>> the Listener element to the server.xml.
>>
>> I am using Tomcat 6.0.14 with Java 1.6.0_05 on Solaris 9.
>>
>> I am trying to manually integrate as per 
>> http://openejb.apache.org/manual-installation.html, since the 
>> installer does not seem to like my tweaked-for-my-own-purposes Tomcat 
>> installation.
>>
>> openejb.war downloaded and expanded to $CATALINA_HOME/webapps/openejb:
>>
>>> {zr129649} 
>>> phys-lsu-hadbms-tst-01:/local/DATA/SUNWtatc5/apache-tomcat-6.0.14
>>> 574 > ls webapps/openejb/
>>> LICENSE.txt          default.css          images/              
>>> lib/                 testsuite.jsp
>>> META-INF/            ejbclasses.html      index.jsp            
>>> re-help.html         tomcat/
>>> NOTICE.txt           ejbref.html          installer-view.jsp   
>>> testejb.jsp          viewclass.jsp
>>> README.txt           enc-help.html        invokeobj.jsp        
>>> testhome.jsp         viewejb.jsp
>>> WEB-INF/             howitworks.html      juli.properties      
>>> testint.jsp          viewjndi.jsp
>>
>> openejb-loader-3.1.jar copied to my $CATALINA_HOME/lib:
>>
>>> {zr129649} 
>>> phys-lsu-hadbms-tst-01:/local/DATA/SUNWtatc5/apache-tomcat-6.0.14
>>> 575 > ls -l lib/open*
>>> -rw-r--r--   1 tdmsadm  dba        12845 Apr 13 23:21 
>>> lib/openejb-javaagent-3.1.jar
>>> -rw-r--r--   1 tdmsadm  dba        34063 Apr 14 00:02 
>>> lib/openejb-loader-3.1.jar
>>
>> and the Listener element added to my server.xml:
>>
>>> {zr129649} 
>>> phys-lsu-hadbms-tst-01:/local/DATA/SUNWtatc5/apache-tomcat-6.0.14
>>> 576 > cat conf/server.xml
>>> <!-- Note:  A "Server" is not itself a "Container", so you may not
>>>     define subcomponents such as "Valves" at this level.
>>>     Documentation at /docs/config/server.html
>>> -->
>>> <Server port="8006" shutdown="SHUTDOWN">
>>>  <!-- Listener for OpenEJB plugin -->
>>>  <Listener className="org.apache.openejb.loader.OpenEJBListener" />
>>
>> complete contents of catalina.out from most recent startup attempt:
>>
>>> Apr 14, 2009 12:33:50 AM org.apache.tomcat.util.digester.Digester 
>>> startElement
>>> SEVERE: Begin event threw exception
>>> java.lang.ClassNotFoundException: 
>>> org.apache.openejb.loader.OpenEJBListener
>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>        at 
>>> org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)

>>>
>>>        at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276) 
>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1337)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2740)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
>>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
>>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
>>>        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:597)
>>>        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
>>> Apr 14, 2009 12:33:50 AM org.apache.catalina.startup.Catalina load
>>> WARNING: Catalina.start using conf/server.xml:
>>> java.lang.ClassNotFoundException: 
>>> org.apache.openejb.loader.OpenEJBListener
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2726)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2752)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1279) 
>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1337)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2740)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
>>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
>>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
>>>        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:597)
>>>        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
>>> Apr 14, 2009 12:33:50 AM org.apache.tomcat.util.digester.Digester 
>>> startElement
>>> SEVERE: Begin event threw exception
>>> java.lang.ClassNotFoundException: 
>>> org.apache.openejb.loader.OpenEJBListener
>>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>        at java.security.AccessController.doPrivileged(Native Method)
>>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>        at 
>>> org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)

>>>
>>>        at org.apache.tomcat.util.digester.Rule.begin(Rule.java:153)
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276) 
>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1337)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2740)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
>>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
>>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:558)
>>>        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:597)
>>>        at 
>>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>>> Apr 14, 2009 12:33:50 AM org.apache.catalina.startup.Catalina load
>>> WARNING: Catalina.start using conf/server.xml:
>>> java.lang.ClassNotFoundException: 
>>> org.apache.openejb.loader.OpenEJBListener
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2726)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2752)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1279) 
>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1337)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2740)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

>>>
>>>        at 
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

>>>
>>>        at 
>>> org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
>>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
>>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:558)
>>>        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:597)
>>>        at 
>>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>>> Apr 14, 2009 12:33:50 AM org.apache.catalina.startup.Catalina start
>>> INFO: Server startup in 0 ms
>>> java.lang.reflect.InvocationTargetException
>>>        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:597)
>>>        at 
>>> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
>>>        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>>> Caused by: java.lang.NullPointerException
>>>        at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
>>>        at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
>>>        ... 6 more
>>
>> I'm no Java or Tomcat guru (I'm getting this setup for our sw 
>> developer), but to my knowledge, I do not need to do anything explicit 
>> to get Tomcat to "see" the .jar files placed in $CATALINA_HOME/lib.
>>
>> Any advice/suggestions greatly appreciated.
>>
>> aTdHvAaNnKcSe
>>
>> - z
>>
>> -- 
>> Zach Romans - Test Engineer IV                            
>> Zach.Romans@sun.com
>> WWOPS/Test Infrastructure Engineering            ("desk") 
>> x30913/503-345-9313
>> Sun Microsystems, Inc
>> ./.*                 "It's a hash of a hash of an array of hashes of 
>> arrays!"
>>
> 

-- 
Zach Romans - Test Engineer IV                            Zach.Romans@sun.com
WWOPS/Test Infrastructure Engineering            ("desk") x30913/503-345-9313
Sun Microsystems, Inc
./.*                 "It's a hash of a hash of an array of hashes of arrays!"

Mime
View raw message