Hibernate configuration files not found by Axis2

Posted by DanJo519 on Stack Overflow See other posts from Stack Overflow or by DanJo519
Published on 2010-04-25T03:17:23Z Indexed on 2010/04/25 3:23 UTC
Read the original article Hit count: 405

Filed under:
|
|
|

I am writing a web service to be deployed on Tomcat using Axis2. I am using Hibernate3 to persist data between the web service and a MySQL database.

When running the application through by IDE, the method I am exposing through Axis2 works as intended, however when I deploy the .aar to Tomcat, I receive a SOAP Error claiming that hibernate.cfg.xml cannot be found.

However, inside the .aar, I clearly see that all the configuration file and all the mapping files are included.

I have determined a workaround: If I place the resulting files from the Netbeans build/class folder into the axis2/WEB-INF/class folder, then the application works as expected.

My question, then, is is there a better way to deploy my application so that Axis2 will pick up the configuration and mapping files through the deployed .aar without my manually having to copy the contents of the build/class folder into the axis2/WEB-INF/class folder?

© Stack Overflow or respective owner

Related posts about axis2

Related posts about hibernate