Weblogic 9.2 + Hibernate 3.2 + Axis2-1-2

Just capturing some thoughts on this particular setup…

Ok… Here are my steps to resolve this under WL9.2. These may be similar to yours but I am going to list them out in detail. These steps allowed me to work with Axis2 + Hibernate 3.2 + WL 9.2 without encountering some of the linkage errors I experienced:

1. Build and pack up Axis2.war per Axis2 build instructions. This means building the Axis2 web app with the requisite ant task (create.war).
2. Explode the newly built Axis2.war file and modify some of the configuration settings appropriate for WL 9.x. These modifications include the following for the web app:
– Add weblogic.xml containing “prefer-web-inf-classes” to Axis2/WEB-INF/
3. Create a new repository location to house Axis2 service archives and modules.
4. Modify Axis2’s web.xml to point to the newly created repository location.
– Clean up by removing Axis2’s predefined repository OR move predefined modules and services to your new location.
– If predefined modules and services are moved, make sure to define the modules and services in their respective *.list file in the repository.
5. Create an EAR to house your modified Axis2 web application.
6. Add weblogic-application.xml containing classloader filters to the EARs deployment. My prefered package filters defined in weblogic-application.xml include the following:

<weblogic-application xmlns=”http://www.bea.com/ns/weblogic/90″>

I had to add org.xml.sax.* to get around linkage errors related to Class org/xml/sax/EntityResolver when parsing hibernate configurations. If there is a better solution, please advise!

7. Pack up your EAR and deploy it to a WL instance.

Assuming you’ve deployed your Axis2 EAR and everything starts up correctly, you should be able to see Axis’ admin pages, etc… You can now build and deploy your new service archives and modules. Assuming you have a new service to deploy:

8. Copy your archive to the new repository location.
9. Modify your *.list file to add the new archive appropriately.

Note: I needed to deploy my service archive as exploded. This was the only way that some dependent libs were found. For example, Hibernate barked that it could not load proxies for my domain objects b/c it was unable to find net.sf.cglib.proxy.Enhancer.*. This caused ClassNotFoundException for net.sf.cglib.proxy.Enhancer$Enhancer Key. I don’t mind deploying exploded service archives, but if there is a better approach, please advise!

10. Run your service.