Thursday, August 30, 2012

Struts 2 convention plugin in a WAR in a EAR in Jboss

This issue has been bugging my for a while and I have not found any solution to it so far. It seems from google results that I am not alone with this problem.

The problem occurs when you have a Struts 2 convention based web application (WAR) inside an EAR package. And deploy it on jboss. Because of Jboss using the vfszip packaging the open symphony ClassFinder fails with a message like

c.o.x.u.f.ClassFinder - Unable to read URL 
    [vfszip:/.../server/default/deploy/MyEar.ear/MyWebApp.war/WEB-INF/classes/]
    java.io.FileNotFoundException: 
    /.../server/default/deploy/MyEar.ear/MyWebApp.war/WEB-INF/classes/ 

So. Nobody solved it in a good way yet. I'm gonna go with this solution, it'll have to do for now.

Update: I tried to implement the linked solution using reflections, but failed. Basically it has the same issue and I'm still left with hard coding the list of classes.

No comments:

Post a Comment