Alket Shabani
Alket Shabani

Reputation: 1

JAR - From derby to mysql

As per my knowledge in Apache OFBiz 16.11.04 the following path /framework/entity/lib/jdbc does not exist anymore.\ Could you provide me some information on how to implement JAR connector when migrating from derby to mysql?

I have done the steps described in Tutorial but the JAR part i cannot get, also i have little knowledge regarding JAR files Thanks in advance

Upvotes: 0

Views: 682

Answers (2)

sumit katiyar
sumit katiyar

Reputation: 191

In the new version Apache OfBiz 16.11.04 if you want configure MySQL DATABASE then you need to add jar Dependency in build.gradle file

compile 'mysql:mysql-connector-java:5.1.25'

File path - apache-ofbiz-16.11.04/build.gradle

and then modify entityengine.xml file

Upvotes: 2

JacquesLeRoux
JacquesLeRoux

Reputation: 611

In new releases, beginning with R16, you need to refer to the main README for that. Unfortunately this point is not present in R16 README. You can find the instructions here https://cwiki.apache.org/confluence/display/OFBIZ/From+Ant+to+Gradle+-+trunk+version#setup-an-external-database-like-mysql-postgresql-etc (there is a R16 version of this page but the below documentation is not present on the equivalent R16 wiki page)


Setup an external database like MySQL, PostgreSQL, etc

To setup an external database instead of the default embedded Apache Derby, you will need to follow the following instructions:

  1. Find the JDBC driver suitable for your database using one of the following options:
    • Search for the JDBC driver in jcenter and place it in build.gradle dependencies e.g. runtime 'mysql:mysql-connector-java:5.1.36'

OR

  • Download the JDBC driver jar and place it in $OFBIZ_HOME/lib or the lib sub-directory of any component

    1. Modify the entityengine.xml file located in $OFBIZ_HOME/framework/entity/config to switch the default database to the one you selected. For more details you can read the relevant section in the technical setup guide

Upvotes: 0

Related Questions