SOLVED by changing the param-value for "openejb.configuration"
to the absolute path (from the path relative to "openejb.home"),  in 
openejb_loader-0.9.2/WEB-INF/web.xml.

The following description for the parameter "openejb.configuration", in 
openejb_loader-0.9.2/WEB-INF/web.xml:
      <description>
        Sets the OpenEJB configuration to the specified file.

        This will be resolved relative to the openejb.home if
        it is not an absolute path.
      </description>
is apparently INCORRECT! 







On 12/16/04, I received this from [EMAIL PROTECTED]:
> Using openejb-0.9.2 and tomcat-5.0.27, I "re-jared" the myHelloEjb.jar
> plus the employee.jar from the CMP example. I modified 
> EmployeeClient.java which successfully calls both bean.sayHello() and 
> empl_find.says( "Hello OpenEJB World!" ) in main, from the respective
> beans. Everything works as expected, and I noticed that openejb.log for 
> the standalone server shows 2 containers:
> (...snip...)
> DEBUG:  Instantiating assembler class 
> org.openejb.alt.assembler.classic.Assemble
> r
> DEBUG:  Containers        : 2
> DEBUG:  Type        Container ID
> DEBUG:     ENTITY      Default CMP Container
> DEBUG:     STATELESS   Default Stateless Container
> DEBUG:  Deployments       : 2
> DEBUG:  Type        Deployment ID
> DEBUG:     STATELESS   Hello
> DEBUG:     CMP_ENTITY  EmployeeBean
> DEBUG:  SecurityService   : org.openejb.ri.sp.PseudoSecurityService
> (...snip...)
> 
> 
> Also, I can run the JL tomcat example with myHelloEjb.jar just fine. 
> 
> BUT now I want to make both calls from a jsp in Tomcat, but I must be 
> overlooking some configuration item:
> 
> When running openejb from tomcat, I get the damned
> java.rmi.RemoteException: Attempt to create an entity bean 
> (DeploymentID="EmployeeBean") that can not be persisted
> and openejb.log shows 4 containers, thus:
> (...snip...)
> WARN :  No ApplicationServer was specified!  The container system will only 
> be a
> ccessible by same-vm clients via the IntraVm Server.
> WARN :  Deprecated: The propery name "org/openejb/assembler_class" is 
> deprecated
>  and will be removed in a future version of OpenEJB, please use the property 
> nam
> e "openejb.assembler" instead.
> DEBUG:  Instantiating assembler class 
> org.openejb.alt.assembler.classic.Assemble
> r
> ERROR:  Testing driver failed.  [jdbc:idb:conf/default.idb_database.conf]  
> Could
>  not obtain a physical JDBC connection from the DriverManager.  Problem: 
> java.io
> .FileNotFoundException: ./logs/trace.log (No such file or directory)
> DEBUG:  Containers        : 4
> DEBUG:  Type        Container ID
> DEBUG:     ENTITY      Default BMP Container
> DEBUG:     ENTITY      Default CMP Container
> DEBUG:     STATEFUL    Default Stateful Container
> DEBUG:     STATELESS   Default Stateless Container
> DEBUG:  Deployments       : 2
> DEBUG:  Type        Deployment ID
> DEBUG:     STATELESS   Hello
> DEBUG:     CMP_ENTITY  EmployeeBean
> DEBUG:  SecurityService   : org.openejb.ri.sp.PseudoSecurityService
> (...snip...)
> 
> Here's my openejb.conf:
> <?xml version="1.0"?>
> <openejb xmlns="http://www.openejb.org/System/Configuration";>
>       <Container id="Default Stateless Container" ctype="STATELESS">
>               StrictPooling   true
>       </Container>
>       <Container id="Default CMP Container" ctype="CMP_ENTITY">
>               PoolSize        50
>           Global_TX_Database  conf/postgresql.cmp_global_database.xml
>           Local_TX_Database   conf/postgresql.cmp_local_database.xml
>       </Container>
>       <Deployments jar="/opt/openejb/beans/zzz_ejb.jar"/>
>       <SecurityService id="Default Security Service"/>
>       <TransactionService id="Default Transaction Manager"/>
>       <Connector id="Default JDBC Database">
>           JdbcDriver org.postgresql.Driver
>           JdbcUrl jdbc:postgresql://localhost:5432/mydb
>           UserName postgres
>           Password &quot;&quot;
>       </Connector>
> </openejb>
> 
> I have the postgresql driver at $OPENEJB_HOME/lib/pg73jdbc.jar.
> 
> And here's $TOMCAT_HOME/webapps/openejb_loader-0.9.2/WEB-INF/web.xml:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> <web-app>
> 
>   <display-name>OpenEJB Loader Application</display-name>
> 
>   <!-- OpenEJB Loader Servlet Configuration -->
>   <servlet>
>     <servlet-name>loader</servlet-name>
>     <servlet-class>org.openejb.loader.LoaderServlet</servlet-class>
>     
>     <init-param>
>      <param-name>openejb.home</param-name>
>       <param-value>/opt/openejb</param-value>
>     </init-param>
>  
>     <init-param>
>       <param-name>openejb.configuration</param-name>
>       <param-value>conf/openejb.conf</param-value>
>     </init-param>
> 
>  
>     <init-param>
>       <param-name>openejb.localcopy</param-name>
>       <param-value>true</param-value>
>     </init-param>
> 
>     <load-on-startup>0</load-on-startup>
>   
>   </servlet>
> 
> </web-app>
> 
> Finally, here's my project's Tomcat Context at 
> $TOMCAT_HOME/conf/Catalina/localhost/zzz.xml:
>      <Context path="/zzz"  debug="9">
>         <Ejb name="ejb/hello"
>              type="Session"
>              home="org.acme.HelloHome"
>              remote="org.acme.Hello"/>
>         <ResourceParams name="ejb/hello">
>             <parameter>
>                 <name>factory</name>
>                 <value>org.openejb.client.TomcatEjbFactory</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.factory.initial</name>
>                 <value>org.openejb.client.LocalInitialContextFactory</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.security.principal</name>
>                 <value>username</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.security.credentials</name>
>                 <value>password</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.provider.url</name>
>                 <value>localhost:4201</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.ejb-link</name>
>                 <value>Hello</value>
>             </parameter>
>         </ResourceParams>
>         <Ejb name="ejb/employee"
>              type="Entity"
>              home="org.acme.ejb.employee.EmployeeHome"
>              remote="org.acme.ejb.employee.EmployeeObject"/>
>         <ResourceParams name="ejb/employee">
>             <parameter>
>                 <name>factory</name>
>                 <value>org.openejb.client.TomcatEjbFactory</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.factory.initial</name>
>                 <value>org.openejb.client.LocalInitialContextFactory</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.security.principal</name>
>                 <value>username</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.security.credentials</name>
>                 <value>password</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.naming.provider.url</name>
>                 <value>localhost:4201</value>
>             </parameter>
>             <parameter>
>                 <name>openejb.ejb-link</name>
>                 <value>EmployeeBean</value>
>             </parameter>
>         </ResourceParams>
>     </Context>
> 
> Please help!
> 
> TIA,
> -- 
> 
> Mark
> [EMAIL PROTECTED]
> 

-- 

Mark
[EMAIL PROTECTED]

Reply via email to