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] |