How to set up a MySQL driver jar file for data collection using WebLogic server using RSA Via Lifecycle and Governance
Originally Published: 2016-07-01
Article Number
Applies To
RSA Product/Service Type: Hosted
RSA Version/Condition: 6.9.1 P02
Platform: WebLogic 10.3.6.0
Database Version: Oracle 11g (11.2.0.4.0)
MySQL Server: 6.5
Issue
Since upgrading their MySQL Server from 5.0 to 5.6, they faces an error when testing an Account Data Collector with MySQL. The error states that it could not get data because the MySQL syntax they use is not correct and the MySQL Driver jar file 5.1.17 is not supported in MySQL Server 5.6.
Therefore, the customer downloaded the latest MySQL Driver jar file 5.1.39 to MySQL Server 5.6. Then test connection of the Account Data Collector. They currently have syntax 'SET OPTION SQL_SELECT_LIMIT=5'.
The details of the error also found in AveksaServer.log as following:
05/11/2016 21:05:08.603 ERROR (ApplyChangesRegularThread-65) [SystemErr] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=5' at line 1
05/11/2016 21:05:08.603 ERROR (ApplyChangesRegularThread-65) [SystemErr] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
05/11/2016 21:05:08.603 ERROR (ApplyChangesRegularThread-65) [SystemErr] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
05/11/2016 21:05:08.603 ERROR (ApplyChangesRegularThread-65) [SystemErr] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
05/11/2016 21:05:08.604 ERROR (ApplyChangesRegularThread-65) [SystemErr] at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
05/11/2016 21:05:08.604 ERROR (ApplyChangesRegularThread-65) [SystemErr] at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
05/11/2016 21:05:08.604 ERROR (ApplyChangesRegularThread-65) [SystemErr] at com.mysql.jdbc.Util.getInstance(Util.java:336)
.
.
05/11/2016 21:05:08.608 ERROR (ApplyChangesRegularThread-65) [SystemErr] at java.lang.Thread.run(Thread.java:745)
05/11/2016 21:05:08.609 WARN (ApplyChangesRegularThread-65) [com.aveksa.collector.accountdata.DBGenericAccountReader] Could not clean up database objects: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1 FAILED method=cleanup
05/11/2016 21:05:08.609 ERROR (ApplyChangesRegularThread-65) [com.aveksa.collector.accountdata.DBGenericAccountReader] Error while extracting the account data: com.aveksa.common.DataReadException: ERROR: Could not get accounts data: FAILED method=collectAccounts
05/11/2016 21:05:08.611 ERROR (ApplyChangesRegularThread-65) [com.aveksa.client.datacollector.framework.DataCollectorManager] DCM281: Collection Failed: CollectionFailedEvent[cmi = CollectionMetaInfo[{ID=3, run_id=1462980907904, collector_id=1101, test-run=true, collector_name=NovopayBusinessBankking_ADC2, data_size=287, data_file=/domain/aveksa_UAT/servers/aveksa/tmp/_WL_user/aveksa/2jhnnj/aveksa.war/WEB-INF/LocalAgent/collected_data/3.data}] message = null cause = com.aveksa.sdk.collector.CollectionException: com.aveksa.common.DataReadException: ERROR: Could not get accounts data: ]
com.aveksa.sdk.collector.CollectionException: com.aveksa.common.DataReadException: ERROR: Could not get accounts data:
at com.aveksa.collector.accountdata.DBGenericAccountReader.collectAccounts(DBGenericAccountReader.java:213)
at com.aveksa.collector.accountdata.DBGenericAccountReader.collectTestData(DBGenericAccountReader.java:141)
at com.aveksa.client.datacollector.collectors.accountdatacollectors.AccountDataCollector.collectData(AccountDataCollector.java:358)
.
.
at com.aveksa.client.component.communication.ChangeListHandler.access$300(ChangeListHandler.java:58)
at com.aveksa.client.component.communication.ChangeListHandler$ChangeApplyingRunnable.run(ChangeListHandler.java:275)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.aveksa.common.DataReadException: ERROR: Could not get accounts data:
at com.aveksa.collector.accountdata.DBGenericAccountReader.extractAccounts(DBGenericAccountReader.java:349)
at com.aveksa.collector.accountdata.DBGenericAccountReader.collectAccounts(DBGenericAccountReader.java:201)
... 14 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=5' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
at com.mysql.jdbc.Util.getInstance(Util.java:336)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1031)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
.
.
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1205)
at com.aveksa.collector.accountdata.DBGenericAccountReader.extractAccounts(DBGenericAccountReader.java:286)
... 15 more
05/11/2016 21:05:08.665 ERROR ([ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)') [com.aveksa.server.utils.NodeMessageBroker] Exception while getting test data from collector
com.aveksa.server.runtime.ServerException: com.aveksa.sdk.collector.CollectionException: com.aveksa.common.DataReadException: ERROR: Could not get accounts data: . Caused by com.aveksa.common.DataReadException: ERROR: Could not get accounts data: . Caused by com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=5' at line 1 Caused By
.
.
This is caused by the MySQL Driver jar file not being setting up correctly on WebLogic server.
Resolution
Refer to release notes for 'MySQL Connector/J 5.1.20' in the following link that 'MySQLSyntaxErrorException' bug due to SET OPTION syntax change was fixed in this release.
https://dev.mysql.com/doc/relnotes/connector-j/5.1/en/news-5-1-20.html
This is the reason why MySQL Database ADC is working with MySQL connector jar 5.1.20 and above. Suggest to download the latest version of MySQL Driver jar file, e.g. 5.1.39, for MySQL Server 5.6.
There are the steps to set up the MySQL Driver jar file on WebLogic server:
- Replace the mysql-connector jars that have been installed while installing WebLogic server.
- Download the latest MySQL Driver jar file, e.g. mysql-connector-java-5.1.39.tar.gz, from here - http://dev.mysql.com/downloads/connector/j/ , to WebLogic Server.
- Unzip the MySQL Driver jar file.
- Change directory to $WL_HOME/server/lib (e.g. /middleware/wlserver_10.3/server/lib ): cd $WL_HOME/server/lib or cd /middleware/wlserver_10.3/server/lib
- Copy the mysql-connector-java-5.1.39-bin.jar file to here.
- Remove the existing 'mysql-connector-java-commercial-5.x.x-bin' jar(s)
- Change directory to /middleware/wlserver_10.3/common/bin: cd /middleware/wlserver_10.3/common/bin
- The 'commEnv.sh' file would be found in here.
- make a backup of the 'commEnv.sh' file.
- edit the 'commEnv.sh' file by using vi editor: vi commEnv.sh
- Search for 'WEBLOGIC_CLASSPATH' and add the following to it
${WL_HOME} /server/lib/mysql-connector-java-5.1.39-bin.jar with ${CLASSPATHSEP} as separator: e.g
/middleware/wlserver_10.3/server/lib/mysql-connector-java-5.1.39-bin.jar ${CLASSPATHSEP}
- Save the changes.
- Restart the WebLogic Server.
- Add the latest mysql-connector jar file to aveksaDomain's lib directory. (e.g. /domain/aveksa_UAT/lib )
- Rename the mysql-connector-java_.jar file to mysql-connector-java_.jar.old
- Copy the mysql-connector-java-5.1.39-bin.jar file to here
- Restart App Server
Now the MySQl Driver jar file 5.1.39 is available to use. To configure the Account Data Collector and run the Test Connection. It should work fine.
Related Articles
RSA Identity Management and Governance 6.9.1 installation fails while installing JDK with error "tar: /tmp/aveksa/packages… 79Number of Views Queries to detect workflows and change requests that could overload the Workpoint Server in RSA Identity Governance & Life… 272Number of Views Changes to JSP files require an application restart to take effect in RSA Identity Governance & Lifecycle 65Number of Views WebLogic database migration UI output displays a java.lang.NullPointerException in RSA Identity Governance and Lifecycle 137Number of Views RSA Identity Governance and Lifecycle7.0.2 installation with remote database fails with "Invalid Username/Password" in the… 201Number of Views
Trending Articles
Troubleshooting RSA SecurID Access Identity Router to RSA Authentication Manager test connection failures RSA SecurID Software Token 5.0.2 Downloads for Microsoft Windows RSA Authentication Manager 8.9 Release Notes (January 2026) Quick Setup Guide - Passwordless Authentication in Windows MFA Agent for Active Directory RSA Authentication Manager 8.8 Setup and Configuration Guide
Don't see what you're looking for?