3 Replies Latest reply on Aug 21, 2011 5:42 AM by djarnis73

    Yet another WAR classloading question JBoss-5.1.0.GA

    djarnis73

      Hi

       

      I know there are like a million questions about getting jboss to load classes in a web application from WEB-INF/{lib,classes} first and then from JBoss itself.

       

      My specific goal is to build an application using JPA2 with hibernate 3.6.3 and be able to deploy it as a war file that will work on various app servers (jetty, tomcat, jboss etc.) without modification.

       

      I have read quite a few posts/blogs/articles and tried various combinations of jboss-classloading.xml, jboss-web.xml etc. but without success.

       

      So the question is: Has anybody managed to get this working on JBoss-5.1.0.GA? I'm bound to that by company policy, so I'm only interested in that version.

       

      From what I have read it does not seem possible, but I thought I would it a chance on this forum before giving up.

       

      If i dont find a solution i guess i will have to:

      1) Downgrade the application to JPA1/Hibernate3.3.2.

      2) Remove various jars from the war file.

      3) Change the data source in persistence.xml (no 'java:comp/env' in jboss).

       

      Enterprise does really mean: overly complicated and expensive, but that is of course how we stay alive in the software industry.

       

      Best regards Jens