
error al conectar java web con sql 2005
Publicado por yader (5 intervenciones) el 16/08/2013 18:55:57
hola foro tengo unos errores en mi aplicacion web al ejecutarla, ok voy hacer un poco mas detallado para ver si me pueden ayudar por q no se q estara pasando. los errores son los siguientes:
http://localhost:8080/Facturacionweb/index.jsp (con glassfish server 4.0)
1-
WARNING: The web application [unknown] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2-
WARNING: The web application [/Facturacionweb] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
3-
SEVERE: The web application [/Facturacionweb] created a ThreadLocal with key of type [com.microsoft.sqlserver.jdbc.ActivityCorrelator$1] (value [com.microsoft.sqlserver.jdbc.ActivityCorrelator$1@8ade09]) and a value of type [com.microsoft.sqlserver.jdbc.ActivityId] (value [445dfb65-b9fd-4453-b0f7-beef9da354d8-1]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
esto me aparece al correr la aplicacion, ya agregue el .jar de esql,. voy a plasmar mi conexion tal ves podria ser ahi el caso..
les agradeceria en q me ayuden a conectarme bien a mi aplicacion, ya q no he podido avanzar en nada mas..
saludos.
http://localhost:8080/Facturacionweb/index.jsp (con glassfish server 4.0)
1-
WARNING: The web application [unknown] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2-
WARNING: The web application [/Facturacionweb] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
3-
SEVERE: The web application [/Facturacionweb] created a ThreadLocal with key of type [com.microsoft.sqlserver.jdbc.ActivityCorrelator$1] (value [com.microsoft.sqlserver.jdbc.ActivityCorrelator$1@8ade09]) and a value of type [com.microsoft.sqlserver.jdbc.ActivityId] (value [445dfb65-b9fd-4453-b0f7-beef9da354d8-1]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
esto me aparece al correr la aplicacion, ya agregue el .jar de esql,. voy a plasmar mi conexion tal ves podria ser ahi el caso..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package Clases;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Datos {
private Connection conn;
String user="yader";
String pass="yalefon(2013";
String url="jdbc:sqlserver://localhost:1433;databaseName=FACTURACIONALMACEN";
String driver="com.microsoft.sqlserver.jdbc.SQLServerDriver";
public Datos() throws ClassNotFoundException
{
try {
Class.forName(driver);
conn=DriverManager.getConnection(url,user,pass);
System.out.print("Conexion Correcta \n");
} catch (SQLException ex) {
Logger.getLogger(Datos.class.getName()).log(Level.SEVERE, null, ex);
}
}
public void cerrar()
{
try {
conn.close();
} catch (SQLException ex) {
Logger.getLogger(Datos.class.getName()).log(Level.SEVERE, null, ex);
}
}
public boolean validarusuario(String Usuario, String Clave )
{
try {
String sql="select (1) from Usuarios where usuario='"+Usuario+"' and contraseña='"+Clave+"'";
Statement s= conn.createStatement();
ResultSet r=s.executeQuery(sql);
if(r.next())
{
return true;
}
else
{
return false;
}
} catch (SQLException ex) {
Logger.getLogger(Datos.class.getName()).log(Level.SEVERE, null, ex);
return false;
}
}
}
les agradeceria en q me ayuden a conectarme bien a mi aplicacion, ya q no he podido avanzar en nada mas..
saludos.
Valora esta pregunta


0