You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Martin Vysny <mv...@whitestein.com> on 2007/10/10 09:05:25 UTC

Exception: NullPointerException

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.


-- 
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


Re: Exception: NullPointerException

Posted by David Blevins <da...@visi.com>.

Martin Vysny-2 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:
> 

Hi Martin.  This is a known issue and defnitely will be fixed.  Essentially
that tag was removed between EJB 2.0 and 2.1 and there's an alternate way to
do that.

http://issues.apache.org/jira/browse/OPENEJB-701

Instead of <message-driven-destination> you add this:
<message-driven> 
  <activation-config> 
     <activation-config-property> 
      
<activation-config-property-name>destinationType</activation-config-property-name> 
      
<activation-config-property-value>javax.jms.Queue</activation-config-property-value> 
     </activation-config-property> 
  </activation-config> 
</message-driven> 

Hope this helps and thanks for the patch to the
moduleId/NullPointerException.
-- 
View this message in context: http://www.nabble.com/Exception%3A-NullPointerException-tf4598977.html#a13151773
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Exception: NullPointerException

Posted by Mohammad Nour El-Din <no...@gmail.com>.
On 10/11/07, Martin Vysny <mv...@whitestein.com> wrote:
>
>
> On Wed, 2007-10-10 at 22:28 +0200, Mohammad Nour El-Din wrote:
> > Hi Martin...
> >
> > Thanks for your comments and your patch I will review when I have time
> and
> > apply it if applicable. Just as a friendly note, these kinds of notes it
> is
> > better to be sent on the development list so it can get better noticed
> :). I
> > hope you wont stop finding issues and fixing them for OpenEJB :D .
> >
>
> Hello Mohammad,
> thanks for your note, I will do so next time :) And thanks for your hard
> work on OpenEJB, the project looks great (I especially like the
> infrastructure: maven2, unit tests, you guys better be proud of
> yourselves :) We intend to use OpenEJB for developing/debugging JEE apps
> quickly in Eclipse, so you'll probably have to bear with me for a
> while :) keep up the good work!
> Martin


Don't worry about that it is our pleasure to help others to use OpenEJB and
make it better :)

> On 10/10/07, Martin Vysny <mv...@whitestein.com> wrote:
> > >
> > >
> > > On Wed, 2007-10-10 at 10:04 +0200, Martin Vysny wrote:
> > > > 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.0descriptor
> > > > > 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.
> > > >
> > > >
> > > > >
> > >
> > > https://issues.apache.org/jira/browse/OPENEJB-707
> > >
> > > --
> > > 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
> > >
> > >
> > >
> >
> >
> --
> 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
>
>
>


-- 
Thanks
- Mohammad Nour

Re: Exception: NullPointerException

Posted by Martin Vysny <mv...@whitestein.com>.
On Wed, 2007-10-10 at 22:28 +0200, Mohammad Nour El-Din wrote:
> Hi Martin...
> 
> Thanks for your comments and your patch I will review when I have time and
> apply it if applicable. Just as a friendly note, these kinds of notes it is
> better to be sent on the development list so it can get better noticed :). I
> hope you wont stop finding issues and fixing them for OpenEJB :D .
> 

Hello Mohammad,
thanks for your note, I will do so next time :) And thanks for your hard
work on OpenEJB, the project looks great (I especially like the
infrastructure: maven2, unit tests, you guys better be proud of
yourselves :) We intend to use OpenEJB for developing/debugging JEE apps
quickly in Eclipse, so you'll probably have to bear with me for a
while :) keep up the good work!
Martin

> On 10/10/07, Martin Vysny <mv...@whitestein.com> wrote:
> >
> >
> > On Wed, 2007-10-10 at 10:04 +0200, Martin Vysny wrote:
> > > 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.0descriptor
> > > > 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.
> > >
> > >
> > > >
> >
> > https://issues.apache.org/jira/browse/OPENEJB-707
> >
> > --
> > 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
> >
> >
> >
> 
> 
-- 
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


Re: Exception: NullPointerException

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi Martin...

Thanks for your comments and your patch I will review when I have time and
apply it if applicable. Just as a friendly note, these kinds of notes it is
better to be sent on the development list so it can get better noticed :). I
hope you wont stop finding issues and fixing them for OpenEJB :D .

On 10/10/07, Martin Vysny <mv...@whitestein.com> wrote:
>
>
> On Wed, 2007-10-10 at 10:04 +0200, Martin Vysny wrote:
> > 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.0descriptor
> > > 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.
> >
> >
> > >
>
> https://issues.apache.org/jira/browse/OPENEJB-707
>
> --
> 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
>
>
>


-- 
Thanks
- Mohammad Nour

Re: Exception: NullPointerException

Posted by Martin Vysny <mv...@whitestein.com>.
On Wed, 2007-10-10 at 10:04 +0200, Martin Vysny wrote:
> 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.
> 
> 
> > 

https://issues.apache.org/jira/browse/OPENEJB-707

-- 
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


Re: Exception: NullPointerException

Posted by Martin Vysny <mv...@whitestein.com>.
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