tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Vysny (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENEJB-706) NullPointerException initializing activemq
Date Wed, 10 Oct 2007 15:16:51 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533765
] 

Martin Vysny commented on OPENEJB-706:
--------------------------------------

I was able to circumvent this bug somehow by patching org.apache.openejb.assembler.classic.Assembler
class: just go to the line 799 and add a single line:
...
        ObjectRecipe serviceRecipe = new ObjectRecipe(serviceInfo.className, serviceInfo.factoryMethod,
serviceInfo.constructorArgs.toArray(new String[0]), null);
+	for(String arg: serviceInfo.constructorArgs) { serviceRecipe.setProperty(arg, arg); }
        serviceRecipe.setAllProperties(serviceInfo.properties);
...


> NullPointerException initializing activemq
> ------------------------------------------
>
>                 Key: OPENEJB-706
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-706
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.0-beta-1
>            Reporter: Martin Vysny
>
> Tried to run EJB2.1 application on OpenEJB and I got this:
> ERROR - FATAL ERROR: Unknown error in Assembler.  Please send the following stack trace
and this message to user@openejb.org :
>  org.apache.xbean.recipe.ConstructionException: Error invoking constructor: public org.apache.activemq.command.ActiveMQQueue(java.lang.String)
> 	at org.apache.xbean.recipe.ObjectRecipe.createInstance(ObjectRecipe.java:399)
> 	at org.apache.xbean.recipe.ObjectRecipe.create(ObjectRecipe.java:194)
> 	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:28)
> 	at org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:806)
> 	at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:288)
> 	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:207)
> 	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 org.apache.activemq.command.ActiveMQDestination.setPhysicalName(ActiveMQDestination.java:205)
> 	at org.apache.activemq.command.ActiveMQDestination.<init>(ActiveMQDestination.java:142)
> 	at org.apache.activemq.command.ActiveMQQueue.<init>(ActiveMQQueue.java:43)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> 	at org.apache.xbean.recipe.ObjectRecipe.createInstance(ObjectRecipe.java:389)
> 	... 33 more
> FATAL - OpenEJB has encountered a fatal error and cannot be started: Assembler failed
to build the container system.
> org.apache.openejb.OpenEJBException: org.apache.xbean.recipe.ConstructionException: Error
invoking constructor: public org.apache.activemq.command.ActiveMQQueue(java.lang.String):
Error invoking constructor: public org.apache.activemq.command.ActiveMQQueue(java.lang.String)
> 	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: org.apache.xbean.recipe.ConstructionException: Error invoking constructor:
public org.apache.activemq.command.ActiveMQQueue(java.lang.String)
> 	at org.apache.xbean.recipe.ObjectRecipe.createInstance(ObjectRecipe.java:399)
> 	at org.apache.xbean.recipe.ObjectRecipe.create(ObjectRecipe.java:194)
> 	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:28)
> 	at org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:806)
> 	at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:288)
> 	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:207)
> 	... 28 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.activemq.command.ActiveMQDestination.setPhysicalName(ActiveMQDestination.java:205)
> 	at org.apache.activemq.command.ActiveMQDestination.<init>(ActiveMQDestination.java:142)
> 	at org.apache.activemq.command.ActiveMQQueue.<init>(ActiveMQQueue.java:43)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> 	at org.apache.xbean.recipe.ObjectRecipe.createInstance(ObjectRecipe.java:389)
> 	... 33 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message