db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zorro <hz0...@gmail.com>
Subject NullPointerException in Derby 10.9.1.0
Date Wed, 28 Nov 2012 19:25:27 GMT
Dear All,

When doing in ij a bulk Insert into a table of my Derby database I do 
get a NullPointerException.

I am using the Derby Network Server on Fedora 14 using the OpenJDK 
Runtime Environment (IcedTea6 1.9.10) version "1.6.0_20".

I did the following:
ij> Connect 'jdbc:derby://localhost:1527/derby.db;user=...;password=...' ;
ij> AutoCommit Off ;
ij> Set Schema ExchRates ;

ij> Describe SecurityDaySummary ;
COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
SECURITYID |CHAR |NULL|NULL|15 |NULL |30 |NO
TRADINGDATE |DATE |0 |10 |10 |NULL |NULL |NO
VOLUME |INTEGER |0 |10 |10 |NULL |NULL |NO
CLOSINGPRICE |DECIMAL |4 |10 |12 |NULL |NULL |NO
LOWPRICE |DECIMAL |4 |10 |12 |0.0 |NULL |NO
HIGHPRICE |DECIMAL |4 |10 |12 |0.0 |NULL |NO

ij> Select 'NL0010273215', TradingDate,
 > INT(Volume * 0.97048368 + 0.5),
 > DOUBLE(ClosingPrice * 1.03139545 + 0.00005),
 > DOUBLE(LowPrice * 1.03139545 + 0.00005),
 > DOUBLE(HighPrice * 1.03139545 + 0.00005)
 > From SecurityDaySummary where SecurityID = 'NL0006034001'
 > Order By SecurityID, TradingDate ;

.........
.........
NL0006034001 |2012-11-23|4953569 |46.00028707 |44.5047636675 |46.00028707

4398 rows selected

ij> Insert Into SecurityDaySummary
 > (SecurityID, TradingDate, Volume, ClosingPrice, LowPrice, HighPrice)
 > Select 'NL0010273215', TradingDate,
 > INT(Volume * 0.97048368 + 0.5),
 > DOUBLE(ClosingPrice * 1.03139545 + 0.00005),
 > DOUBLE(LowPrice * 1.03139545 + 0.00005),
 > DOUBLE(HighPrice * 1.03139545 + 0.00005)
 > From SecurityDaySummary where SecurityID = 'NL0006034001'
 > Order By SecurityID, TradingDate ;

ERROR XJ001: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ001, SQLERRMC: 
java.lang.NullPointerExceptionXJ001.U

ij> Rollback ;
ERROR 08006: A network protocol error was encountered and the connection 
has been terminated: the requested command encountered an unarchitected 
and implementation-specific condition for which there was no architected 
message (additional information may be available in the derby.log file 
on the server)
ERROR 08003: DERBY SQL error: SQLCODE: -1, SQLSTATE: 08003, SQLERRMC: No 
current connection.

ij> exit ;

The derby.log file showed the following logging:

# cat derby.log
Wed Nov 28 11:47:02 CET 2012 : Apache Derby Network Server - 10.9.1.0 - 
(1344872) started and ready to accept connections on port 1527
Wed Nov 28 11:47:57 CET 2012 : Connection number: 1.
----------------------------------------------------------------
Wed Nov 28 11:47:58 CET 2012:
Booting Derby version The Apache Software Foundation - Apache Derby - 
10.9.1.0 - (1344872): instance a816c00e-013b-46a0-80f7-ffff8c36475a
on database directory /media/sdb1/derby/db/derby.db with class loader 
sun.misc.Launcher$AppClassLoader@affc70
Loaded from access denied (java.lang.RuntimePermission getProtectionDomain)
java.vendor=Sun Microsystems Inc.
user.dir=/tmp/Derby/logs
derby.system.home=/media/sdb1/derby/db
derby.stream.error.file=/tmp/Derby/logs/derby.log
Database Class Loader started - derby.database.classpath=''
Wed Nov 28 11:48:00 CET 2012 Thread[DRDAConnThread_3,5,main] (DATABASE = 
derby.db), (DRDAID = {1}), Apache Derby Network Server connected to 
database derby.db
Wed Nov 28 11:51:03 CET 2012 Thread[DRDAConnThread_3,5,main] (XID = 
1902670), (SESSIONID = 1), (DATABASE = derby.db), (DRDAID = 
��������.����-4255900293765440262{ting Cleanup action starr
Wed Nov 28 11:51:03 CET 2012 Thread[DRDAConnThread_3,5,main] (XID = 
1902670), (SESSIONID = 1), (DATABASE = derby.db), (DRDAID = 
��������.����-4255900293765440262{: Insert Into SecurityDaySummary
(SecurityID, TradingDate, Volume, ClosingPrice, LowPrice, HighPrice)
Select 'NL0010273215', TradingDate,
INT(Volume * 0.97048368 + 0.5),
DOUBLE(ClosingPrice * 1.03139545 + 0.00005),
DOUBLE(LowPrice * 1.03139545 + 0.00005),
DOUBLE(HighPrice * 1.03139545 + 0.00005)
 From SecurityDaySummary where SecurityID = 'NL0006034001'
Order By SecurityID, TradingDate
java.lang.NullPointerException
at 
org.apache.derby.impl.store.access.conglomerate.ConglomerateUtil.createFormatIds(Unknown 
Source)
at org.apache.derby.impl.store.access.heap.Heap.create(Unknown Source)
at 
org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.createConglomerate(Unknown

Source)
at 
org.apache.derby.impl.store.access.RAMTransaction.createConglomerate(Unknown 
Source)
at 
org.apache.derby.impl.sql.execute.TemporaryRowHolderImpl.insert(Unknown 
Source)
at 
org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown 
Source)
at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
at 
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown 
Source)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown 
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLIMM(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Cleanup action completed

---------

I recently migrated from Derby version 10.6.1.0 to version 10.9.1.0 and 
I haven't had such issues with Derby 10.6.1.0.

On the derby-user mailing list there was a posting on Mon, 09 July by 
TXVanguard who described a similar NullPointerException.

In the derby issue list I could not find a corresponding bug report.

Is this still an issue and should I file a bug report or is it just the 
Transaction becoming too large or so?

Hope someone has the time to look at this.

Kind regards,
Harm-Jan Zwinderman


Mime
View raw message