db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sitsky (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3746) java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while evaluating an expression.
Date Tue, 11 Nov 2008 05:11:44 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646471#action_12646471
] 

David Sitsky commented on DERBY-3746:
-------------------------------------

To provide more information - I've attached some more stack traces from the derby.log file
itself. In our application, we have multiple threads, each with their own embedded derby connection
object potentially accessing the same blob of data concurrently. Its unfortunately very difficult
to reproduce this issue.

------------ BEGIN SHUTDOWN ERROR STACK -------------

ERROR XSDG0: Page Page(43,Container(0, 1344)) could not be read from disk.
at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:336)
at org.apache.derby.impl.store.raw.data.CachedPage.readPage(CachedPage.java:690)
at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(CachedPage.java:190)
at org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java:295)
at org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(FileContainer.java:2432)
at org.apache.derby.impl.store.raw.data.FileContainer.getPage(FileContainer.java:2482)
at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(BaseContainerHandle.java:319)
at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.latchPage(OpenConglomerate.java:294)
at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.fetch(GenericConglomerateController.java:263)
at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(IndexRowToBaseRowResultSet.java:389)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(ProjectRestrictResultSet.java:255)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(BasicNoPutResultSetImpl.java:460)
at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java:423)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(EmbedResultSet.java:367)
at Pu.a(SourceFile:305)
at Pu.a(SourceFile:292)
at IT.a(SourceFile:118)
at ya.a(SourceFile:160)
at IT.b(SourceFile:73)
at qy.read(SourceFile:291)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:42)
at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:205)
at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197)
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:136)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
at uP.a(SourceFile:94)
at LT.a(SourceFile:78)
at Kq.a(SourceFile:55)
at cE.a(SourceFile:229)
at com.nuix.util.e.a(SourceFile:93)
at com.nuix.util.e.read(SourceFile:40)
at org.apache.lucene.analysis.standard.StandardTokenizerImpl.zzRefill(StandardTokenizerImpl.java:337)
at org.apache.lucene.analysis.standard.StandardTokenizerImpl.getNextToken(StandardTokenizerImpl.java:523)
at org.apache.lucene.analysis.standard.StandardTokenizer.next(StandardTokenizer.java:139)
at org.apache.lucene.analysis.standard.StandardFilter.next(StandardFilter.java:41)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:45)
at NF.next(SourceFile:48)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:79)
at org.apache.lucene.analysis.LowerCaseFilter.next(LowerCaseFilter.java:33)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:45)
at org.apache.lucene.search.similar.MoreLikeThis.addTermFrequencies(MoreLikeThis.java:836)
at org.apache.lucene.search.similar.MoreLikeThis.retrieveTerms(MoreLikeThis.java:906)
at org.apache.lucene.search.similar.MoreLikeThis.retrieveInterestingTerms(MoreLikeThis.java:922)
at gm.a(SourceFile:245)
at gm.a(SourceFile:286)
at Hq.<init>(SourceFile:243)
at Hq.<init>(SourceFile:230)
at rq.a(SourceFile:175)
at rq.doInBackground(SourceFile:147)
at javax.swing.SwingWorker$1.call(SwingWorker.java:278)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:317)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.nio.channels.ClosedChannelException
at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:91)
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:616)
at org.apache.derby.impl.store.raw.data.RAFContainer4.readFull(RAFContainer4.java:471)
at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage0(RAFContainer4.java:242)
at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage(RAFContainer4.java:212)
at org.apache.derby.impl.store.raw.data.CachedPage.readPage(CachedPage.java:666)
... 57 more
============= begin nested exception, level (1) ===========
java.nio.channels.ClosedChannelException
at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:91)
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:616)
at org.apache.derby.impl.store.raw.data.RAFContainer4.readFull(RAFContainer4.java:471)
at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage0(RAFContainer4.java:242)
at org.apache.derby.impl.store.raw.data.RAFContainer4.readPage(RAFContainer4.java:212)
at org.apache.derby.impl.store.raw.data.CachedPage.readPage(CachedPage.java:666)
at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(CachedPage.java:190)
at org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java:295)
at org.apache.derby.impl.store.raw.data.FileContainer.getUserPage(FileContainer.java:2432)
at org.apache.derby.impl.store.raw.data.FileContainer.getPage(FileContainer.java:2482)
at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getPage(BaseContainerHandle.java:319)
at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.latchPage(OpenConglomerate.java:294)
at org.apache.derby.impl.store.access.conglomerate.GenericConglomerateController.fetch(GenericConglomerateController.java:263)
at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.getNextRowCore(IndexRowToBaseRowResultSet.java:389)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(ProjectRestrictResultSet.java:255)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(BasicNoPutResultSetImpl.java:460)
at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(EmbedResultSet.java:423)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(EmbedResultSet.java:367)
at Pu.a(SourceFile:305)
at Pu.a(SourceFile:292)
at IT.a(SourceFile:118)
at ya.a(SourceFile:160)
at IT.b(SourceFile:73)
at qy.read(SourceFile:291)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:42)
at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:205)
at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:197)
at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:136)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58)
at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68)
at uP.a(SourceFile:94)
at LT.a(SourceFile:78)
at Kq.a(SourceFile:55)
at cE.a(SourceFile:229)
at com.nuix.util.e.a(SourceFile:93)
at com.nuix.util.e.read(SourceFile:40)
at org.apache.lucene.analysis.standard.StandardTokenizerImpl.zzRefill(StandardTokenizerImpl.java:337)
at org.apache.lucene.analysis.standard.StandardTokenizerImpl.getNextToken(StandardTokenizerImpl.java:523)
at org.apache.lucene.analysis.standard.StandardTokenizer.next(StandardTokenizer.java:139)
at org.apache.lucene.analysis.standard.StandardFilter.next(StandardFilter.java:41)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:45)
at NF.next(SourceFile:48)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:79)
at org.apache.lucene.analysis.LowerCaseFilter.next(LowerCaseFilter.java:33)
at org.apache.lucene.analysis.TokenStream.next(TokenStream.java:45)
at org.apache.lucene.search.similar.MoreLikeThis.addTermFrequencies(MoreLikeThis.java:836)
at org.apache.lucene.search.similar.MoreLikeThis.retrieveTerms(MoreLikeThis.java:906)
at org.apache.lucene.search.similar.MoreLikeThis.retrieveInterestingTerms(MoreLikeThis.java:922)
at gm.a(SourceFile:245)
at gm.a(SourceFile:286)
at Hq.<init>(SourceFile:243)
at Hq.<init>(SourceFile:230)
at rq.a(SourceFile:175)
at rq.doInBackground(SourceFile:147)
at javax.swing.SwingWorker$1.call(SwingWorker.java:278)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:317)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
============= end nested exception, level (1) ===========


------------ END SHUTDOWN ERROR STACK ------------- 

> java.sql.SQLException: The exception 'java.lang.NullPointerException' was thrown while
evaluating an expression.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3746
>                 URL: https://issues.apache.org/jira/browse/DERBY-3746
>             Project: Derby
>          Issue Type: Bug
>          Components: Store
>    Affects Versions: 10.3.1.4
>         Environment: SUSE LINUX 10, Embedded Derby
>            Reporter: vibhuti gupta
>
> 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(Unknown
> 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(DelegatingPreparedStatement.java:101)
>         at
> org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(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.getSQLException(Unknown Source)
>         at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(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.wrapArgsForTransportAcrossDRDA(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(Unknown
> Source)
>         ... 27 more
> Caused by: java.lang.NullPointerException
>         at
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
> Source)
>         at
> org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
> Source)
>         at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown
> Source)
>         at
> org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown
> 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.getSetAutoincrementValue(Unknown
> Source)
>         at
> org.apache.derby.impl.sql.execute.InsertResultSet.getSetAutoincrementValue(Unknown
> Source)
>         at
> org.apache.derby.impl.sql.execute.BaseActivation.getSetAutoincrementValue(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.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
> ----------------------------------------------------------------------------------
>  
>  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-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-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-core-2.2.0.jar;.\lib\lucene-highlighter.jar;.\lib\mail.jar;
> .\lib\mysql-connector-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\PDFBox-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-extractors-0.4.jar;.\lib\truezip-6.jar;.\lib\xerces-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 -----------------
> ------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message