tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Vysny <...@whitestein.com>
Subject Re: Exception: NullPointerException
Date Wed, 10 Oct 2007 08:04:14 GMT

On Wed, 2007-10-10 at 09:05 +0200, Martin Vysny wrote:
> Hi guys,
>   I tried to deploy an EJB2.1 project in OpenEJB, (btw EJB2.0 descriptor
> is rejected by OpenEJB: validation error - the
> <message-driven-destination> element in <message-driven> is rejected),
> but I get this error:
> 
> ERROR - FATAL ERROR: Unknown error in Assembler.  Please send the
> following stack trace and this message to user@openejb.org :
>  java.lang.NullPointerException
> 	at java.lang.String.compareTo(String.java:998)
> 	at java.lang.String.compareTo(String.java:90)
> 	at java.util.TreeMap.compare(TreeMap.java:1093)
> 	at java.util.TreeMap.getEntry(TreeMap.java:347)
> 	at java.util.TreeMap.get(TreeMap.java:265)
> 	at
> org.apache.openejb.config.JndiEncInfoBuilder.initJndiReferences(JndiEncInfoBuilder.java:84)
> 	at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:397)
> 	at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:285)
> 	at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:268)
> 	at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:206)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:293)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:272)
> 	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.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> 	at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:59)
> 	at
> org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:45)
> 	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:197)
> 	at org.acme.FriendlyPersonTest.setUp(FriendlyPersonTest.java:41)
> 	at junit.framework.TestCase.runBare(TestCase.java:128)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> 	at junit.framework.TestSuite.run(TestSuite.java:223)
> 	at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> 
> FATAL - OpenEJB has encountered a fatal error and cannot be started:
> Assembler failed to build the container system.
> org.apache.openejb.OpenEJBException: java.lang.NullPointerException:
> null
> 	at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:220)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:293)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:272)
> 	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.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> 	at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:59)
> 	at
> org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:45)
> 	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:197)
> 	at org.acme.FriendlyPersonTest.setUp(FriendlyPersonTest.java:41)
> 	at junit.framework.TestCase.runBare(TestCase.java:128)
> 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> 	at junit.framework.TestResult.run(TestResult.java:113)
> 	at junit.framework.TestCase.run(TestCase.java:120)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> 	at junit.framework.TestSuite.run(TestSuite.java:223)
> 	at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> 	at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.NullPointerException
> 	at java.lang.String.compareTo(String.java:998)
> 	at java.lang.String.compareTo(String.java:90)
> 	at java.util.TreeMap.compare(TreeMap.java:1093)
> 	at java.util.TreeMap.getEntry(TreeMap.java:347)
> 	at java.util.TreeMap.get(TreeMap.java:265)
> 	at
> org.apache.openejb.config.JndiEncInfoBuilder.initJndiReferences(JndiEncInfoBuilder.java:84)
> 	at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:397)
> 	at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:285)
> 	at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:268)
> 	at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:206)
> 	... 28 more
> 
> I'm using OpenEJB 3.0-beta-1, it seems that the moduleID is not set
> correctly at DeploymentLoader:372. I'll try to fix it somehow - I'll
> post later.
> 

Okay, changing the line to
            EjbModule ejbModule = new EjbModule(classLoader,
jarFile.getName(), jarFile.getAbsolutePath(), ejbJar, null);
seems to did the trick.


> 
-- 
Mgr. Martin Vysny | mvy@whitestein.com
Software Engineer
Whitestein Technologies s.r.o | www.whitestein.com
Panenska 28 | 811 03 Bratislava | Slovak Republic
Main +421 2 5443-5502 | Direct +421 2 5930-0717


Mime
View raw message