You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Marius Kruger <am...@gmail.com> on 2011/01/15 02:41:03 UTC
OpenEJBException: Creating application failed: classpath.ear: Error
building bean
hi,
sorry to bug you but I've battled with this for a couple of days too long.
I have a fairly complicated application that stopped working all of a
sudden with the exception below (and full broken log attached).
What is strange is that it has been working for a year and this is the
first time I recall seeing this.
This only happens when I try to deploy it from eclipse to tomcat, when
I build it with maven it works fine in tomcat (working log attached)
and jetty.
I use openejb in embedded mode. I wish I knew where to digg next, any
pointers will be appreciated.
Apache OpenEJB 3.1.4 build: 20101031-09:28
2011-01-15 03:06:22,628:INFO Jndi(name=JxtaManagerLocal) -->
Ejb(deployment-id=JxtaManager) - OpenEJB.startup
2011-01-15 03:06:22,635:INFO Undeploying app: classpath.ear - OpenEJB.startup
2011-01-15 03:06:22,646:INFO closing - org.hibernate.impl.SessionFactoryImpl
2011-01-15 03:06:22,649:ERROR Application could not be deployed:
classpath.ear - OpenEJB.startup
org.apache.openejb.OpenEJBException: Creating application failed:
classpath.ear: Error building bean 'DataTypeRegistryService'.
Exception: class java.lang.NullPointerException: null: null
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:679)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:450)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:368)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:280)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
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:597)
at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at za.co.enerweb.ebr.oe.OrchestrationEngineFactory.getEjbContext(OrchestrationEngineFactory.java:59)
at za.co.enerweb.ebr.oe.OrchestrationEngineFactory.lookupEjb(OrchestrationEngineFactory.java:145)
at za.co.enerweb.ebr.oe.OrchestrationEngineFactory.lookupEjb(OrchestrationEngineFactory.java:136)
at za.co.enerweb.ebr.oe.OrchestrationEngineFactory.getOrchestrationEngine(OrchestrationEngineFactory.java:185)
at za.co.enerweb.ebr.oe.OrchestrationEngineFactory.open(OrchestrationEngineFactory.java:158)
at za.co.enerweb.ebr.EbrContextListener.contextInitialized(EbrContextListener.java:25)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.apache.openejb.OpenEJBException: Error building bean
'DataTypeRegistryService'. Exception: class
java.lang.NullPointerException: null: null
at org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:64)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:527)
... 40 more
Caused by: java.lang.NullPointerException
at org.apache.openejb.assembler.classic.InjectionBuilder.buildInjections(InjectionBuilder.java:35)
at org.apache.openejb.assembler.classic.EnterpriseBeanBuilder.build(EnterpriseBeanBuilder.java:122)
at org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:52)
... 41 more
15 Jan 2011 3:06:22 AM org.apache.catalina.core.StandardContext listenerStart
--
thanks
marius
Re: OpenEJBException: Creating application failed: classpath.ear:
Error building bean
Posted by Marius Kruger <am...@gmail.com>.
On 15 January 2011 07:25, Quintin Beukes <qu...@last.za.net> wrote:
> Beyond this I also noticed 2 modules with the name 'orchistration engine'
> are being loaded. One from stf_fast and one from stf. Is this correct, or do
> they perhaps conflict?
>
> 2011-01-15 03:06:18,795:INFO Found EjbModule in classpath:
> /stf/prj/EBR/work/ebr-orchestration-engine/target/classes -
> OpenEJB.startup.config
>
> 2011-01-15 03:06:18,799:INFO Found EjbModule in classpath:
> /stf_fast/prj/EBR/work/ebr-orchestration-engine/target/classes -
> OpenEJB.startup.config
wow, I changed my context parameters from:
openejb.deployments.classpath.include=.*(ebr-orchestration-engine|ebr-.+-plugin|ebr-.+-ejb).*
to:
openejb.deployments.classpath.include=.*stf_fast.*(ebr-orchestration-engine|ebr-.+-plugin|ebr-.+-ejb).*
so that the old location is ignored and it worked! I cannot believe it.
My stuff used to be at /stf/ and recently I moved it to /stf_fast/
which is on a solid state disk and added a symlink,
I think eclipse is still using the /stf/ form in some its
configurations which seems to break this.
Since it is exactly the same stuff in both locations I'm not sure why
this is causing problems for openejb,
I think if openejb can't handle that it would have been nice if it
could sort of detect this and not add it twice...
Will sort out my environment, thanks for the help!
you're my new hero! I'll buy you a beer if I ever meet you
(maybe at a ferndale jug http://fjug.co.za/ meeting if you are in the
area, although I see the site is down ATM, I know the guy has been
fighting with .co.za a bit).
--
<>< Marius ><>
Re: OpenEJBException: Creating application failed: classpath.ear:
Error building bean
Posted by Marius Kruger <am...@gmail.com>.
On 15 January 2011 07:25, Quintin Beukes <qu...@last.za.net> wrote:
> Hi,
> Seems you were up late with this one ;>
yip :-)
> Since it's being loaded from eclipse, there are no packages being built.
> Instead the target/classes directories are deployed.
> I noticed some test-classes directories are being deployed. Do they perhaps
> contain configuration that you do not want loaded into your deployment
> environment?
I do need some of them, but that is something to doublecheck yes
> You could have a look at configuring your project to not deploy
> these test-classes directories or excluding them with
> openejb.deployment.classpath.exclude:
thanks for the tip
> 2011-01-15 03:06:18,811:INFO Beginning load:
> /stf_fast/prj/EBR/work/ebr-pms-ejb/target/test-classes -
> OpenEJB.startup.config
>
> Beyond this I also noticed 2 modules with the name 'orchistration engine'
> are being loaded. One from stf_fast and one from stf. Is this correct, or do
> they perhaps conflict?
wow thanks for looking in so much detail. Those are the same thing
(symlinked), but it is strange if it is trying to load it twice
though, will investigate.
--
thanks a lot, a second pair of eyes often spot obvious mistakes.
I'll play around more on monday, eventually I may resolve to start
over with a simple environment and build it up again.
<>< Marius ><>
Re: OpenEJBException: Creating application failed: classpath.ear:
Error building bean
Posted by Quintin Beukes <qu...@last.za.net>.
Hi,
Seems you were up late with this one ;>
Since it's being loaded from eclipse, there are no packages being built.
Instead the target/classes directories are deployed.
I noticed some test-classes directories are being deployed. Do they perhaps
contain configuration that you do not want loaded into your deployment
environment? You could have a look at configuring your project to not deploy
these test-classes directories or excluding them with
openejb.deployment.classpath.exclude:
2011-01-15 03:06:18,811:INFO Beginning load:
/stf_fast/prj/EBR/work/ebr-pms-ejb/target/test-classes -
OpenEJB.startup.config
Beyond this I also noticed 2 modules with the name 'orchistration engine'
are being loaded. One from stf_fast and one from stf. Is this correct, or do
they perhaps conflict?
2011-01-15 03:06:18,795:INFO Found EjbModule in classpath:
/stf/prj/EBR/work/ebr-orchestration-engine/target/classes -
OpenEJB.startup.config
2011-01-15 03:06:18,799:INFO Found EjbModule in classpath:
/stf_fast/prj/EBR/work/ebr-orchestration-engine/target/classes -
OpenEJB.startup.config
Just some initial ideas. Will look at it a bit more in a moment.
Quintin Beukes
On Sat, Jan 15, 2011 at 3:41 AM, Marius Kruger <am...@gmail.com> wrote:
> hi,
> sorry to bug you but I've battled with this for a couple of days too long.
> I have a fairly complicated application that stopped working all of a
> sudden with the exception below (and full broken log attached).
> What is strange is that it has been working for a year and this is the
> first time I recall seeing this.
> This only happens when I try to deploy it from eclipse to tomcat, when
> I build it with maven it works fine in tomcat (working log attached)
> and jetty.
> I use openejb in embedded mode. I wish I knew where to digg next, any
> pointers will be appreciated.
>
> Apache OpenEJB 3.1.4 build: 20101031-09:28
>
> 2011-01-15 03:06:22,628:INFO Jndi(name=JxtaManagerLocal) -->
> Ejb(deployment-id=JxtaManager) - OpenEJB.startup
> 2011-01-15 03:06:22,635:INFO Undeploying app: classpath.ear -
> OpenEJB.startup
> 2011-01-15 03:06:22,646:INFO closing -
> org.hibernate.impl.SessionFactoryImpl
> 2011-01-15 03:06:22,649:ERROR Application could not be deployed:
> classpath.ear - OpenEJB.startup
> org.apache.openejb.OpenEJBException: Creating application failed:
> classpath.ear: Error building bean 'DataTypeRegistryService'.
> Exception: class java.lang.NullPointerException: null: null
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:679)
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:450)
> at
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:368)
> at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:280)
> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125)
> at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
> 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:597)
> at
> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
> at
> org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
> at
> org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
> at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
> at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
> at javax.naming.InitialContext.init(InitialContext.java:223)
> at javax.naming.InitialContext.<init>(InitialContext.java:197)
> at
> za.co.enerweb.ebr.oe.OrchestrationEngineFactory.getEjbContext(OrchestrationEngineFactory.java:59)
> at
> za.co.enerweb.ebr.oe.OrchestrationEngineFactory.lookupEjb(OrchestrationEngineFactory.java:145)
> at
> za.co.enerweb.ebr.oe.OrchestrationEngineFactory.lookupEjb(OrchestrationEngineFactory.java:136)
> at
> za.co.enerweb.ebr.oe.OrchestrationEngineFactory.getOrchestrationEngine(OrchestrationEngineFactory.java:185)
> at
> za.co.enerweb.ebr.oe.OrchestrationEngineFactory.open(OrchestrationEngineFactory.java:158)
> at
> za.co.enerweb.ebr.EbrContextListener.contextInitialized(EbrContextListener.java:25)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Caused by: org.apache.openejb.OpenEJBException: Error building bean
> 'DataTypeRegistryService'. Exception: class
> java.lang.NullPointerException: null: null
> at
> org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:64)
> at
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:527)
> ... 40 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.openejb.assembler.classic.InjectionBuilder.buildInjections(InjectionBuilder.java:35)
> at
> org.apache.openejb.assembler.classic.EnterpriseBeanBuilder.build(EnterpriseBeanBuilder.java:122)
> at
> org.apache.openejb.assembler.classic.EjbJarBuilder.build(EjbJarBuilder.java:52)
> ... 41 more
> 15 Jan 2011 3:06:22 AM org.apache.catalina.core.StandardContext
> listenerStart
>
> --
> thanks
> marius
>