Skip to content

Commit 1d47613

Browse files
committed
Mysql driver is basically updated
1 parent 05069df commit 1d47613

File tree

13 files changed

+29
-29
lines changed

13 files changed

+29
-29
lines changed

openjpa-examples/jest/src/main/resources/META-INF/persistence.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<class>demo.Actor</class>
2828

2929
<properties>
30-
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
30+
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
3131
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/jest"/>
3232
<property name="javax.persistence.jdbc.user" value="root"/>
3333
<property name="javax.persistence.jdbc.password" value=""/>

openjpa-examples/openbooks/src/main/resources/META-INF/persistence.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
<properties>
3838
<!-- Use these for MySQL
39-
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
39+
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
4040
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost/OpenBooks"/>
4141
<property name="javax.persistence.jdbc.user" value="user"/>
4242
<property name="javax.persistence.jdbc.password" value="password"/>

openjpa-examples/opentrader/src/main/resources/META-INF/persistence.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<properties>
3333
<property name="openjpa.BrokerFactory" value="slice"/>
34-
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
34+
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
3535
<property name="openjpa.ConnectionUserName" value="demo"/>
3636
<property name="openjpa.ConnectionPassword" value="pwd"/>
3737

@@ -68,7 +68,7 @@
6868
<class>org.apache.openjpa.trader.domain.Trade</class>
6969
<class>org.apache.openjpa.trader.domain.Stock</class>
7070
<properties>
71-
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
71+
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
7272
<property name="openjpa.ConnectionURL" value="jdbc:mysql://localhost/exchange"/>
7373
<property name="openjpa.ConnectionUserName" value="root"/>
7474
<property name="openjpa.ConnectionPassword" value=""/>
@@ -90,7 +90,7 @@
9090
<class>org.apache.openjpa.trader.domain.Trade</class>
9191
<class>org.apache.openjpa.trader.domain.Stock</class>
9292
<properties>
93-
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
93+
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
9494
<property name="openjpa.ConnectionURL" value="jdbc:mysql://opentrader.cxlsv2qt7orp.us-east-1.rds.amazonaws.com:3306/exchange"/>
9595
<property name="openjpa.ConnectionUserName" value="ppoddar"/>
9696
<property name="openjpa.ConnectionPassword" value="password"/>

openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/conf/localizer.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ ConnectionDriverName-values: org.hsqldb.jdbcDriver,org.hsql.jdbcDriver,\
185185
org.h2.Driver,\
186186
COM.cloudscape.core.JDBCDriver,in.co.daffodil.db.jdbc.DaffodilDBDriver,\
187187
com.ddtek.jdbc.db2.DB2Driver,interbase.interclient.Driver,\
188-
com.mysql.jdbc.Driver,com.ddtek.jdbc.oracle.OracleDriver,\
188+
com.mysql.cj.jdbc.Driver,com.ddtek.jdbc.oracle.OracleDriver,\
189189
org.postgresql.Driver,com.pointbase.jdbc.jdbcUniversalDriver,\
190190
org.sourceforge.jxdbcon.JXDBConDriver,\
191191
com.ddtek.jdbc.sqlserver.SQLServerDriver,com.jnetdirect.jsql.JSQLDriver,\

openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
3535
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
3636

37-
// -ea -Dopenjpa.ConnectionDriverName=com.mysql.jdbc.Driver -Dopenjpa.ConnectionPassword=openjpatst
37+
// -ea -Dopenjpa.ConnectionDriverName=com.mysql.cj.jdbc.Driver -Dopenjpa.ConnectionPassword=openjpatst
3838
// -Dopenjpa.ConnectionURL=jdbc:mysql://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=openjpatst
3939
public class TestExplicitAccess extends SingleEMFTestCase {
4040

openjpa-project/BUILDING.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ To run the tests in the debugger simply add the following JVM properties
198198
-ea -Dopenjpa.ConnectionURL=jdbc:derby:target/database/openjpa-derby-database;create=true -Dopenjpa.ConnectionDriverName=org.apache.derby.jdbc.EmbeddedDriver
199199

200200
For running against a MySQL Docker installation:
201-
-ea -Dopenjpa.ConnectionDriverName=com.mysql.jdbc.Driver -Dopenjpa.ConnectionURL=jdbc:mysql://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=openjpatst -Dopenjpa.ConnectionPassword=openjpatst
201+
-ea -Dopenjpa.ConnectionDriverName=com.mysql.cj.jdbc.Driver -Dopenjpa.ConnectionURL=jdbc:mysql://localhost:3306/openjpatst -Dopenjpa.ConnectionUserName=openjpatst -Dopenjpa.ConnectionPassword=openjpatst
202202

203203
Running against a PostgreSQL Docker installation:
204204
-ea -Dopenjpa.ConnectionDriverName=org.postgresql.Driver -Dopenjpa.ConnectionURL=jdbc:postgresql://localhost:5432/openjpatst -Dopenjpa.ConnectionUserName=postgres -Dopenjpa.ConnectionPassword=postgres

openjpa-project/src/doc/manual/ref_guide_slice.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@
365365
For example, the following configuration will use two different JDBC
366366
drivers for slice <classname>One</classname> and <classname>Two</classname>.
367367
<programlisting>
368-
<![CDATA[<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
368+
<![CDATA[<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
369369
<property name="openjpa.slice.Two.ConnectionDriverName" value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"/>]]>
370370
</programlisting>
371371
</para>
@@ -378,13 +378,13 @@
378378
<property name="openjpa.slice.Two.ConnectionURL" value="jdbc:mysql:localhost//slice2"/>
379379
<property name="openjpa.slice.Three.ConnectionURL" value="jdbc:oracle:localhost//slice3"/>
380380
381-
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
381+
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
382382
<property name="openjpa.slice.Three.ConnectionDriverName" value="oracle.jdbc.Driver"/>]]>
383383
</programlisting>
384384
In this example, <classname>Three</classname> will use slice-specific
385385
<classname>oracle.jdbc.Driver</classname> driver while slice
386386
<classname>One</classname> and <classname>Two</classname> will use
387-
the driver <classname>com.mysql.jdbc.Driver</classname> as
387+
the driver <classname>com.mysql.cj.jdbc.Driver</classname> as
388388
specified by <classname>openjpa.ConnectionDriverName</classname>
389389
property value.
390390
</para>

openjpa-project/src/doc/manual/supported_databases.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ users, but may not support every feature of this release, please refer to the
155155
<link linkend="dbsupport_mysql">MySQL</link>
156156
</entry>
157157
<entry colname="dbversion">
158-
5.0.26, 5.1.6, 5.7
158+
5.0.26, 5.1.6, 5.7, 8.0.x
159159
</entry>
160160
<entry colname="drivname">
161161
MySQL Driver
162162
</entry>
163163
<entry colname="drivversion">
164-
5.1.6, 5.1.47
164+
5.1.6, 5.1.47, 8.0.29
165165
</entry>
166166
</row>
167167
<row>
@@ -1135,7 +1135,7 @@ Using the Sun JDBC-ODBC bridge to connect is not supported.
11351135
Example properties for MySQL
11361136
</title>
11371137
<programlisting>
1138-
openjpa.ConnectionDriverName: com.mysql.jdbc.Driver
1138+
openjpa.ConnectionDriverName: com.mysql.cj.jdbc.Driver
11391139
openjpa.ConnectionURL: jdbc:mysql://SERVER_NAME/DB_NAME
11401140
</programlisting>
11411141
</example>

openjpa-slice/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</dependency>
9090
</dependencies>
9191
<properties>
92-
<connection.driver.name>com.mysql.jdbc.Driver</connection.driver.name>
92+
<connection.driver.name>com.mysql.cj.jdbc.Driver</connection.driver.name>
9393
<connection.url>${openjpa.mysql.url}</connection.url>
9494
<connection.username>${openjpa.mysql.username}</connection.username>
9595
<connection.password>${openjpa.mysql.password}</connection.password>

openjpa-slice/src/test/resources/META-INF/persistence.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,16 @@
136136
<persistence-unit name="mysql">
137137
<properties>
138138
<property name="openjpa.BrokerFactory" value="slice"/>
139-
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
139+
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
140140

141141
<property name="openjpa.slice.Names" value="One,Two"/>
142142
<property name="openjpa.slice.DistributionPolicy" value="org.apache.openjpa.slice.policy.UserDistributionPolicy"/>
143143

144144
<property name="openjpa.ConnectionUserName" value="root"/>
145145
<property name="openjpa.ConnectionPassword" value=""/>
146-
<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
146+
<property name="openjpa.slice.One.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
147147
<property name="openjpa.slice.One.ConnectionURL" value="jdbc:mysql://localhost/slice1"/>
148-
<property name="openjpa.slice.Two.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
148+
<property name="openjpa.slice.Two.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
149149
<property name="openjpa.slice.Two.ConnectionURL" value="jdbc:mysql://localhost/slice2"/>
150150

151151
<property name="openjpa.Multithreaded" value="false"/>
@@ -236,7 +236,7 @@
236236
<persistence-unit name="car.mysql">
237237
<properties>
238238
<property name="openjpa.BrokerFactory" value="slice"/>
239-
<property name="openjpa.ConnectionDriverName" value="com.mysql.jdbc.Driver"/>
239+
<property name="openjpa.ConnectionDriverName" value="com.mysql.cj.jdbc.Driver"/>
240240

241241
<property name="openjpa.slice.Names" value="BMW,Honda,Ford"/>
242242

@@ -288,10 +288,10 @@
288288

289289
<property name="openjpa.ConnectionUserName" value="root"/>
290290
<property name="openjpa.ConnectionPassword" value=""/>
291-
<property name="openjpa.slice.S1.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S1,MaxTotal=4"/>
292-
<property name="openjpa.slice.S2.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S2,MaxTotal=4"/>
293-
<property name="openjpa.slice.S3.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S3,MaxTotal=4"/>
294-
<property name="openjpa.slice.S4.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S4,MaxTotal=4"/>
291+
<property name="openjpa.slice.S1.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S1,MaxTotal=4"/>
292+
<property name="openjpa.slice.S2.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S2,MaxTotal=4"/>
293+
<property name="openjpa.slice.S3.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S3,MaxTotal=4"/>
294+
<property name="openjpa.slice.S4.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S4,MaxTotal=4"/>
295295

296296
<property name="openjpa.jdbc.DBDictionary" value="mysql"/>
297297
<property name="openjpa.Multithreaded" value="false"/>
@@ -311,7 +311,7 @@
311311

312312
<property name="openjpa.ConnectionUserName" value="root"/>
313313
<property name="openjpa.ConnectionPassword" value=""/>
314-
<property name="openjpa.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/S,MaxTotal=4"/>
314+
<property name="openjpa.ConnectionProperties" value="DriverClassName=com.mysql.cj.jdbc.Driver,Url=jdbc:mysql://localhost/S,MaxTotal=4"/>
315315

316316
<property name="openjpa.jdbc.DBDictionary" value="mysql"/>
317317
<property name="openjpa.Multithreaded" value="false"/>

openjpa-tools/openjpa-maven-plugin/src/main/java/org/apache/openjpa/tools/maven/AbstractOpenJpaMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public abstract class AbstractOpenJpaMojo extends AbstractMojo
120120
* Sample:
121121
* <pre>
122122
* &lt;connectionProperties&gt;
123-
* driverClass=com.mysql.jdbc.Driver,
123+
* driverClass=com.mysql.cj.jdbc.Driver,
124124
* jdbcUrl=jdbc:mysql://localhost/mydatabase,
125125
* user=root,
126126
* password=,

openjpa-tools/openjpa-maven-plugin/src/site/apt/examples/credentials.apt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Specifying connection settings in the plugin section
3939
<sqlFile>${project.build.directory}/database.sql</sqlFile>
4040
<connectionDriverName>com.mchange.v2.c3p0.ComboPooledDataSource</connectionDriverName>
4141
<connectionProperties>
42-
driverClass=com.mysql.jdbc.Driver,
42+
driverClass=com.mysql.cj.jdbc.Driver,
4343
jdbcUrl=jdbc:mysql://localhost/TissExamples,
4444
user=root,
4545
password=,

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<!-- common JDBC driver versions -->
8080
<derby.version>10.14.2.0</derby.version>
8181
<hsqldb.version>2.5.1</hsqldb.version>
82-
<mysql.connector.version>5.1.49</mysql.connector.version>
82+
<mysql.connector.version>8.0.29</mysql.connector.version>
8383
<mariadb.connector.version>2.7.2</mariadb.connector.version>
8484
<postgresql.connector.version>42.5.1</postgresql.connector.version>
8585
<mssql.connector.version>11.2.1.jre8</mssql.connector.version>
@@ -607,7 +607,7 @@
607607
</dependency>
608608
</dependencies>
609609
<properties>
610-
<connection.driver.name>com.mysql.jdbc.Driver</connection.driver.name>
610+
<connection.driver.name>com.mysql.cj.jdbc.Driver</connection.driver.name>
611611
<!--<connection.url>jdbc:mysql://localhost/OPENJPA</connection.url>-->
612612
<connection.url>${openjpa.mysql.url}</connection.url>
613613
<connection.username>${openjpa.mysql.username}</connection.username>
@@ -636,7 +636,7 @@
636636
</dependency>
637637
</dependencies>
638638
<properties>
639-
<connection.driver.name>com.mysql.jdbc.Driver</connection.driver.name>
639+
<connection.driver.name>com.mysql.cj.jdbc.Driver</connection.driver.name>
640640

641641
<!-- default settings for local docker -->
642642
<docker.external.mysql.port>3306</docker.external.mysql.port>

0 commit comments

Comments
 (0)