[ http://jira.codehaus.org/browse/OPENEJB-57?page=comments#action_46798 ] 

David Blevins commented on OPENEJB-57:
--------------------------------------

Hi Nader,

Ok, I found what was going on with the system properties and fixed it.  I've 
put together a new set of binaries for you to try. 

    http://openejb.org/unstable/v1.0-20050920/openejb-1.0-20050920.zip
    http://openejb.org/Latest+Unstable

Also, the property handling in 1.0-x is way better than in 0.9.2.  You *should* 
be able to get by with just the following System properties:
-Djava.naming.factory.initial=org.openejb.client.LocalInitialContextFactory 
-Dopenejb.home=/home/et4045/java/openejb/openejb-1.0-20050920

We have also noticed that Castor sometimes has an issue finding the mapping.xml 
file listed in the local and global database.xml files.  If you run into this, 
just delete any directory prefixes from the mapping file path and Castor will 
assume that the mapping file is right next to the database.xml file and locate 
it safely.

In other words, this:
  -             <mapping href="conf/default.cmp_mapping.xml" />
  +             <mapping href="default.cmp_mapping.xml" />

Let us know if you have more issues.  We'll keep this Jira Item open till you 
are fully running again.


> OpenEJB does not work as embedded container in JUnit test under Eclipse
> -----------------------------------------------------------------------
>
>          Key: OPENEJB-57
>          URL: http://jira.codehaus.org/browse/OPENEJB-57
>      Project: OpenEJB
>         Type: Bug
>     Versions: 1.0 beta 1
>  Environment: Linux, Eclipse, Sun JDK 1.5.04
>     Reporter: Nader Aeinehchi
>     Assignee: David Blevins
>  Attachments: javazone.zip
>
>
> I used to successfully launch OpenEJB 0.9.2 from Eclipse in my JUnit tests.  
> But it does not work under OpenEJB 1.0Beta.  The following is the command 
> line argument that is supplied to OpenEJB:
> -Djava.naming.factory.initial=org.openejb.client.LocalInitialContextFactory 
> -Djava.naming.provider.url=ormi://localhost:4201 
> -Dopenejb.home=/home/et4045/java/openejb/openejb-0.9.2 
> -Dopenejb.configuration=/home/et4045/java/openejb/openejb-0.9.2/conf/openejb.conf
>  
> -Dopenejb.loader=embed 
> -Dopenejb.localcopy=true
> I have tried all variants of the above, absolute and relative paths, but it 
> does not work.
> The JUnits are stored on development directory:
> /home/et4045/dev/workspaces/javazone/javazone/bin
> Apparently, the newer version of OpenEJB does not understand the home 
> property.
> Here is the error message:
> -------------------------------------------------------------------------------------
> Failed to configure log4j. 
> /home/et4045/dev/workspaces/javazone/javazone/conf/logging.conf (No such file 
> or directory)
> OpenEJB 1.0-beta1    build: 20050829-2233
> http://www.openejb.org
> log4j:WARN No appenders could be found for logger (OpenEJB.startup).
> log4j:WARN Please initialize the log4j system properly.
> resources 1
> javax.naming.NamingException: Attempted to load OpenEJB. Cannot load the 
> container Default CMP Container.  Received message: Cannot locate the 
> Global_TX_Database file. The path specified is not a valid file: 
> /home/et4045/dev/workspaces/javazone/javazone/conf/default.cmp_global_tx_database.xml
>  [Root exception is org.openejb.OpenEJBException: Cannot load the container 
> Default CMP Container.  Received message: Cannot locate the 
> Global_TX_Database file. The path specified is not a valid file: 
> /home/et4045/dev/workspaces/javazone/javazone/conf/default.cmp_global_tx_database.xml]
>       at 
> org.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:74)
>       at 
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
>       at 
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
>       at javax.naming.InitialContext.init(InitialContext.java:223)
>       at javax.naming.InitialContext.<init>(InitialContext.java:175)
>       at EJBWriterTest.testWrite(EJBWriterTest.java:21)
>       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 junit.framework.TestCase.runTest(TestCase.java:154)
>       at junit.framework.TestCase.runBare(TestCase.java:127)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:118)
>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
>       at junit.framework.TestSuite.run(TestSuite.java:203)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.openejb.OpenEJBException: Cannot load the container Default 
> CMP Container.  Received message: Cannot locate the Global_TX_Database file. 
> The path specified is not a valid file: 
> /home/et4045/dev/workspaces/javazone/javazone/conf/default.cmp_global_tx_database.xml
>       at 
> org.openejb.alt.assembler.classic.ContainerBuilder.buildContainer(ContainerBuilder.java:176)
>       at 
> org.openejb.alt.assembler.classic.ContainerBuilder.build(ContainerBuilder.java:124)
>       at 
> org.openejb.alt.assembler.classic.AssemblerTool.assembleContainers(AssemblerTool.java:127)
>       at 
> org.openejb.alt.assembler.classic.Assembler.buildContainerSystem(Assembler.java:227)
>       at org.openejb.alt.assembler.classic.Assembler.build(Assembler.java:153)
>       at org.openejb.OpenEJB.init(OpenEJB.java:243)
>       at org.openejb.OpenEJB.init(OpenEJB.java:129)
>       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.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:76)
>       at 
> org.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:86)
>       at 
> org.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:72)
>       ... 20 more
> -------------------------------------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to