db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vibhuti" <vibhuti.gu...@ThePSI.com>
Subject java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
Date Tue, 01 Jul 2008 09:11:18 GMT
Hi

 

Following exception occurs while running our application with embedded derby
database. The application uses multithreading. This exception occurs while
insert query is executed. The insert query is run using JDBC:

 

insert into sign (sign, month, day, offset, digest) values (?,?,?,?,?). 

 

The table for which insert query is fired is:

 

create table sign(ID  INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY
KEY, sign varchar(32), month char(6) not null, day char(2) not null, offset
bigint not null, digest varchar(32) for bit data not null)

 

There are multiple threads inserting data in database. I tried to search a
lot on net but could not find any solution. We're using derby 10.3.1.4. Not
sure about the root cause. It will be great if anybody provides some
solution because it is creating lot of problems in our application.

 

----------------------------------------------------------------------------
---------------------------------

 

Caused by: java.sql.SQLException: The exception
'java.lang.NullPointerException' was thrown while evaluating an expression.
        at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
        at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknow
n
Source)
        at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
        at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
        at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
        at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
        at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
Source)
        at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown
Source)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegating
PreparedStatement.java:101)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Delegating
PreparedStatement.java:101)
        at src.app.database.derby.Derby.insertData(Derby.java:132)
        ... 17 more
Caused by: java.sql.SQLException: The exception
'java.lang.NullPointerException' was thrown while evaluating an expression.
        at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
        at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossD
RDA(Unknown
Source)
        ... 30 more
Caused by: java.sql.SQLException: Java exception: ':
java.lang.NullPointerException'.
        at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
        at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossD
RDA(Unknown
Source)
        at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown
Source)
        at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
        at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknow
n
Source)
        ... 27 more
Caused by: java.lang.NullPointerException
        at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unkno
wn
Source)
        at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unkno
wn
Source)
        at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown
Source)
        at
org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknow
n
Source)
        at org.apache.derby.impl.store.access.heap.Heap.open(Unknown Source)
        at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
        at
org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
        at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSetAutoincrementValu
e(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.InsertResultSet.getSetAutoincrementValue(U
nknown
Source)
        at
org.apache.derby.impl.sql.execute.BaseActivation.getSetAutoincrementValue(Un
known
Source)
        at
org.apache.derby.exe.acd89d8024x0119xf710x52e1x000002ea2ea00.e0(Unknown
Source)
        at org.apache.derby.impl.services.reflect.DirectCall.invoke(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown
Source)
        at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown
Source)
        at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
        ... 23 more
----------------------------------------------------------------------------
------
 
 
 
 
 
Regards
Vibhuti

 


Mime
View raw message