DX NetOps

Expand all | Collapse all

Error Message trying to use MYSQL test to a MySQL database

Jump to Best Answer
  • 1.  Error Message trying to use MYSQL test to a MySQL database

    Posted 03-11-2019 07:52 PM

    Hi guys,

     

    Im trying to made a SQL Query test to a MySQL database, using a sysedge agent with SA pluging installed, this agent was installed on other server, the agent was discovered on Spectrum (write SNMP communty string) and I download the Mysql ODBC to the directory jre/lib/ext of the sysedge agent. I put the next information on each option of the SQL test created on Spectrum.

     

    Query string: select count(*) from vendor;

    SQL Driver: com.mysql.jcbc.Driver

    Connect String: jdbc:mysql://10.0.10.70:3306/reporting?user=joseph&password=Temporal2019

    destination port: 3306

     

    But when I try to run the test a TimeOut error its showed. And reviewing the jcollector log of sysedge agent show me the next error:

     

    [LOG_CRITICAL][2019-03-08 12:52:34][Thread:Thread-170][Pass #5]: [#11178] ERRSRC:sqlQuery ERRCODE:2 INDEX:11178 NAME: TESTDESC:Query-Spectrum-Mysql ERROR: JDBC Driver not found: java.lang.ClassNotFoundException: com.mysql.jcbc.Driver

     

    These are the file on jre/lib/ext directory on the sysedge agent:

     

    Directory of C:\Program Files\CA\SystemEDGE\jre\lib\ext

    03/08/2019 12:48 PM <DIR> .
    03/08/2019 12:48 PM <DIR> ..
    10/16/2014 09:19 AM 226,054 access-bridge-64.jar
    10/16/2014 09:19 AM 8,934 dnsns.jar
    10/16/2014 09:19 AM 43,595 jaccess.jar
    10/16/2014 09:19 AM 1,014,969 localedata.jar
    10/16/2014 09:19 AM 703 meta-index
    08/28/2003 08:42 AM 303,185 msbase.jar
    08/28/2003 08:42 AM 71,033 mssqlserver.jar
    08/28/2003 08:42 AM 366,737 msutil.jar
    03/06/2019 06:17 PM 10,507,852 mysql-connector-odbc-noinstall-3.51.27-win32.zip
    02/05/2019 07:07 PM 6,686,365 mysql.zip
    10/21/2013 09:32 PM 2,091,135 ojdbc5.jar
    02/17/2012 10:45 AM 584,207 sqljdbc4.jar
    10/16/2014 09:19 AM 15,930 sunec.jar
    10/16/2014 09:19 AM 198,406 sunjce_provider.jar
    10/16/2014 09:19 AM 31,111 sunmscapi.jar
    04/18/2013 03:38 PM 232,338 sunpkcs11.jar
    10/16/2014 09:19 AM 68,761 zipfs.jar
    17 File(s) 22,451,315 bytes
    2 Dir(s) 32,594,288,640 bytes free

     

    As you can see mysql and mysql-connector-odbc-noinstall-3.51.27-win32.zip are present. But the test its falling.

     

    I hope some one can help me to fix this error and can sysedge agent excute the SQl Query test to a MySQL database.

    The database, user and password are OK and the user have privilegies to connect from external sources. The databse and the query are OK.

     

    Regards

     

    Jose



  • 2.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 07:57 AM

    You will likely have to unzip the driver I would guess here.



  • 3.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 01:16 PM

    Hi Matt,

     

    I uncompress the zip file and put jar file.

     

    C:\Program Files\CA\SystemEDGE\jre\lib\ext>dir

     Volume in drive C has no label.

     Volume Serial Number is 46D2-6F15

     

     Directory of C:\Program Files\CA\SystemEDGE\jre\lib\ext

     

    03/12/2019  10:56 AM    <DIR>          .

    03/12/2019  10:56 AM    <DIR>          ..

    10/16/2014  09:19 AM           226,054 access-bridge-64.jar

    10/16/2014  09:19 AM             8,934 dnsns.jar

    10/16/2014  09:19 AM            43,595 jaccess.jar

    10/16/2014  09:19 AM         1,014,969 localedata.jar

    10/16/2014  09:19 AM               703 meta-index

    08/28/2003  08:42 AM           303,185 msbase.jar

    08/28/2003  08:42 AM            71,033 mssqlserver.jar

    08/28/2003  08:42 AM           366,737 msutil.jar

    01/28/2019  05:21 AM         2,134,905 mysql-connector-java-8.0.15.jar

    10/21/2013  09:32 PM         2,091,135 ojdbc5.jar

    02/17/2012  10:45 AM           584,207 sqljdbc4.jar

    10/16/2014  09:19 AM            15,930 sunec.jar

    10/16/2014  09:19 AM           198,406 sunjce_provider.jar

    10/16/2014  09:19 AM            31,111 sunmscapi.jar

    04/18/2013  03:38 PM           232,338 sunpkcs11.jar

    10/16/2014  09:19 AM            68,761 zipfs.jar

                  16 File(s)      7,392,003 bytes

                   2 Dir(s)  32,577,052,672 bytes free

     

    C:\Program Files\CA\SystemEDGE\jre\lib\ext>

     

    I have to stop and start the agent.

     

    And run the test again.

     

     

    And fails again.

     

     

    Reviewing the jcollector log

     

    [LOG_CRITICAL][2019-03-12 11:04:29][Thread:Thread-500][Pass #17]: [#11178] ERRSRC:sqlQuery ERRCODE:2 INDEX:11178 NAME: TESTDESC:Query-Spectrum-Mysql ERROR: JDBC Driver not found: java.lang.ClassNotFoundException: com.mysql.jcbc.Driver

    [LOG_CRITICAL][2019-03-12 11:04:29][Thread:Thread-500][Pass #17]: [#11178] ERRSRC:sqlQuery ERRCODE:2 INDEX:11178 NAME: TESTDESC:Query-Spectrum-Mysql ERROR: JDBC Driver not found: java.lang.ClassNotFoundException: com.mysql.jcbc.Driver

    [LOG_CRITICAL][2019-03-12 11:04:29][Thread:Thread-500][Pass #17]: [#11178] ERRSRC:sqlQuery ERRCODE:2 INDEX:11178 NAME: TESTDESC:Query-Spectrum-Mysql ERROR: JDBC Driver not found: java.lang.ClassNotFoundException: com.mysql.jcbc.Driver

    [LOG_CRITICAL][2019-03-12 11:04:29][Thread:Thread-500][Pass #17]: [#11178] ERRSRC:sqlQuery ERRCODE:2 INDEX:11178 NAME: TESTDESC:Query-Spectrum-Mysql ERROR: JDBC Driver not found: java.lang.ClassNotFoundException: com.mysql.jcbc.Driver

    [LOG_CRITICAL][2019-03-12 11:04:29][Thread:Thread-500][Pass #17]: [#11178] ERRSRC:sqlQuery ERRCODE:2 INDEX:11178 NAME: TESTDESC:Query-Spectrum-Mysql ERROR: JDBC Driver not found: java.lang.ClassNotFoundException: com.mysql.jcbc.Driver

     

    I have the same error message.

     

    Regards

     

    Jose



  • 4.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 02:06 PM

    Hey Jose,

     

    You will have to ask SystemEDGE engineers about this.

    That driver needs to be loaded some how.

     

    I would open a ticket with eHealth/CAPC Support team.

    Or you can try asking on the CA Performance Management board, see if anyone there has any ideas.

     

    Thanks,
    Matt



  • 5.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 02:12 PM
      |   view attached

    Hi Matt,

     

    I cannot open the case to eHealth/CAPC Support team because I don’t have access to eHealth support. I just have access to Spectrum.

     

    I don’t know If you can open the case to eHealth/CAPC support team and see if they can give us the infor about how to load the mysql ODBC?

     

    Thanks for the help.

     

     

     

    De: Matthew_Gay

    Enviado el: martes, 12 de marzo de 2019 12:07 p. m.

    Para: José Gutiérrez Basurto <jose.gutierrez@cepra.com.mx>

    Asunto: Re:  - Re: Error Message trying to use MYSQL test to a MySQL database

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

     

     

    Re: Error Message trying to use MYSQL test to a MySQL database

     

    reply from Matthew Gay<https://communities.ca.com/people/Matthew_Gay?et=watches.email.thread> in CA Spectrum - View the full discussion<https://communities.ca.com/message/242168781-re-error-message-trying-to-use-mysql-test-to-a-mysql-database?commentID=242168781&et=watches.email.thread#comment-242168781>



  • 6.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 03:09 PM

    Hi Jose,

     

    From where did you get the MySQL JDBC driver for Windows platform?

    I could not find it at: MySQL :: Download Connector/J 

     

    Thanks,

    Silvio



  • 7.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 03:16 PM
      |   view attached

    Hi Silvio,

     

    I got form CA support some months ago. When I have problems to run SQL query on SQL Server.

     

    If you try to use the page you show me you cannot get the jar file. I mean I can just can get it.

     

    Regards

     

    Jose

    Attachment(s)

    zip
    mysql.zip   6.38MB 1 version


  • 8.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 04:33 PM

    I figured out from where the file was gotten.

     

    What if you try an older version (such as 5.x) of MySQL jdbc driver?

    MySQL :: Download MySQL Connector/J (Archived Versions) 

     

    Steps to install the JDBC driver file.

     

    https://support.ca.com/cadocs/0/CA%20Server%20Automation%2012%208%20SP01-ENU/Bookshelf_Files/PDF/VA_SRMUser_ENU.pdf 

     

    Copy the JAR files to the jre/lib/ext directory under the SystemEDGE installation directory (for exampl, /opt/SystemEDGE/jre/lib/ext [UNIX] or drive:\sysedge\jre\lib\ext [Windows]). To obtain JDBC driver jar files for your database, check the Corporate Web site of the company that distributes the database.

     

    Example to verify the availability of the SQL JDBC driver

     

    1. Change to the Install_Path/SystemEDGE/jre/lib/ext directory.

    2. Check, if sqljdbc.jar (JRE Version 1.5 or earlier) or sqljdbc4.jar (JRE Version 1.6 or later) is available.

     

    If the SQL JDBC is not available, perform the following steps:

    1. Download the SQL JDBC driver from microsoft.com/downloads.

    2. Extract the downloaded driver package and copy sqljdbc.jar (JRE Version 1.5 or earlier) or sqljdbc4.jar (JRE Version 1.6 or later) to the Install_Path/SystemEDGE/jre/lib/ext directory.

    3. Restart SystemEDGE to load the new Java classes.

    4. Set up new SQL tests, for example, through Policy Configuration in CA Virtual Assurance. See also the help system from the extracted JDBC package if necessary.

     

    Thanks,

    Silvio



  • 9.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-12-2019 06:22 PM

    Hi Silvio,

     

    The answer to your questions:

     

     

    I figured out from where you got the file. https://communities.ca.com/servlet/JiveServlet/downloadImage/2-242168794-193511/Platform_Independent_jdbc.png <https://communities.ca.com/servlet/JiveServlet/showImage/2-242168794-193511/Platform_Independent_jdbc.png>

    No, the mysql.zip (with the mysql.jar file) was send to me, for CA support people.

     

     

    What if you try an older version (such as 5.x) of MySQL jdbc driver? MySQL :: Download MySQL Connector/J (Archived Versions)<https://downloads.mysql.com/archives/c-j/>

    I will try this and tell you about the results. The name of the file.jar its important or not? I mean the file have to be named in a special way or any name its valid?

     

    Example to verify the availability of the SQL JDBC driver

     

    1. Change to the Install_Path/SystemEDGE/jre/lib/ext directory.

     

    2. Check, if sqljdbc.jar (JRE Version 1.5 or earlier) or sqljdbc4.jar (JRE Version 1.6 or later) is available.

    I have sqljdbc4.jar in /jre/lib/ext directory.

     

     

     

     

    De: okasi01

    Enviado el: martes, 12 de marzo de 2019 02:33 p. m.

    Para: José Gutiérrez Basurto <jose.gutierrez@cepra.com.mx>

    Asunto: Re:  - Re: Error Message trying to use MYSQL test to a MySQL database

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

     

     

    Re: Error Message trying to use MYSQL test to a MySQL database

     

    reply from Silvio Okamoto<https://communities.ca.com/people/okasi01?et=watches.email.thread> in CA Spectrum - View the full discussion<https://communities.ca.com/message/242168794-re-error-message-trying-to-use-mysql-test-to-a-mysql-database?commentID=242168794&et=watches.email.thread#comment-242168794>



  • 10.  Re: Error Message trying to use MYSQL test to a MySQL database

    Posted 03-13-2019 07:28 AM

    Hi Jose,

     

    The mysql.zip and mysql-connector-java-8.0.15.zip have the same content. They are from the same source.

     

    Based on the SystemEDGE guide, it should load any jar driver file, regardless of its filename.

     

    Thanks,

    Silvio



  • 11.  Re: Error Message trying to use MYSQL test to a MySQL database
    Best Answer

    Posted 03-13-2019 08:08 PM

    Hi Silvio,

     

    I can made that Query to a MySQL database finally works.

     

     

     

    I have to use an old ODBC version in order to works right.

     

     

     

    Regards

     

    Jose

     

    De: okasi01

    Enviado el: miércoles, 13 de marzo de 2019 05:29 a. m.

    Para: José Gutiérrez Basurto <jose.gutierrez@cepra.com.mx>

    Asunto: Re:  - Re: Error Message trying to use MYSQL test to a MySQL database

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

     

     

    Re: Error Message trying to use MYSQL test to a MySQL database

     

    reply from Silvio Okamoto<https://communities.ca.com/people/okasi01?et=watches.email.thread> in CA Spectrum - View the full discussion<https://communities.ca.com/message/242168945-re-error-message-trying-to-use-mysql-test-to-a-mysql-database?commentID=242168945&et=watches.email.thread#comment-242168945>