Driver de mysql
Realice un applet que utiliza una clase creada por mi q se conecta a una base de datos mysql, descargue el driver mysql-connector-java-5.1.6-bin, estoy utilizando mysql 5.0.67 y tomcat 5.5. Al correr la aplicacion desde eclipse (el .java del applet) me sale todo perfecto, pero al querer invocar el applet desde un html me sale el sigte. Error:
Error en la conexion: java. Lang. ClassNotFoundException: com.mysql.jdbc.Driver
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/nueva_bd
At java.sql.DriverManager.getConnection(Unknown Source)
At java.sql.DriverManager.getConnection(Unknown Source)
At bd. Prueba.(Prueba.java:29)
At ConsultA.(ConsultA.java:12)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0(Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance(Unknown Source)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance(Unknown Source)
At java. Lang. Reflect. Constructor. NewInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
At sun. Applet. AppletPanel. CreateApplet(Unknown Source)
At sun. Plugin. AppletViewer. CreateApplet(Unknown Source)
At sun. Applet. AppletPanel. RunLoader(Unknown Source)
At sun. Applet. AppletPanel. Run(Unknown Source)
At java. Lang. Thread. Run(Unknown Source)
Error en la conexion: java. Lang. ClassNotFoundException: com.mysql.jdbc.Driver
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/nueva_bd
At java.sql.DriverManager.getConnection(Unknown Source)
At java.sql.DriverManager.getConnection(Unknown Source)
At bd. Prueba.(Prueba.java:29)
At graficos. Graficos.(Graficos.java:81)
At ConsultA.(ConsultA.java:13)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0(Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance(Unknown Source)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance(Unknown Source)
At java. Lang. Reflect. Constructor. NewInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
At sun. Applet. AppletPanel. CreateApplet(Unknown Source)
At sun. Plugin. AppletViewer. CreateApplet(Unknown Source)
At sun. Applet. AppletPanel. RunLoader(Unknown Source)
At sun. Applet. AppletPanel. Run(Unknown Source)
At java. Lang. Thread. Run(Unknown Source)
El Connector/J lo tengo ya en todas partes para ver si me resultaba pero nada, esta en:
C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\common\lib
C:\Archivos de programa\Java\jdk1.6.0_07\jre\lib
C:\Documents and Settings\Administrador\Mis documentos\archivoseclipse\NewApplet\WebContent (en este directorio tengo los .class y los .html)
¿Qué podra ser? Ayudaaa por fisss
Error en la conexion: java. Lang. ClassNotFoundException: com.mysql.jdbc.Driver
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/nueva_bd
At java.sql.DriverManager.getConnection(Unknown Source)
At java.sql.DriverManager.getConnection(Unknown Source)
At bd. Prueba.(Prueba.java:29)
At ConsultA.(ConsultA.java:12)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0(Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance(Unknown Source)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance(Unknown Source)
At java. Lang. Reflect. Constructor. NewInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
At sun. Applet. AppletPanel. CreateApplet(Unknown Source)
At sun. Plugin. AppletViewer. CreateApplet(Unknown Source)
At sun. Applet. AppletPanel. RunLoader(Unknown Source)
At sun. Applet. AppletPanel. Run(Unknown Source)
At java. Lang. Thread. Run(Unknown Source)
Error en la conexion: java. Lang. ClassNotFoundException: com.mysql.jdbc.Driver
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/nueva_bd
At java.sql.DriverManager.getConnection(Unknown Source)
At java.sql.DriverManager.getConnection(Unknown Source)
At bd. Prueba.(Prueba.java:29)
At graficos. Graficos.(Graficos.java:81)
At ConsultA.(ConsultA.java:13)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0(Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance(Unknown Source)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance(Unknown Source)
At java. Lang. Reflect. Constructor. NewInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
At sun. Applet. AppletPanel. CreateApplet(Unknown Source)
At sun. Plugin. AppletViewer. CreateApplet(Unknown Source)
At sun. Applet. AppletPanel. RunLoader(Unknown Source)
At sun. Applet. AppletPanel. Run(Unknown Source)
At java. Lang. Thread. Run(Unknown Source)
El Connector/J lo tengo ya en todas partes para ver si me resultaba pero nada, esta en:
C:\Archivos de programa\Apache Software Foundation\Tomcat 5.5\common\lib
C:\Archivos de programa\Java\jdk1.6.0_07\jre\lib
C:\Documents and Settings\Administrador\Mis documentos\archivoseclipse\NewApplet\WebContent (en este directorio tengo los .class y los .html)
¿Qué podra ser? Ayudaaa por fisss
1 respuesta
Respuesta de krlosnow
1