Topic
  • 4 replies
  • Latest Post - ‏2013-07-29T18:07:51Z by saviobarr
saviobarr
saviobarr
7 Posts

Pinned topic Error trying to connect Mysql Database

‏2013-07-27T13:32:48Z |
Hi,
I created a JDBC connection, but when I hit [TEST CONNECTION] button, I get the error below. Can you guys help me out?

Many thanks

Savio Barros

[7/27/13 10:17:10:691 BRT] 00000020 SystemErr     R java.sql.SQLException: java.lang.IllegalAccessError: Class com/mysql/jdbc/NonRegisteringDriver illegally accessing "protected" member of class com/mysql/jdbc/ConnectionImpl
[7/27/13 10:17:10:691 BRT] 00000020 SystemErr     R     at com.ibm.ws.management.DataSourceConfigHelperMBean.testConnection(DataSourceConfigHelperMBean.java:499)
[7/27/13 10:17:10:691 BRT] 00000020 SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[7/27/13 10:17:10:691 BRT] 00000020 SystemErr     R     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
[7/27/13 10:17:10:691 BRT] 00000020 SystemErr     R     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[7/27/13 10:17:10:691 BRT] 00000020 SystemErr     R     at java.lang.reflect.Method.invoke(Method.java:611)

...

  • bpaskin
    bpaskin
    5179 Posts
    ACCEPTED ANSWER

    Re: Error trying to connect Mysql Database

    ‏2013-07-28T18:39:07Z  

    Hi, when you are using MySQL you need to set the appropriate parameters in the custom properties of the Datasource.  Make sure that your URL property has the appropriate connection string and any other MySQL properties are set.

    Regards,

    Brian

  • Nihilson
    Nihilson
    1 Post
    ACCEPTED ANSWER

    Re: Error trying to connect Mysql Database

    ‏2013-07-29T02:25:11Z  

    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed. What is the version of WebSphere Application Server and the JDBC Driver? Are they both compatible?

  • bpaskin
    bpaskin
    5179 Posts

    Re: Error trying to connect Mysql Database

    ‏2013-07-28T18:39:07Z  

    Hi, when you are using MySQL you need to set the appropriate parameters in the custom properties of the Datasource.  Make sure that your URL property has the appropriate connection string and any other MySQL properties are set.

    Regards,

    Brian

  • Nihilson
    Nihilson
    1 Post

    Re: Error trying to connect Mysql Database

    ‏2013-07-29T02:25:11Z  

    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed. What is the version of WebSphere Application Server and the JDBC Driver? Are they both compatible?

  • saviobarr
    saviobarr
    7 Posts

    Re: Error trying to connect Mysql Database

    ‏2013-07-29T18:05:58Z  
    • bpaskin
    • ‏2013-07-28T18:39:07Z

    Hi, when you are using MySQL you need to set the appropriate parameters in the custom properties of the Datasource.  Make sure that your URL property has the appropriate connection string and any other MySQL properties are set.

    Regards,

    Brian

    Hi Brian, 

    You are right. The "url" property was missing. I set it and everything came to life (=. 

    Thanks for replying.

     

    Savio Barros

  • saviobarr
    saviobarr
    7 Posts

    Re: Error trying to connect Mysql Database

    ‏2013-07-29T18:07:51Z  
    • Nihilson
    • ‏2013-07-29T02:25:11Z

    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed. What is the version of WebSphere Application Server and the JDBC Driver? Are they both compatible?

    Yes, there were few missing properties or filled with wrong values.

    Many thanks for replying

    Savio Barros