angelozerr / mongo-jee

JEE support (Servlet and JAX-RS) for MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JaxrsMongoApplication causes problems on JBoss AS 7

kennardconsulting opened this issue · comments

Hello again,

This step...

http://angelozerr.wordpress.com/2013/05/14/mongo_jee_step4/

...appears to go a bit wrong under JBoss AS 7. I realize the tutorial uses Jetty (and that works great), but presumably Mongo JEE itself is intended to support other application servers? Could you please investigate?

It appears JBoss AS 7 is finding JaxrsMongoApplication inside WEB-INF/lib/mongo-jee-1.0.0.jar and considering that to be the Application. So if you try to define your own app you get:

"JBAS011232: Only one JAX-RS Application Class allowed. com.mongodb.jee.jaxrs.JaxrsMongoApplication com.myapp.server.MyApplication"

Equally if you just try to add a web.xml mapping without defining your own app you get:

"JBAS011233: Please use either @ApplicationPath or servlet mapping for url path config"

If I manually remove JaxrsMongoApplication from mongo-jee-1.0.0.jar then it all works great on JBoss AS 7. Making JaxrsMongoApplication abstract would very likely work as well.

Regards,

Richard.

Many thank's Richard for your info.

I have set JaxrsMongoApplication as abstract class. See
d74918d

Regards Angelo