NullPointerException raised by method nativeSQL [message #90923] |
Tue, 11 December 2001 00:44 |
vincent
Messages: 18 Registered: November 1998
|
Junior Member |
|
|
I got rarely this exception :
java.lang.NullPointerException
at oracle.jdbc.driver.OracleConnection.nativeSQL(OracleConnection.java:762)
at oracle.jdbc.driver.OracleStatement.expandSqlEscapes(OracleStatement.java:4790)
at oracle.jdbc.driver.OracleStatement.parseSqlKind(OracleStatement.java:4779)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:209)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:165)
at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.java:604)
at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:485)
What is the reason ?
How I can avoid this ?
----------------------------------------------------------------------
|
|
|
Re: NullPointerException raised by method nativeSQL [message #90933 is a reply to message #90923] |
Wed, 12 December 2001 05:44 |
Jason Ladd
Messages: 7 Registered: December 2001
|
Junior Member |
|
|
These are tough to debug, especially without access to the source code. I usually get these when I attempt to run a method on an object handle that was not instantiated properly. For example, when processing a result set you may want to get the length of a certain field returned:
String name = rs.getString(1);
int len = name.length();
If the name field for this row is null, when you attempt to get the length you'll get a NullPointerException. This is just an example, I hope it helps in some way.
----------------------------------------------------------------------
|
|
|
Re: NullPointerException raised by method nativeSQL [message #125909 is a reply to message #90923] |
Wed, 29 June 2005 19:28 |
sanker_s
Messages: 1 Registered: June 2005
|
Junior Member |
|
|
I got this exception. Any clues?
java.lang.NullPointerException
at oracle.jdbc.driver.OracleConnection.nativeSQL(OracleConnection.java:762)
at oracle.jdbc.driver.OracleStatement.expandSqlEscapes(OracleStatement.java:4790)
at oracle.jdbc.driver.OracleStatement.parseSqlKind(OracleStatement.java:4779)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1847)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:538)
at oracle.jdbc.dbaccess.DBAccess.setNlsParamsClient(DBAccess.java:1054)
at oracle.jdbc.ttc7.TTC7Protocol.initNls(TTC7Protocol.java:1152)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:256)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:172)
|
|
|