2 Replies Latest reply on Oct 13, 2013 9:52 PM by M Mudu

    Where to add JBoss Datasource desctiptor

    M Mudu Newbie

      I am trying to run a test on a session bean that uses JPA and I am following the documentation here http://arquillian.org/guides/testing_java_persistence/#run_the_test_on_jboss_as_7

      What I cannot figure out is where to put the jboss-as.xml.  Does it go in the /src/main/resources or the /src/test/resources?

      I know that the descriptor has to end up in the WEB-INF directory of the deployed .war and I have used the ShrinkWrap method .addAsWebInfResource("jbossas-ds.xml").

      At the moment the jbossas-ds.xml is located in:










        • 1. Re: Where to add JBoss Datasource desctiptor
          Bartosz Majsak Master

          At the end of the day it does not matter where you actually put the file in your project structure. Shrinkwrap will grab it from the given location and put it under /WEB-INF/ in the created WAR file. It really depends on the purpose of this file. If it's for testing only 'src/test/resources/' should be good place to store it.


          Does it work for your with the current layout you defined?

          1 of 1 people found this helpful
          • 2. Re: Where to add JBoss Datasource desctiptor
            M Mudu Newbie

            At the moment it does not work.  I have managed to put the -ds.xml file in the /WEB-INF/ directory, however now I am getting an error where JBOSS cannot find the MySql driver (see below):


            JBAS011440: Can't find a persistence unit named webapp in deployment \"test.war\""},

                "JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.java:jboss/datasources/WEBAPPDS is missing [jboss.jdbc-driver.mysql]"]