6 Replies Latest reply on Apr 14, 2013 3:59 PM by mazz

    No suitable driver found

    udayatom

      java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/mysql   my agent running under windows version 5.1. what is the adaptable mysql connector version support for windows 5.1. I tried lot. Give me the solution.

        • 1. Re: No suitable driver found
          pilhuhn

          The mysql plugin should have that included

           

          bash-3.2$ jar tvf rhq-mysql-plugin-4.6.0.jar

               0 Tue Apr 09 12:38:38 CEST 2013 META-INF/

             573 Tue Apr 09 12:38:36 CEST 2013 META-INF/MANIFEST.MF

               0 Tue Apr 09 12:38:34 CEST 2013 lib/

          703265 Tue Apr 09 12:38:34 CEST 2013 lib/mysql-connector-java-5.1.6.jar

          ...

           

          If you write your own plugin, make sure you include the driver in the plugins lib/ directory

          • 2. Re: No suitable driver found
            udayatom

            but its like this. i mean there is in also lib, it  consist of  mysql connector. If i run that plugin in windows version 6.1 it accepts and works, same time i run windows 5.1 the shows like this

            2013-04-11 20:25:38,218 WARN  [ResourceContainer.invoker.daemon-41] (org.rhq.plugins.smysql.SolartisComponent)- Unable to obtain database connection

            java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/mysql

                at java.sql.DriverManager.getConnection(DriverManager.java:602)

                at java.sql.DriverManager.getConnection(DriverManager.java:185)

                at org.rhq.plugins.smysql.SolartisConnectionManager.getConnection(SolartisConnectionManager.java:78)

                at org.rhq.plugins.smysql.SolartisComponent.getConnection(SolartisComponent.java:146)

                at org.rhq.plugins.smysql.SolartisComponent.getAvailability(SolartisComponent.java:64)

                at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634)

                at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

                at java.lang.Thread.run(Thread.java:662)

            • 3. Re: No suitable driver found
              udayatom

                 I hope you to reply for this post. Nobody not answred for this post. I waiting for your reply.. I am beginer to RHQ please help me.

               

              https://community.jboss.org/message/807922#807922

              • 4. Re: No suitable driver found
                mazz

                As I read the stack trace:

                 

                java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/mysql

                    at java.sql.DriverManager.getConnection(DriverManager.java:602)

                    at java.sql.DriverManager.getConnection(DriverManager.java:185)

                    at org.rhq.plugins.smysql.SolartisConnectionManager.getConnection(SolartisConnectionManager.java:78)

                 

                I see you wrote your own custom plugin and this exception is coming from your plugin class (org.rhq.plugins.smysql.SolartisConnectionManager). So, first, make sure your code is correct and your custom plugin has a lib/ directory with your MySQL jars that are required to make a JDBC connection.

                 

                Now, the fact that this works in Windows 6.1 (which is "Windows 7") tells me the RHQ code is OK and your code is OK. But the fact that it doesn't work in Windows 5.1 (Windows XP) tells me there is something outside of RHQ (probably within the Windows environment) that is causing this problem.

                 

                I don't have any suggestions for you because if it works on Windows 7 it sounds like RHQ is OK. RHQ doesn't do anything special in the plugin container code just because its on XP and not Win7. There must be something in the Windows environment that is different and causing the problem.

                1 of 1 people found this helpful
                • 5. Re: No suitable driver found
                  udayatom

                  please reply to this post john. If this question is silly means appologies me.

                  https://community.jboss.org/message/808146#808146

                  • 6. Re: No suitable driver found
                    mazz

                    > please reply to this post john. If this question is silly means appologies me.

                    > https://community.jboss.org/message/808146#808146

                     

                    That is a totally separate issue and not related to this thread. FWIW, I don't know the answer to that one - which is why I haven't answered it already.