You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kovylin Alexandr (JIRA)" <ji...@apache.org> on 2006/11/13 11:56:37 UTC
[jira] Created: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
-----------------------------------------------------------------------------------------------------------------------------
Key: DERBY-2074
URL: http://issues.apache.org/jira/browse/DERBY-2074
Project: Derby
Issue Type: Bug
Components: Newcomer
Affects Versions: 10.1.3.1
Environment: WinXP Professional, Java 1.5.0_06
Reporter: Kovylin Alexandr
Priority: Minor
12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
java.lang.NullPointerException'.; nested exception is
org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen reassigned DERBY-2074:
-----------------------------------------
Assignee: Knut Anders Hatlen
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662443#action_12662443 ]
Kathey Marsden commented on DERBY-2074:
---------------------------------------
Has there been any progress in getting a reproduction for this issue. If not, perhaps we should close it Cannot Reproduce and then reopen when we have a repro.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Priority: Minor
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12723072#action_12723072 ]
Kathey Marsden commented on DERBY-2074:
---------------------------------------
Thanks Knut for the patch. Before it is resolved, I think it would be good to change the summary on this issue to be more descriptive of the symptom.
I didn't apply the patch but the indentation looks a bit off in the diff around
+ module.setBooted();
+
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d2074-1a.diff, d2074-1b.diff, d2074-1b.stat, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Torsten Heftrich-Zoth (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720633#action_12720633 ]
Torsten Heftrich-Zoth commented on DERBY-2074:
----------------------------------------------
It seems to me after some experimenting that this item is related to synchronization and multithreading. In my scenario the error does not occur when I use the debug version or activate the proposed logging. The error occurs not on my development machine but on an 8-core server. Additionally the error occurs more often when this server is nearly idle.
As explanation I may add, that in our application two servlets are initializing nearly at the same time and are executing the same expensive statement nearly simultaneously. When only one servlet is activated the errors also does never occur.
For now it seems I could solve the problem for us. I introduced some synchronization into our code which forces the two servlets to initialize after one another.
I saved the setup which produces the error, so if you wish me to test some changes to derby or produce some log output for you, give me a hint.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Priority: Minor
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-2074) NullPointerException when two threads
load sort factory concurrently
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen resolved DERBY-2074.
---------------------------------------
Resolution: Fixed
Fix Version/s: 10.5.1.2
Merged to 10.5 and committed revision 789103.
> NullPointerException when two threads load sort factory concurrently
> --------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Fix For: 10.5.1.2, 10.6.0.0
>
> Attachments: d2074-1a.diff, d2074-1b.diff, d2074-1b.stat, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721736#action_12721736 ]
Knut Anders Hatlen commented on DERBY-2074:
-------------------------------------------
It looks like the problem is that TopService.bootModule() adds the new module to the vector moduleInstances before it boots the module. So when another thread concurrently checks if the module is available, it finds it in moduleInstances and uses it before it is properly initialized.
I thought swapping the order (boot first, then add to the vector) was a possible solution, but that resulted in lots of assert failures during boot.
All the traversal of moduleInstances is synchronized on the TopService instance, except the code that adds and boots the module. If that code is moved inside one of the synchronized blocks, the NPE goes away. There may be a good reason why that code is not synchronized, but I cannot find anything about it in the comments. I'll investigate more.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-2074:
--------------------------------------
Derby Info: [Patch Available]
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d2074-1a.diff, d2074-1b.diff, d2074-1b.stat, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Torsten Heftrich-Zoth (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720021#action_12720021 ]
Torsten Heftrich-Zoth commented on DERBY-2074:
----------------------------------------------
We experience this error on some installations at our customers. The error occurs only directly after starting the software during initialization. Problem is that it's not always reproducible, only about every third startup. Now I am able to reproduce it on a test system at our site as well. Is there a possibility for me to activate some logging or using a debug version of derby to shed some light on the problem? The error also occurs with one database only. This DB has a size of about 100MB. The statement that is causing the problem is always the same. It is joining two large tables, but the output of the statement would be no row at all. Currently we are using 10.5.1.1, but we had the same error with 10.3.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Priority: Minor
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2074) NullPointerException when two threads
load sort factory concurrently
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-2074:
--------------------------------------
Summary: NullPointerException when two threads load sort factory concurrently (was: Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work))
Thanks Kathey. I changed the summary to better describe the symptoms. As to the indentation, if you view the patch with tab size 4, as it is used in the code, I think the added code will line up with the surrounding code.
> NullPointerException when two threads load sort factory concurrently
> --------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d2074-1a.diff, d2074-1b.diff, d2074-1b.stat, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) NullPointerException when two
threads load sort factory concurrently
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780446#action_12780446 ]
Kathey Marsden commented on DERBY-2074:
---------------------------------------
I am working with a user who may have hit this issue on 10.3. The trace does indeed look quite similar. I tried changing the reproduction to use a regular database instead of in memory and could not get the issue to reproduce on 10.3. The fix itself ported easily, so I think I will just merge the code fix, check it in and see if it fixes their problem.
> NullPointerException when two threads load sort factory concurrently
> --------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Fix For: 10.5.2.0, 10.6.0.0
>
> Attachments: d2074-1a.diff, d2074-1b.diff, d2074-1b.stat, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720083#action_12720083 ]
Knut Anders Hatlen commented on DERBY-2074:
-------------------------------------------
Hi Torsten,
There are some things you could try initially:
1) Use a debug build of Derby 10.5.1.1 (available from the download site - http://db.apache.org/derby/releases/release-10.5.1.1.cgi) which performs some extra sanity checks and may provide a more useful error message.
2) Set the properties derby.language.logStatementText and derby.language.logQueryPlan to true and post the plan for the problematic query (can be found in derby.log). See if the same plan is used when it fails and when it succeeds. If the plans differ, that may give a hint as to what's causing it.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Priority: Minor
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kathey Marsden updated DERBY-2074:
----------------------------------
Component/s: (was: Newcomer)
Store
This is a very old bug. It was in component newcomer instead of store so didn't show up in the normal code bugs report. Do you have any information on how to reproduce? If not I will close it CannotReproduce.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Priority: Minor
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2074) NullPointerException when two threads
load sort factory concurrently
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-2074:
--------------------------------------
Derby Info: (was: [Patch Available])
Fix Version/s: 10.6.0.0
Committed to trunk with revision 788670.
I'll keep the issue open until the fix has been merged to the 10.5 branch.
> NullPointerException when two threads load sort factory concurrently
> --------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Fix For: 10.6.0.0
>
> Attachments: d2074-1a.diff, d2074-1b.diff, d2074-1b.stat, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-2074:
--------------------------------------
Attachment: d2074-1a.diff
Here's an alternative fix (d2047-1a.diff). I'm not able to reproduce the bug when it's applied, and replication also works with this change. Will run the full regression test suite to see if it introduces any other problems, and I'll also see if I can add a JUnit test case.
In this patch, I've added a flag to ModuleInstance to indicate whether or not the instance has finished booting. TopService.bootModule() checks this flag when it walks through the moduleInstances list looking for an already booted instance to use, and skips the module instance if it isn't fully booted. This fixes the bug since the code that failed because the module was only partly initialized, will no longer be called unless it's fully initialized.
In the cases where we'd get a NullPointerException before, we'll now create and boot two separate instances of the module. But there's already a window in which it is possible to end up booting two instances of the same module (because we drop the synchronization while booting) and it is correctly handled by the existing code, so widening the window shouldn't cause any problems. TopService.bootModule() handles it by checking if someone else successfully added an instance while we were initializing ours. If so, our instance will be discarded and we'll fall back to the other newly created instance.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d2074-1a.diff, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12722566#action_12722566 ]
Knut Anders Hatlen commented on DERBY-2074:
-------------------------------------------
Booting inside the synchronized block is at least problematic for replication, since SlaveDatabase.boot() creates a new thread (SlaveDatabaseBootThread) and waits for it to finish. SlaveDatabaseBootThread will also attempt to boot the database in order to perform recovery, but it's blocked because the main thread holds the synchronization lock. Both threads are waiting for each other, so we have a deadlock.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-2074:
--------------------------------------
Attachment: d2074-1b.stat
d2074-1b.diff
Attaching patch 1b which is 1a + test case. The test case fails occasionally without the fix (more frequently on multi-core machines). It looks like it fails even less frequently if it's run as part of a test suite than if it's run standalone, but it does fail in that context too. I haven't seen it fail with the fix applied.
All the regression tests passed with the 1a patch.
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: d2074-1a.diff, d2074-1b.diff, d2074-1b.stat, LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-2074) Several times exception from derby
implementation was thrown (were unable to eproduce and check if it caused
by any our work)
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-2074:
--------------------------------------
Attachment: LoadSorter.java
Thanks for that extra info, Torsten. I managed to create a small app that reliably reproduces the issue in my environment (quad core, OpenSolaris 2009.06, JDK 6u13) by executing a SELECT COUNT(DISTINCT...)) statement in ten parallel threads. Seems like there's a race condition of some kind the first time a SortFactory is loaded.
The stack trace on trunk with debug enabled is:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:399)
at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(RAMAccessManager.java:883)
at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(RAMAccessManager.java:693)
at org.apache.derby.impl.store.access.RAMTransaction.createSort(RAMTransaction.java:1695)
at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(DistinctScalarAggregateResultSet.java:362)
at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(DistinctScalarAggregateResultSet.java:144)
at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(ProjectRestrictResultSet.java:168)
at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(BasicNoPutResultSetImpl.java:248)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:416)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:297)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1235)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1648)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java:270)
at LoadSorter$1.run(LoadSorter.java:21)
at java.lang.Thread.run(Thread.java:619)
> Several times exception from derby implementation was thrown (were unable to eproduce and check if it caused by any our work)
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2074
> URL: https://issues.apache.org/jira/browse/DERBY-2074
> Project: Derby
> Issue Type: Bug
> Components: Store
> Affects Versions: 10.1.3.1
> Environment: WinXP Professional, Java 1.5.0_06
> Reporter: Kovylin Alexandr
> Priority: Minor
> Attachments: LoadSorter.java
>
>
> 12:34:45,323 ERROR [pool-1-thread-3] history.helpers.HistoryDataAccessHelper - failed to read measurements, filter = (fromTime=Mon Nov 06 12:34:00 MSK 2006, toTime=Mon Nov 13 12:34:00 MSK 2006, , properties=2-6-2-value) org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT COUNT(DISTINCT sshis.measurement_time) FROM sshis_property_measurement sshis INNER JOIN sstmp_filter_3 filtertbl ON sshis.property_id = filtertbl.property_id WHERE sshis.measurement_time >= ? AND sshis.measurement_time < ?]; SQL state [XJ001]; error code [0]; Java exception:':
> java.lang.NullPointerException'.; nested exception is
> org.apache.derby.impl.jdbc.EmbedSQLException: Java exception: ': java.lang.NullPointerException'.
> java.lang.NullPointerException
> at java.util.Hashtable.put(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.registerAccessMethod(Unknown Source)
> at org.apache.derby.impl.store.access.RAMAccessManager.findMethodFactoryByImpl(Unknown Source)
> at org.apache.derby.impl.store.access.RAMTransaction.createSort(UnknownSource)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.loadSorter(Unknown Source)
> at org.apache.derby.impl.sql.execute.DistinctScalarAggregateResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
> at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(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.EmbedPreparedStatement.executeStatement(Unknown Source)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:535)
> at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:476)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:528)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:561)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:579)
> at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:589)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:619)
> at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
> at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.MeasurementsSaveGetHelper.getMeasurements(MeasurementsSaveGetHelper.java:81)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:315)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper$7.doInTransaction(HistoryDataAccessHelper.java:314)
> at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:117)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.helpers.HistoryDataAccessHelper.getMeasurements(HistoryDataAccessHelper.java:313)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.executeTask(MeasurementsReadTask.java:127)
> at com.meshnetics.wsn.ctrl.dispatcher.services.history.asyncread.MeasurementsReadTask.run(MeasurementsReadTask.java:97)
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.