JDBC NullPointer exception
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration, Java & JDBC Development
Hi, I'm trying to use Data Access Beans (Select Bean) in VAJ and have an error: DriverManager.initialize: jdbc.drivers = null JDBC DriverManager initialized registerDriver: driver[className=com.informix.jdbc.IfxDriver,context=null,com.informix.jdbc. IfxDriver@62b4] DriverManager.getConnection("jdbc:informix-sqli://rex:1526/gmbh:informixserv er=ol_rex") trying driver[className=com.informix.jdbc.IfxDriver,context=null,com.informix.jdbc. IfxDriver@62b4] SQLWarning: reason(Informix Dynamic Server database selected) SQLState(01I04) SQLWarning: reason(Informix extension to an ANSI-compliant standard syntax) SQLState(01I06) getConnection returning driver[className=com.informix.jdbc.IfxDriver,context=null,com.informix.jdbc. IfxDriver@62b4] java.lang.NullPointerException java.lang.Throwable() java.lang.Exception() java.lang.RuntimeException() java.lang.NullPointerException() void com.ibm.db.base.DatabaseResultTable.checkSearchLevel(java.lang.String, com.ibm.db.base.DatabaseTypeField) void com.ibm.db.base.DatabaseResultTable.checkSearchLevel(java.lang.String, com.ibm.db.base.DatabaseTypeField) void com.ibm.db.base.DatabaseResultTable.fillInColumnShape() void com.ibm.db.base.DatabaseResultTable.fetchResultSet() void com.ibm.db.base.DatabaseResultTable.execute() void com.ibm.db.SelectStatement.createResultTable() void com.ibm.db.SelectStatement.execute() void com.ibm.ivj.db.uibeans.Select.execute() void com.ibm.ivj.db.uibeans.DBActions.run() void java.lang.Thread.run() IBM's people say that it because "The Select bean is dependent on accurate metadata being provided by the JDBC drivers. The Select bean is attempting to determine if the columns in the query are searchable. For each column it is using the java.sql.ResultSetMetaData.getColumnTypeName() method to match against the information provided by java.sql.DatabaseMetaData.getTypeInfo(). We expect to find a match between the columnTypeName provided in the ResultSetMetaData and the typeNames returned by Database.getTypeInfo(). If we don't, the symptom is a null pointer exception." It's really so: I have checked what the Informix JDBC driver returns for these methods, for example, columnTypeName returns int and typeNames - integer and so on. Has anybody use VAJ Beans for Informix? I've tried another driver (from BEA WebLogic) - no success, but another errors. With best regards. Maria Androssova