i've got my web application war originally developed under Tomcat and I'm experiencing issues with JBoss deploying. My scenario gives me no access to modify JBoss common/lib presence so the only chance I've got is to add the right descriptor jboss-classloading.xml to my WEB-INF to instruct the classloader to give precedence to my web-inf/lib.
My web app uses Hibernate 3.5 jars as well as Struts 1.3.10 and other framework. I defined this classloader tag:
where domain is my war name but this not fix my issue. Jboss still uses the hibernate jar in common lib to solve classes ignoring my hibernate jars in my web-inf/lib (I used a new method present only in the last version of Hibernate. Hibernate version present in JBoss can do the same using a deprecated method and I really don't want to touch the code). My goal is to give higher precedence to my web-inf/lib to avoid conflicts in version and dependencies. I'm newbie at JBoss but this issue is becoming too time consuming for me. I hope that JBoss community documentation will add soon tutorial and examples to explain this descriptors in a clear way.
Thanks a lot
P.S. Please note that at the moment I get a sessionfactory binding an Hibernate Util class to my web application listener. I hope this doesn't cause other issues thought I will soon bind to a JNDI resource.
Thanks, btw I tried to remove hibernate-validator.jar from common/lib to see my app correctly deployed...at least it starts but there's one more issue. My Jboss distribution is bundled inside Liferay CMS; I can't touch common/lib anymore and my web app is using Struts 1.3. Integrating into a liferay portlet Struts is no more recognized obtaining a 500 error and this stack trace:
javax.servlet.ServletException: Cannot find catalog 'struts'
I suspect for this error I should check liferay community even if I'm using the classloading descriptor above to give precedence to my web-inf/lib.
It's a real nightmare!
Thanks for your help
Btw the exception above is due to a load-on-startup tag inside the web.xml. Jboss does not like the give priority; removing this tag the deploy runs fine. It maybe caused by several servlet loaded by Struts and Birt together in the same application. If you don't have special needs, best practice is to not specify load-on-startup, leaving the loading order to the servlet container. Hope I'm right.
Thanks for your help.