Foros del Web » Programación para mayores de 30 ;) » Java »

Problema de conexion a Base de Datos

Estas en el tema de Problema de conexion a Base de Datos en el foro de Java en Foros del Web. Buenas noches, Estoy realizando una aplicación en eclipse que interactua con una base de datos de ORACLE 11g. La conexión se realiza en el context.xml ...
  #1 (permalink)  
Antiguo 08/01/2013, 17:24
 
Fecha de Ingreso: diciembre-2006
Mensajes: 16
Antigüedad: 17 años, 11 meses
Puntos: 0
Problema de conexion a Base de Datos

Buenas noches,

Estoy realizando una aplicación en eclipse que interactua con una base de datos de ORACLE 11g.

La conexión se realiza en el context.xml mediante la siguiente estructura:

Código XML:
Ver original
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Context>
  3. <Resource auth="Container"
  4.          type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"
  5.          url="jdbc:oracle:thin:@//localhost:1521/orcl"
  6.          username="jdmiguel" password="jdmiguel" maxActive="200" maxIdle="100"
  7.          maxWait="-1"/>
  8. </Context>

Al arrancar la aplicación en modo localhost con Tomcat, funciona correctamente; sin embargo, en el momento en que realizo alguna operación de consulta a la base de datos, me salta un error en el eclipse del tipo:



ene 08, 2013 11:58:27 PM org.apache.struts.action.RequestProcessor processException
Advertencia: Unhandled Exception thrown: class java.lang.Exception
ene 08, 2013 11:58:27 PM org.apache.catalina.core.StandardWrapperValve invoke
Grave: El Servlet.service() para el servlet [action] en el contexto con ruta [/jdmiguel] lanzó la excepción [java.lang.Exception: Se ha producido un error al obtener la conexi?n a la base de datos] con causa raíz
java.lang.Exception: Se ha producido un error al obtener la conexi?n a la base de datos
at es.crc.actions.FutbolAction.consultarEquipos(Futbo lAction.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.struts.actions.DispatchAction.dispatchM ethod(DispatchAction.java:280)
at org.apache.struts.actions.DispatchAction.execute(D ispatchAction.java:216)
at es.crcit.general.struts.BaseDispatchAction.execute (BaseDispatchAction.java:58)
at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:728)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.p rocess(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnect ionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProce ssor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)


No se cual puede ser la causa de la no conexión, si estoy insertando mal los datos o se me esta pasando algo...

Muchas gracias de antemano,

Juan Diego
  #2 (permalink)  
Antiguo 09/01/2013, 03:38
Avatar de chuidiang
Colaborador
 
Fecha de Ingreso: octubre-2004
Mensajes: 3.774
Antigüedad: 20 años, 1 mes
Puntos: 454
Respuesta: Problema de conexion a Base de Datos

Hola:

Este texto "java.lang.Exception: Se ha producido un error al obtener la conexi?n a la base de datos" ¿es algo que has puesto tú al capturar una excepción?. Si es así, prueba a sacar la excpeción original, posiblemente de más información.

Se bueno.
__________________
Apuntes Java
Wiki de Programación
  #3 (permalink)  
Antiguo 09/01/2013, 14:01
 
Fecha de Ingreso: diciembre-2006
Mensajes: 16
Antigüedad: 17 años, 11 meses
Puntos: 0
Respuesta: Problema de conexion a Base de Datos

La excepción aparece en la instruccion:

con = DatabaseConnectionManager.getConnection();

Donde la clase DatabaseConnectionManager no la encuentra... Me aparece esto:

// Compiled from DatabaseConnectionManager.java (version 1.5 : 49.0, super bit)
public final class es.crcit.general.database.DatabaseConnectionManage r {

// Field descriptor #6 Ljava/lang/String;
private static final java.lang.String DEFAULT_DATASOURCE = "dataSourceName";

// Field descriptor #11 Ljava/util/Hashtable;
private static java.util.Hashtable datasources;

// Method descriptor #13 ()V
// Stack: 2, Locals: 0
static {};
0 new java.util.Hashtable [15]
3 dup
4 invokespecial java.util.Hashtable() [17]
7 putstatic es.crcit.general.database.DatabaseConnectionManage r.datasources : java.util.Hashtable [20]
10 return
Line numbers:
[pc: 0, line: 29]
[pc: 10, line: 27]

// Method descriptor #13 ()V
// Stack: 1, Locals: 1
private DatabaseConnectionManager();
0 aload_0 [this]
1 invokespecial java.lang.Object() [24]
4 return
Line numbers:
[pc: 0, line: 34]
[pc: 4, line: 35]
Local variable table:
[pc: 0, pc: 5] local: this index: 0 type: es.crcit.general.database.DatabaseConnectionManage r

// Method descriptor #28 ()Ljava/sql/Connection;
// Stack: 1, Locals: 0
public static java.sql.Connection getConnection() throws es.crcit.general.exceptions.DatabaseException;
0 ldc <String "dataSourceName"> [8]
2 invokestatic es.crcit.general.database.DatabaseConnectionManage r.getConnection(java.lang.String) : java.sql.Connection [32]
5 areturn
Line numbers:
[pc: 0, line: 45]

// Method descriptor #34 (Ljava/lang/String;)Ljava/sql/Connection;
// Stack: 2, Locals: 1
public static java.sql.Connection getConnectionUser(java.lang.String idUser) throws es.crcit.general.exceptions.DatabaseException;
0 ldc <String "dataSourceName"> [8]
2 aload_0 [idUser]
3 invokestatic es.crcit.general.database.DatabaseConnectionManage r.getConnectionUser(java.lang.String, java.lang.String) : java.sql.Connection [36]
6 areturn
Line numbers:
[pc: 0, line: 49]
Local variable table:
[pc: 0, pc: 7] local: idUser index: 0 type: java.lang.String

// Method descriptor #34 (Ljava/lang/String;)Ljava/sql/Connection;
// Stack: 4, Locals: 4
public static java.sql.Connection getConnection(java.lang.String dsName) throws es.crcit.general.exceptions.DatabaseException;
0 aconst_null
1 astore_1 [connection]
2 aconst_null
3 astore_2 [datasource]
4 aload_0 [dsName]
5 invokestatic es.crcit.general.database.DatabaseConnectionManage r.initDataSource(java.lang.String) : void [40]
8 getstatic es.crcit.general.database.DatabaseConnectionManage r.datasources : java.util.Hashtable [20]
11 aload_0 [dsName]
12 invokevirtual java.util.Hashtable.get(java.lang.Object) : java.lang.Object [44]
15 checkcast javax.sql.DataSource [48]
18 astore_2 [datasource]
19 aload_2 [datasource]
20 invokeinterface javax.sql.DataSource.getConnection() : java.sql.Connection [50] [nargs: 1]
25 astore_1 [connection]
26 aload_1 [connection]
27 iconst_0
28 invokeinterface java.sql.Connection.setAutoCommit(boolean) : void [52] [nargs: 2]
33 goto 64
36 astore_3 [sqlexception]
37 new es.crcit.general.exceptions.DatabaseException [30]
40 dup
41 ldc <String "Se ha producido un error al obtener la conexi�n a la base de datos"> [58]
43 aload_3 [sqlexception]
44 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String, java.lang.Throwable) [60]
47 athrow
48 astore_3 [e]
49 aload_3 [e]
50 invokevirtual java.lang.Exception.printStackTrace() : void [63]
53 new es.crcit.general.exceptions.DatabaseException [30]
56 dup
57 ldc <String "Se ha producido un error al obtener la conexi�n a la base de datos"> [58]
59 aload_3 [e]
60 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String, java.lang.Throwable) [60]
63 athrow
64 aload_1 [connection]
65 ifnonnull 78
68 new es.crcit.general.exceptions.DatabaseException [30]
71 dup
72 ldc <String "No ha sido posible obtener una conexi�n a la base de datos"> [68]
74 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String) [70]
77 athrow
78 aload_1 [connection]
79 areturn
Exception Table:
[pc: 4, pc: 33] -> 36 when : java.sql.SQLException
[pc: 4, pc: 33] -> 48 when : java.lang.Exception
Line numbers:
[pc: 0, line: 53]
[pc: 2, line: 54]
[pc: 4, line: 56]
[pc: 8, line: 57]
[pc: 19, line: 58]
[pc: 26, line: 59]
[pc: 36, line: 62]
[pc: 37, line: 63]
[pc: 48, line: 65]
[pc: 49, line: 66]
[pc: 53, line: 67]
[pc: 64, line: 71]
[pc: 68, line: 72]
[pc: 78, line: 75]
Local variable table:
[pc: 0, pc: 80] local: dsName index: 0 type: java.lang.String
[pc: 2, pc: 80] local: connection index: 1 type: java.sql.Connection
[pc: 4, pc: 80] local: datasource index: 2 type: javax.sql.DataSource
[pc: 37, pc: 48] local: sqlexception index: 3 type: java.sql.SQLException
[pc: 49, pc: 64] local: e index: 3 type: java.lang.Exception

// Method descriptor #38 (Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;
// Stack: 4, Locals: 7
public static java.sql.Connection getConnectionUser(java.lang.String dsName, java.lang.String idUser) throws es.crcit.general.exceptions.DatabaseException;
0 aconst_null
1 astore_2 [connection]
2 aconst_null
3 astore_3 [datasource]
4 ldc <String "BEGIN SYS.DBMS_SESSION.SET_IDENTIFIER (?); END;"> [83]
6 invokevirtual java.lang.String.intern() : java.lang.String [85]
9 astore 4 [FIJA_CLIENT_IDENTIFIER_SQL]
11 aconst_null
12 astore 5 [callablestatement]
14 aload_0 [dsName]
15 invokestatic es.crcit.general.database.DatabaseConnectionManage r.initDataSource(java.lang.String) : void [40]
18 getstatic es.crcit.general.database.DatabaseConnectionManage r.datasources : java.util.Hashtable [20]
21 aload_0 [dsName]
22 invokevirtual java.util.Hashtable.get(java.lang.Object) : java.lang.Object [44]
25 checkcast javax.sql.DataSource [48]
28 astore_3 [datasource]
29 aload_3 [datasource]
30 invokeinterface javax.sql.DataSource.getConnection() : java.sql.Connection [50] [nargs: 1]
35 astore_2 [connection]
36 aload_2 [connection]
37 iconst_0
38 invokeinterface java.sql.Connection.setAutoCommit(boolean) : void [52] [nargs: 2]
43 aload_2 [connection]
44 aload 4 [FIJA_CLIENT_IDENTIFIER_SQL]
46 invokeinterface java.sql.Connection.prepareCall(java.lang.String) : java.sql.CallableStatement [91] [nargs: 2]
51 astore 5 [callablestatement]
53 aload 5 [callablestatement]
55 iconst_1
56 aload_1 [idUser]
57 invokeinterface java.sql.CallableStatement.setString(int, java.lang.String) : void [95] [nargs: 3]
62 aload 5 [callablestatement]
64 invokeinterface java.sql.CallableStatement.execute() : boolean [101] [nargs: 1]
69 pop
70 goto 106
73 astore 6 [sqlexception]
75 new es.crcit.general.exceptions.DatabaseException [30]
78 dup
79 ldc <String "Se ha producido un error al obtener la conexi�n a la base de datos"> [58]
81 aload 6 [sqlexception]
83 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String, java.lang.Throwable) [60]
  #4 (permalink)  
Antiguo 09/01/2013, 14:01
 
Fecha de Ingreso: diciembre-2006
Mensajes: 16
Antigüedad: 17 años, 11 meses
Puntos: 0
Respuesta: Problema de conexion a Base de Datos

86 athrow
87 astore 6 [e]
89 aload 6 [e]
91 invokevirtual java.lang.Exception.printStackTrace() : void [63]
94 new es.crcit.general.exceptions.DatabaseException [30]
97 dup
98 ldc <String "Se ha producido un error al obtener la conexi�n a la base de datos"> [58]
100 aload 6 [e]
102 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String, java.lang.Throwable) [60]
105 athrow
106 aload_2 [connection]
107 ifnonnull 120
110 new es.crcit.general.exceptions.DatabaseException [30]
113 dup
114 ldc <String "No ha sido posible obtener una conexi�n a la base de datos"> [68]
116 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String) [70]
119 athrow
120 aload_2 [connection]
121 areturn
Exception Table:
[pc: 14, pc: 70] -> 73 when : java.sql.SQLException
[pc: 14, pc: 70] -> 87 when : java.lang.Exception
Line numbers:
[pc: 0, line: 80]
[pc: 2, line: 81]
[pc: 4, line: 82]
[pc: 11, line: 83]
[pc: 14, line: 85]
[pc: 18, line: 86]
[pc: 29, line: 87]
[pc: 36, line: 88]
[pc: 43, line: 90]
[pc: 53, line: 91]
[pc: 62, line: 92]
[pc: 73, line: 94]
[pc: 75, line: 95]
[pc: 87, line: 97]
[pc: 89, line: 98]
[pc: 94, line: 99]
[pc: 106, line: 103]
[pc: 110, line: 104]
[pc: 120, line: 107]
Local variable table:
[pc: 0, pc: 122] local: dsName index: 0 type: java.lang.String
[pc: 0, pc: 122] local: idUser index: 1 type: java.lang.String
[pc: 2, pc: 122] local: connection index: 2 type: java.sql.Connection
[pc: 4, pc: 122] local: datasource index: 3 type: javax.sql.DataSource
[pc: 11, pc: 122] local: FIJA_CLIENT_IDENTIFIER_SQL index: 4 type: java.lang.String
[pc: 14, pc: 122] local: callablestatement index: 5 type: java.sql.CallableStatement
[pc: 75, pc: 87] local: sqlexception index: 6 type: java.sql.SQLException
[pc: 89, pc: 106] local: e index: 6 type: java.lang.Exception

// Method descriptor #109 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;
// Stack: 4, Locals: 3
public static java.sql.Connection getConnectionOracle(java.lang.String urlJDBC, java.lang.String user, java.lang.String pwd) throws es.crcit.general.exceptions.DatabaseException;
0 aload_0 [urlJDBC]
1 ldc <String "oracle.jdbc.driver.OracleDriver"> [110]
3 aload_1 [user]
4 aload_2 [pwd]
5 invokestatic es.crcit.general.database.DatabaseConnectionManage r.getConnection(java.lang.String, java.lang.String, java.lang.String, java.lang.String) : java.sql.Connection [112]
8 areturn
Line numbers:
[pc: 0, line: 112]
Local variable table:
[pc: 0, pc: 9] local: urlJDBC index: 0 type: java.lang.String
[pc: 0, pc: 9] local: user index: 1 type: java.lang.String
[pc: 0, pc: 9] local: pwd index: 2 type: java.lang.String
// Method descriptor #114 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;
// Stack: 4, Locals: 6
public static java.sql.Connection getConnection(java.lang.String urlJDBC, java.lang.String driver, java.lang.String user, java.lang.String pwd) throws es.crcit.general.exceptions.DatabaseException;
0 aconst_null
1 astore 4 [connection]
3 aload_1 [driver]
4 invokestatic java.lang.Class.forName(java.lang.String) : java.lang.Class [118]
7 pop
8 aload_0 [urlJDBC]
9 aload_2 [user]
10 aload_3 [pwd]
11 invokestatic java.sql.DriverManager.getConnection(java.lang.Str ing, java.lang.String, java.lang.String) : java.sql.Connection [124]
14 astore 4 [connection]
16 aload 4 [connection]
18 iconst_0
19 invokeinterface java.sql.Connection.setAutoCommit(boolean) : void [52] [nargs: 2]
24 goto 84
27 astore 5 [sqle]
29 aload 5 [sqle]
31 invokevirtual java.sql.SQLException.printStackTrace() : void [128]
34 new es.crcit.general.exceptions.DatabaseException [30]
37 dup
38 ldc <String "Se ha producido un error al obtener la conexi�n a la base de datos"> [58]
40 aload 5 [sqle]
42 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String, java.lang.Throwable) [60]
45 athrow
46 astore 5 [ex]
48 aload 5 [ex]
50 invokevirtual java.lang.ClassNotFoundException.printStackTrace() : void [129]
53 new es.crcit.general.exceptions.DatabaseException [30]
56 dup
57 ldc <String "Se ha producido un error al obtener la conexi�n a la base de datos. Driver no encontrado"> [132]
59 aload 5 [ex]
61 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String, java.lang.Throwable) [60]
64 athrow
65 astore 5 [e]
67 aload 5 [e]
69 invokevirtual java.lang.Exception.printStackTrace() : void [63]
72 new es.crcit.general.exceptions.DatabaseException [30]
75 dup
76 ldc <String "Se ha producido un error al obtener la conexi�n a la base de datos"> [58]
78 aload 5 [e]
80 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String, java.lang.Throwable) [60]
83 athrow
84 aload 4 [connection]
86 ifnonnull 99
89 new es.crcit.general.exceptions.DatabaseException [30]
92 dup
93 ldc <String "No ha sido posible obtener una conexi�n a la base de datos"> [68]
95 invokespecial es.crcit.general.exceptions.DatabaseException(java .lang.String) [70]
98 athrow
99 aload 4 [connection]
101 areturn
Exception Table:
[pc: 3, pc: 24] -> 27 when : java.sql.SQLException
[pc: 3, pc: 24] -> 46 when : java.lang.ClassNotFoundException
[pc: 3, pc: 24] -> 65 when : java.lang.Exception
Line numbers:
[pc: 0, line: 116]
[pc: 3, line: 118]
[pc: 8, line: 120]
[pc: 16, line: 121]
[pc: 27, line: 123]
[pc: 29, line: 124]
[pc: 34, line: 125]
[pc: 46, line: 127]
[pc: 48, line: 128]
[pc: 53, line: 129]
[pc: 65, line: 131]
[pc: 67, line: 132]
[pc: 72, line: 133]
[pc: 84, line: 137]
[pc: 89, line: 138]
[pc: 99, line: 141]
Local variable table:
[pc: 0, pc: 102] local: urlJDBC index: 0 type: java.lang.String
[pc: 0, pc: 102] local: driver index: 1 type: java.lang.String
[pc: 0, pc: 102] local: user index: 2 type: java.lang.String
[pc: 0, pc: 102] local: pwd index: 3 type: java.lang.String
[pc: 3, pc: 102] local: connection index: 4 type: java.sql.Connection
[pc: 29, pc: 46] local: sqle index: 5 type: java.sql.SQLException
[pc: 48, pc: 65] local: ex index: 5 type: java.lang.ClassNotFoundException
[pc: 67, pc: 84] local: e index: 5 type: java.lang.Exception

// Method descriptor #139 (Ljava/sql/Connection;)V
// Stack: 1, Locals: 2
public static void closeConnection(java.sql.Connection connection);
0 aload_0 [connection]
1 ifnull 14
4 aload_0 [connection]
5 invokeinterface java.sql.Connection.close() : void [140] [nargs: 1]
10 goto 14
13 astore_1
14 return
Exception Table:
[pc: 4, pc: 10] -> 13 when : java.sql.SQLException
Line numbers:
[pc: 0, line: 154]
[pc: 4, line: 156]
[pc: 13, line: 158]
[pc: 14, line: 160]
Local variable table:
[pc: 0, pc: 15] local: connection index: 0 type: java.sql.Connection

// Method descriptor #13 ()V
// Stack: 1, Locals: 0
private static synchronized void initDataSource() throws java.sql.SQLException;
0 ldc <String "dataSourceName"> [8]
2 invokestatic es.crcit.general.database.DatabaseConnectionManage r.initDataSource(java.lang.String) : void [40]
5 return
Line numbers:
[pc: 0, line: 170]
[pc: 5, line: 171]
  #5 (permalink)  
Antiguo 09/01/2013, 14:02
 
Fecha de Ingreso: diciembre-2006
Mensajes: 16
Antigüedad: 17 años, 11 meses
Puntos: 0
Respuesta: Problema de conexion a Base de Datos

// Method descriptor #43 (Ljava/lang/String;)V
// Stack: 3, Locals: 5
private static synchronized void initDataSource(java.lang.String datasourceName) throws java.sql.SQLException;
0 getstatic es.crcit.general.database.DatabaseConnectionManage r.datasources : java.util.Hashtable [20]
3 aload_0 [datasourceName]
4 invokevirtual java.util.Hashtable.get(java.lang.Object) : java.lang.Object [44]
7 ifnonnull 74
10 aconst_null
11 astore_1 [datasource]
12 aload_0 [datasourceName]
13 invokestatic es.crcit.general.configuracion.Configuracion.getPr opiedad(java.lang.String) : java.lang.String [143]
16 astore_3 [dsName]
17 new java.util.Properties [149]
20 dup
21 invokespecial java.util.Properties() [151]
24 astore 4 [env]
26 new javax.naming.InitialContext [152]
29 dup
30 aload 4 [env]
32 invokespecial javax.naming.InitialContext(java.util.Hashtable) [154]
35 astore_2 [ctx]
36 aload_2 [ctx]
37 aload_3 [dsName]
38 invokeinterface javax.naming.Context.lookup(java.lang.String) : java.lang.Object [157] [nargs: 2]
43 checkcast javax.sql.DataSource [48]
46 astore_1 [datasource]
47 getstatic es.crcit.general.database.DatabaseConnectionManage r.datasources : java.util.Hashtable [20]
50 aload_0 [datasourceName]
51 aload_1 [datasource]
52 invokevirtual java.util.Hashtable.put(java.lang.Object, java.lang.Object) : java.lang.Object [163]
55 pop
56 goto 74
59 astore 4 [namingexception]
61 new java.sql.SQLException [72]
64 dup
65 aload 4 [namingexception]
67 invokevirtual javax.naming.NamingException.getExplanation() : java.lang.String [167]
70 invokespecial java.sql.SQLException(java.lang.String) [172]
73 athrow
74 return
Exception Table:
[pc: 17, pc: 56] -> 59 when : javax.naming.NamingException
Line numbers:
[pc: 0, line: 174]
[pc: 10, line: 175]
[pc: 12, line: 177]
[pc: 17, line: 180]
[pc: 26, line: 181]
[pc: 36, line: 182]
[pc: 47, line: 183]
[pc: 59, line: 186]
[pc: 61, line: 187]
[pc: 74, line: 190]
Local variable table:
[pc: 0, pc: 75] local: datasourceName index: 0 type: java.lang.String
[pc: 12, pc: 74] local: datasource index: 1 type: javax.sql.DataSource
[pc: 36, pc: 59] local: ctx index: 2 type: javax.naming.Context
[pc: 17, pc: 74] local: dsName index: 3 type: java.lang.String
[pc: 26, pc: 59] local: env index: 4 type: java.util.Properties
[pc: 61, pc: 74] local: namingexception index: 4 type: javax.naming.NamingException
}

Además, acabo de mirar que el javadoc path no está puesto, pero no sé donde encontrarlo...
  #6 (permalink)  
Antiguo 09/01/2013, 14:35
Avatar de chuidiang
Colaborador
 
Fecha de Ingreso: octubre-2004
Mensajes: 3.774
Antigüedad: 20 años, 1 mes
Puntos: 454
Respuesta: Problema de conexion a Base de Datos

¿Y la excepción exactamente es? ¿Que no encuentra la clase?
__________________
Apuntes Java
Wiki de Programación

Etiquetas: conexion-a-servidor, eclipse, oracle, tomcat, xml
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 23:08.