Sonar does not officially support the JBoss AS7 application server / servlet container (or any JBoss version). By default, JBoss's JPA modules notice the
persistence.xml file in
sonar-core-2.13.1.jar!/META-INF/persistence.xml and attempt to setup JPA (Hibernate). This fails (because Sonar isn't expecting JBoss to be doing anything in the way of setting up Hibernate). One solution is to remove the JPA module from JBoss.
I am using JBoss AS7 with the
standalone/configuration/standalone.xml. I commented out the two sections:
... <extensions> ... <!-- <extension module="org.jboss.as.jpa"/> --> ... <extensions> ... <!-- <subsystem xmlns="urn:jboss:domain:jpa:1.0"> <jpa default-datasource=""/> </subsystem> --> ...
After this, I was able to follow the Sonar Installation Instructions.
Obviously, this solution will not work if you were using JBoss's JPA module for other deployed applications. I'm not sure if there is a way to disable it on a per-application basis.