Thank you for reply, Richard! I investigate that postgresql driver should be copied to extracted tomee/lib directory, but I need to know path to this directory. Here my pom.xml:
https://pastebin.com/FFPAE0CZ I can specify "<outputDirectory>" for coping driver archive, but I don't know, where my Maven extracted TomEE (this place is not "<outputDirectory>target</outputDirectory>"). -- With best regards, Alexey Makarov 13.11.2019, 16:19, "Richard Monson-Haefel" <[email protected]>: > Hi, > > Here are a couple of links that show you how to configure TomEE for any > JDBC driver. The first is more tutorial in nature while the second link is > a property reference. > > http://tomee.apache.org/configuring-datasources.html > > http://tomee.apache.org/datasource-config.html > > Hopefully that will help! > > Richard > > On Wed, Nov 13, 2019 at 6:03 AM Makarov Alexey <[email protected]> wrote: > >> Hello! >> I try to use Arquillian with 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 is my case? >> >> -- >> With best regards, >> Alexey Makarov > > -- > Richard Monson-Haefel > https://twitter.com/rmonson > https://www.linkedin.com/in/monsonhaefel/
