Axon on JBoss

131 views
Skip to first unread message

Koen Molkenboer

unread,
Feb 24, 2012, 9:38:21 AM2/24/12
to Axon Framework Users
Hi all,

Has anyone experience with running Axon on JBoss.

When I try to deploy my war, I get the following error:

java.lang.RuntimeException: mapped-name is required for
org.axonframework.repository.AbstractRepository/eventBus of deployment
ppi.war
at
org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXmlResourceEnvRefs(WebResourceHandler.java:
287)
at
org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXml(WebResourceHandler.java:
325)
at
org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:
550)
at org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:
158)
...

The class AbstractRepository has a method setEventBus which has a
@Resource annotation.
I think JBoss scans the classpath finds the annotation and fails to
inject the resource. I don't want JBoss to inject my resources or the
resources needed by Axon, I want Spring to do it. My application works
perfect in Tomcat.

Can anyone help?

Thanks!

Allard Buijze

unread,
Feb 27, 2012, 6:00:40 AM2/27/12
to axonfr...@googlegroups.com
Hi Koen,

sorry for the late response. Although the internet allows you to take away international boundaries, as soon as you cross one yourself it seems to become very hard to get a proper connection ;-).

It looks like the @Resource annotation is causing Spring and JBoss AS to start a little war among eachother. I didn't really anticipate this, and might need to take the annotations out.

Until then: maybe there is a configuration option that tells JBoss not to attempt to autowire the application for you?

Cheers,

Allard

Koen Molkenboer

unread,
Feb 27, 2012, 10:16:28 AM2/27/12
to Axon Framework Users
Hi Allard,

Thanks for the response!

I was hoping that someone in this user group knows which option in
JBoss that is...

JBoss is part of the standard infra architecture, but for now we will
not apply to this standard and use tomcat. I don't need a full JEE
server anyway.

Cheers,
Koen

On Feb 27, 12:00 pm, Allard Buijze <bui...@gmail.com> wrote:
> Hi Koen,
>
> sorry for the late response. Although the internet allows you to take away
> international boundaries, as soon as you cross one yourself it seems to
> become very hard to get a proper connection ;-).
>
> It looks like the @Resource annotation is causing Spring and JBoss AS to
> start a little war among eachother. I didn't really anticipate this, and
> might need to take the annotations out.
>
> Until then: maybe there is a configuration option that tells JBoss not to
> attempt to autowire the application for you?
>
> Cheers,
>
> Allard
>
> On Fri, Feb 24, 2012 at 3:38 PM, Koen Molkenboer
> <koen.molkenb...@gmail.com>wrote:

Marcin Deryło

unread,
Feb 29, 2012, 2:47:31 PM2/29/12
to axonfr...@googlegroups.com
Hi,

Is that JBoss 5? I think it looks like the issue I've run a few weeks ago while migrating our Spring-powered app from JBoss 4.2 to JBoss 5. IIRC we have solved the problem by adding metadata-complete="true" tag to the root tag of our web.xml file.

Cheers,
Marcin

Koen Molkenboer

unread,
Mar 7, 2012, 6:34:00 AM3/7/12
to Axon Framework Users
Hi,

Thanks for your reply.

Yes, we are using JBoss 5.1.
Adding metadata-complete="true" tag to the root tag of the web.xml
works!

Again thanks,
Koen
> > > >        at...
>
> read more »
Reply all
Reply to author
Forward
0 new messages