Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 1589 invoked from network); 1 Jul 2008 11:49:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jul 2008 11:49:03 -0000 Received: (qmail 39905 invoked by uid 500); 1 Jul 2008 11:48:59 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 39885 invoked by uid 500); 1 Jul 2008 11:48:59 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 54320 invoked by uid 99); 1 Jul 2008 09:18:56 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) X-Antivirus-thepsi.com-Mail-From: vibhuti.gupta@thepsi.com via QMAIL X-Antivirus-thepsi.com: 1.25-st-qms (Clear:RC:1(192.168.0.88):. Processed in 0.358293 secs Process 23430) From: "vibhuti" To: Subject: RE: java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression. Date: Tue, 1 Jul 2008 14:47:05 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01C8DB89.554F4500" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcjbWmwKlRowF6Y8Q5q25s0Mz5Dm4QAAFoYg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 In-Reply-To: Message-ID: <1214903822107323430@QMAIL> X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------=_NextPart_000_000D_01C8DB89.554F4500 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Also please find the output of sysinfo: ------------------ Java Information ------------------ Java Version: 1.6.0_01 Java Vendor: Sun Microsystems Inc. Java home: C:\Java\jdk1.6.0_01\jre Java classpath: .\config;.\lib\activation.jar;.\lib\aperture-1.0.1-beta.jar;.\lib\bcmail-jdk 14-132.jar;.\lib\bcprov-jdk14-132.jar;.\lib\castor-0.9.3.21-xml.jar;.\lib\ch eckstyle-all-4.2.jar;.\lib\cjkanalyzer.jar;.\lib\commons-beanutils.jar;.\lib \commons-collections-3.0.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib\commons-dige ster.jar;.\lib\commons-fileupload.jar;.\lib\commons-lang-2.0.jar;.\lib\commo ns-logging.jar;.\lib\commons-net-1.4.1.jar;.\lib\commons-pool-1.2.jar;.\lib\ commons-validator.jar;.\lib\app.jar;.\lib\app_13.jar;.\lib\appsync.jar;. \lib\derby.jar;.\lib\derbyclient.jar;.\lib\derbynet.jar;.\lib\derbytools.jar ;.\lib\displaytag-1.0-rc1.jar;.\lib\FontBox-0.1.0-dev.jar;.\lib\jakarta-rege xp-1.2.jar;.\lib\javaee.jar;.\lib\jcharset.jar;.\lib\jcifs-1.2.17.jar;.\lib\ jcommon-0.9.6.jar;.\lib\jfreechart-0.9.21.jar;.\lib\jtnef.jar;.\lib\junit.ja r;.\lib\ldap.jar;.\lib\log4j-1.2.8.jar;.\lib\lucene-core-2.2.0.jar;.\lib\luc ene-highlighter.jar;.\lib\mail.jar;.\lib\mysql-connector-java-3.0.9-stable-b in.jar;.\lib\openrdf-rdf2go-2.0.0-beta6.jar;.\lib\openrdf-sesame-2.0-beta6-o nejar.jar;.\lib\org.semweb4j.rdf2go.api_4.4.7.jar;.\lib\org.semweb4j.rdf2go. impl.base_4.4.6.jar;.\lib\pd4ml.jar;.\lib\PDFBox-0.7.3.jar;.\lib\poi-3.0.1-F INAL-20070705.jar;.\lib\quartz-1.5.2.jar;.\lib\slf4j-api-1.3.0.jar;.\lib\slf 4j-simple-1.3.0.jar;.\lib\SNMP4J.jar;.\lib\ss_css2.jar;.\lib\struts.jar;.\li b\textmining_v1.jar;.\lib\tm-extractors-0.4.jar;.\lib\truezip-6.jar;.\lib\xe rces-2_6_2.jar;.\lib\windows\FPLibrary.jar OS name: Windows XP OS architecture: x86 OS version: 5.1 Java user name: vibhuti Java user home: C:\Documents and Settings\vibhuti Java user dir: D:\projects\src\app\dist\app java.specification.name: Java Platform API Specification java.specification.version: 1.6 --------- Derby Information -------- JRE - JDBC: Java SE 6 - JDBC 4.0 [D:\projects\src\app\dist\app\lib\derby.jar] 10.3.1.4 - (561794) [D:\projects\src\app\dist\app\lib\derbytools.jar] 10.3.1.4 - (5617 94) [D:\projects\src\app\dist\app\lib\derbynet.jar] 10.3.1.4 - (561794 ) [D:\projects\src\app\dist\app\lib\derbyclient.jar] 10.3.1.4 - (561 794) ------------------------------------------------------ ----------------- Locale Information ----------------- ------------------------------------------------------ _____ From: vibhuti [mailto:vibhuti.gupta@ThePSI.com] Sent: Tuesday, July 01, 2008 2:41 PM To: 'derby-user@db.apache.org' Subject: java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression. 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 ------=_NextPart_000_000D_01C8DB89.554F4500 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

Also please find the output of = sysinfo:

 

------------------ Java Information ------------------

Java Version:    = 1.6.0_01

Java Vendor:     Sun Microsystems Inc.

Java = home:       C:\Java\jdk1.6.0_01\jre

Java classpath:  .\config;.\lib\activation.jar;.\lib\aperture-1.0.1-beta.jar;.\lib\bcmail-= jdk14-132.jar;.\lib\bcprov-jdk14-132.jar;.\lib\castor-0.9.3.21-xml.jar;.\= lib\checkstyle-all-4.2.jar;.\lib\cjkanalyzer.jar;.\lib\commons-beanutils.= jar;.\lib\commons-collections-3.0.jar;.\lib\commons-dbcp-1.2.1.jar;.\lib\= commons-digester.jar;.\lib\commons-fileupload.jar;.\lib\commons-lang-2.0.= jar;.\lib\commons-logging.jar;.\lib\commons-net-1.4.1.jar;.\lib\commons-p= ool-1.2.jar;.\lib\commons-validator.jar;.\lib\app.jar;.\lib\app_13.jar;.\= lib\appsync.jar;.

\lib\derby.jar;.\lib\derbyclient.jar;.\lib\derbynet.jar;.\lib\derby= tools.jar;.\lib\displaytag-1.0-rc1.jar;.\lib\FontBox-0.1.0-dev.jar;.\lib\= jakarta-regexp-1.2.jar;.\lib\javaee.jar;.\lib\jcharset.jar;.\lib\jcifs-1.= 2.17.jar;.\lib\jcommon-0.9.6.jar;.\lib\jfreechart-0.9.21.jar;.\lib\jtnef.= jar;.\lib\junit.jar;.\lib\ldap.jar;.\lib\log4j-1.2.8.jar;.\lib\lucene-cor= e-2.2.0.jar;.\lib\lucene-highlighter.jar;.\lib\mail.jar;.\lib\mysql-conne= ctor-java-3.0.9-stable-bin.jar;.\lib\openrdf-rdf2go-2.0.0-beta6.jar;.\lib= \openrdf-sesame-2.0-beta6-onejar.jar;.\lib\org.semweb4j.rdf2go.api_4.4.7.= jar;.\lib\org.semweb4j.rdf2go.impl.base_4.4.6.jar;.\lib\pd4ml.jar;.\lib\P= DFBox-0.7.3.jar;.\lib\poi-3.0.1-FINAL-20070705.jar;.\lib\quartz-1.5.2.jar= ;.\lib\slf4j-api-1.3.0.jar;.\lib\slf4j-simple-1.3.0.jar;.\lib\SNMP4J.jar;= .\lib\ss_css2.jar;.\lib\struts.jar;.\lib\textmining_v1.jar;.\lib\tm-extra= ctors-0.4.jar;.\lib\truezip-6.jar;.\lib\xerces-2_6_2.jar;.\lib\windows\FP= Library.jar

OS name:         Windows = XP

OS architecture: = x86

OS version:      = 5.1

Java user name:  = vibhuti

Java user home:  C:\Documents and = Settings\vibhuti

Java user dir:   = D:\projects\src\app\dist\app

java.specification.name: Java Platform API Specification

java.specification.version: = 1.6

--------- Derby Information --------

JRE - JDBC: Java SE 6 - JDBC = 4.0

[D:\projects\src\app\dist\app\lib\derby.jar] 10.3.1.4 - (561794)

[D:\projects\src\app\dist\app\lib\derbytools.jar] 10.3.1.4 - (5617

94)

[D:\projects\src\app\dist\app\lib\derbynet.jar] 10.3.1.4 - (561794

)

[D:\projects\src\app\dist\app\lib\derbyclient.jar] 10.3.1.4 - (561

794)

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

----------------- Locale Information -----------------

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


From: = vibhuti [mailto:vibhuti.gupta@ThePSI.com]
Sent: Tuesday, July 01, = 2008 2:41 PM
To: = 'derby-user@db.apache.org'
Subject: = java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while = evaluating an expression.

 

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.getSQLExcep=
tion(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.wrapInSQL=
Exception(Unknown
Source)
        =
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleExc=
eption(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.executeSta=
tement(Unknown
Source)
        =
at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpd=
ate(Unknown Source)
        =
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeU=
pdate(DelegatingPreparedStatement.java:101)
        =
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeU=
pdate(DelegatingPreparedStatement.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.getSQLExcepti=
on(Unknown Source)
        =
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsFor=
TransportAcrossDRDA(Unknown
Source)
        ... 30 =
more
Caused by: java.sql.SQLException: Java exception: =
':
java.lang.NullPointerException'.
        =
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLExcepti=
on(Unknown Source)
        =
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsFor=
TransportAcrossDRDA(Unknown
Source)
        =
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLExcep=
tion(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.wrapInSQL=
Exception(Unknown
Source)
        ... 27 =
more
Caused by: =
java.lang.NullPointerException
        =
at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.ope=
nContainer(Unknown
Source)
    =
    at
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.ope=
nContainer(Unknown
Source)
        at =
org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown
Source)
        =
at
org.apache.derby.impl.store.access.conglomerate.OpenConglome=
rate.init(Unknown
Source)
        at =
org.apache.derby.impl.store.access.heap.Heap.open(Unknown =
Source)
        =
at
org.apache.derby.impl.store.access.RAMTransaction.openConglo=
merate(Unknown
Source)
        =
at
org.apache.derby.impl.store.access.RAMTransaction.openConglo=
merate(Unknown
Source)
        =
at
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSetA=
utoincrementValue(Unknown
Source)
        =
at
org.apache.derby.impl.sql.execute.InsertResultSet.getSetAuto=
incrementValue(Unknown
Source)
        =
at
org.apache.derby.impl.sql.execute.BaseActivation.getSetAutoi=
ncrementValue(Unknown
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.getNextRowCor= e(Unknown Source)
        =
at
org.apache.derby.impl.sql.execute.NormalizeResultSet.getNext=
RowCore(Unknown
Source)
        =
at
org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextR=
owCore(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

 

------=_NextPart_000_000D_01C8DB89.554F4500--