0 Replies Latest reply on Nov 14, 2019 9:13 AM by alexey.makarov1

    Arquillian and PostgreSQL driver

    alexey.makarov1

      Hello!

      I try to use Arquillian with TomEE and connection to PostgreSQL database but when I run test, it fail becouse server cannot find "org.postgresql.Driver":

      ...

      13-Nov-2019 16:57:46.469 SEVERE [main] org.apache.tomee.catalina.ServerListener.lifecycleEvent TomEE Listener can't start OpenEJB

              org.apache.openejb.OpenEJBException: org.apache.xbean.propertyeditor.PropertyEditorException: Unable to resolve class org.postgresql.Driver: Unable to resolve class org.postgresql.Driver

      ....

       

      I check files in ShrinkWrap archive, file with driver exists ("/WEB-INF/lib/postgresql-42.2.8.jar"). I setup my datasource in arqullian.xml:

       

      <property name="properties">

                      myDS = new://Resource?type=DataSource

                      myDS.JdbcUrl = jdbc:postgresql://localhost:5432/mydb

                      myDS.JdbcDriver = org.postgresql.Driver

                      myDS.UserName = abc

                      myDS.Password = xyz

                      myDS.JtaManaged = true

      </property>

       

      I can assume, datasource is loaded earlier than web-archive. I use Maven. How I can provide postgresql driver to TomEE in my case?

       

      ---

      With best regards,

      Alexey Makarov