cancel
Showing results for 
Search instead for 
Did you mean: 

Web Services whit connection to a MySql database

Former Member
0 Kudos

Hi all,

I'm trying to connect a web services in java NetWeaver whit a mysql database in my local computer...

I'm try this whit the code follow

Class.forName("org.gjt.mm.mysql.Driver");

Connection conexion =DriverManager.getConnection"jdbc:mysql://localhost/pedidos", "root", "123456");

if (!conexion.isClosed())

{ code...

}

conexion.close();

I have the libraries for the "forName" includes in my proyect... this sentences work fine in a JSP page whit tomcat but i can do it whit NetWeaver...

I hope that you can help me

Thanks...

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

this is the message that send me the program in the Exception...

com.mysql.jdbc.CommunicationsException: Communications link failureLast packet sent to the server was 0 ms ago