Re: Puzzling error

2016-08-05 Thread mike matrigali

the problem is creating a tmp file for query execution, probably not with the 
file with the actual data.
i think derby does this when it needs to do deferred update, and some deferred 
constraint checking also.

as others have said check permissions/existence on

/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp

On 8/4/2016 7:32 AM, Donald McLean wrote:

I am running Derby 10.12.1.1 under Java 1.8.0u102.

I am getting an exception trying to delete a record that I added not long 
before (as part of a unit test) (see stack trace below).

Any thoughts, hints, or ideas as to what I'm doing wrong would really be 
appreciated.

Thank you,

Donald
Caused by: java.sql.SQLException: Exception during creation of file 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
for container
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) 
~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown 
Source) ~[derby.jar:na]
at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
 ~[hibernate-core-5.0.5.Final.jar:5.0.5.Final]
... 36 common frames omitted
Caused by: org.apache.derby.iapi.error.StandardException: Exception during 
creation of file 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
for container
at org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown
 Source) ~[derby.jar:na]
... 48 common frames omitted
Caused by: java.io.FileNotFoundException: 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
(No such file or directory)
at java.io.RandomAccessFile.open0(Native Method) ~[na:1.8.0_102]
at java.io.RandomAccessFile.open(RandomAccessFile.java:316) ~[na:1.8.0_102]
at java.io.RandomAccessFile.(RandomAccessFile.java:243) 
~[na:1.8.0_102]
at org.apache.derby.impl.io.DirRandomAccessFile.(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.io.DirFile.getRandomAccessFile(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source) 
~[derby.jar:na]
at java.security.AccessController.doPrivileged(Native Method) 
~[na:1.8.0_102]
at 
org.apache.derby.impl.store.raw.data.RAFContainer.createContainer(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.store.raw.data.FileContainer.createIdent(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.store.raw.data.FileContainer.createIdentity(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.services.cache.ConcurrentCache.create(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.addContainer(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.store.raw.xact.Xact.addContainer(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.store.access.heap.Heap.create(Unknown Source) 
~[derby.jar:na]
at 
org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.createConglomerate(Unknown
 Source) ~[derby.jar:na]
at 
org.apache.derby.impl.store.access.RAMTransaction.createConglomerate(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.sql.execute.TemporaryRowHolderImpl.insert(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
Source) ~[derby.jar:na]
... 41 common frames omitted




--
email:Mike Matrigali - mikema...@gmail.com
linkedin: https://www.linkedin.com/in/MikeMatrigali



Re: Puzzling error

2016-08-05 Thread John English

On 04/08/2016 17:32, Donald McLean wrote:

Caused by: java.sql.SQLException: Exception during creation of file 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
for container
Caused by: java.io.FileNotFoundException: 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
(No such file or directory)


I presume you've already checked the directory permissions?
--
John English


Re: Puzzling error

2016-08-04 Thread Rick Hillegas

On 8/4/16, 7:32 AM, Donald McLean wrote:

I am running Derby 10.12.1.1 under Java 1.8.0u102.

I am getting an exception trying to delete a record that I added not 
long before (as part of a unit test) (see stack trace below).


Any thoughts, hints, or ideas as to what I'm doing wrong would really 
be appreciated.


Thank you,

Donald
Caused by: java.sql.SQLException: Exception during creation of file 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
for container
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) 
~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown 
Source) ~[derby.jar:na]
at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
 ~[hibernate-core-5.0.5.Final.jar:5.0.5.Final]
... 36 common frames omitted
Caused by: org.apache.derby.iapi.error.StandardException: Exception during 
creation of file 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
for container
at org.apache.derby.iapi.error.StandardException.newException(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown
 Source) ~[derby.jar:na]
... 48 common frames omitted
Caused by: java.io.FileNotFoundException: 
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp 
(No such file or directory)
at java.io.RandomAccessFile.open0(Native Method) ~[na:1.8.0_102]
at java.io.RandomAccessFile.open(RandomAccessFile.java:316) ~[na:1.8.0_102]
at java.io.RandomAccessFile.(RandomAccessFile.java:243) 
~[na:1.8.0_102]
at org.apache.derby.impl.io.DirRandomAccessFile.(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.io.DirFile.getRandomAccessFile(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown Source) 
~[derby.jar:na]
at java.security.AccessController.doPrivileged(Native Method) 
~[na:1.8.0_102]
at 
org.apache.derby.impl.store.raw.data.RAFContainer.createContainer(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.store.raw.data.FileContainer.createIdent(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.store.raw.data.FileContainer.createIdentity(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.services.cache.ConcurrentCache.create(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.addContainer(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.store.raw.xact.Xact.addContainer(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.store.access.heap.Heap.create(Unknown Source) 
~[derby.jar:na]
at 
org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.createConglomerate(Unknown
 Source) ~[derby.jar:na]
at 
org.apache.derby.impl.store.access.RAMTransaction.createConglomerate(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.sql.execute.TemporaryRowHolderImpl.insert(Unknown 
Source) ~[derby.jar:na]
at 
org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown Source) 
~[derby.jar:na]
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown 
Source) ~[derby.jar:na]
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown 
Source) ~[derby.jar:na]
... 41 common frames omitted


Hi Donald,

Can you supply the schema and the offending statement? The stack trace 
indicates an UPDATE statement, not a DELETE statement.


Thanks,
-Rick


Re: Puzzling error

2016-08-04 Thread Bryan Pendleton

I am getting an exception trying to delete a record that I added not long 
before (as part of a unit test)


Sometimes unit test frameworks do really clever things, too clever in fact.

For example, I've seen unit test frameworks for database applications which
have automatically "cleanup" code which completely removes the entire
directory tree which was being used by the test, in order to release
the disk space and prevent clutter from accumulating.

Only, it turned out that the framework removed the folder tree while the
test was still running.

One thing you can do to try to get more information is to make sure
you are getting the *full* exception trace, not the abbeviated one. See:

http://wiki.apache.org/db-derby/UnwindExceptionChain

Another thing you might try is to run your unit tests with Derby
configured so that it has logStatementText=true, and then look at your
derby.log after the test runs to get a better idea about how far your
test ran, and what was going on just before the failure.

bryan



Puzzling error

2016-08-04 Thread Donald McLean
I am running Derby 10.12.1.1 under Java 1.8.0u102.

I am getting an exception trying to delete a record that I added not long
before (as part of a unit test) (see stack trace below).

Any thoughts, hints, or ideas as to what I'm doing wrong would really be
appreciated.

Thank you,

Donald

Caused by: java.sql.SQLException: Exception during creation of file
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp
for container
   at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
~[derby.jar:na]
   at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
Source) ~[derby.jar:na]
   at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown
Source) ~[derby.jar:na]
   at 
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
~[hibernate-core-5.0.5.Final.jar:5.0.5.Final]
   ... 36 common frames omitted
Caused by: org.apache.derby.iapi.error.StandardException: Exception
during creation of file
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp
for container
   at org.apache.derby.iapi.error.StandardException.newException(Unknown
Source) ~[derby.jar:na]
   at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(Unknown
Source) ~[derby.jar:na]
   ... 48 common frames omitted
Caused by: java.io.FileNotFoundException:
/Users/dmclean/IdeaProjects/aoiIteration16/testPersStore/tmp/T1470320730508.tmp
(No such file or directory)
   at java.io.RandomAccessFile.open0(Native Method) ~[na:1.8.0_102]
   at java.io.RandomAccessFile.open(RandomAccessFile.java:316) ~[na:1.8.0_102]
   at java.io.RandomAccessFile.(RandomAccessFile.java:243) ~[na:1.8.0_102]
   at org.apache.derby.impl.io.DirRandomAccessFile.(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.io.DirFile.getRandomAccessFile(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown
Source) ~[derby.jar:na]
   at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_102]
   at org.apache.derby.impl.store.raw.data.RAFContainer.createContainer(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.store.raw.data.FileContainer.createIdent(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.store.raw.data.FileContainer.createIdentity(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.services.cache.ConcurrentCache.create(Unknown
Source) ~[derby.jar:na]
   at 
org.apache.derby.impl.store.raw.data.BaseDataFileFactory.addContainer(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.store.raw.xact.Xact.addContainer(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.store.access.heap.Heap.create(Unknown
Source) ~[derby.jar:na]
   at 
org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.createConglomerate(Unknown
Source) ~[derby.jar:na]
   at 
org.apache.derby.impl.store.access.RAMTransaction.createConglomerate(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.sql.execute.TemporaryRowHolderImpl.insert(Unknown
Source) ~[derby.jar:na]
   at 
org.apache.derby.impl.sql.execute.UpdateResultSet.collectAffectedRows(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.sql.execute.UpdateResultSet.open(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown
Source) ~[derby.jar:na]
   at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source) ~[derby.jar:na]
   ... 41 common frames omitted