Issue Details (XML | Word | Printable)

Key: OPENEJB-57
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Blevins
Reporter: Nader Aeinehchi
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenEJB

OpenEJB does not work as embedded container in JUnit test under Eclipse

Created: 12/Sep/05 05:10 PM   Updated: 21/Sep/05 10:57 AM  Due: 25/Sep/06
Return to search
Component/s: None
Affects Version/s: 1.0 beta 1
Fix Version/s: 1.0 beta 1

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive javazone.zip 2005-09-21 10:56 AM Nader Aeinehchi 845 kB
Zip Archive javazone.zip 2005-09-18 09:37 AM Nader Aeinehchi 1.15 MB
Environment: Linux, Eclipse, Sun JDK 1.5.04

Resolution Date: 25/Sep/06 12:13 AM


 Description  « Hide
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

-------------------------------------------------------------------------------------


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jeff Turner made changes - 25/Sep/06 12:13 AM
Field Original Value New Value
Resolution Fixed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]