Issue Details (XML | Word | Printable)

Key: NUCRDBMS-587
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Julian Schillinger
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

Detaching class with Date field persisted as VARCHAR causes exception of concurrent access.

Created: 20/Apr/12 10:27 AM   Updated: 14/May/12 07:45 PM   Resolved: 22/Apr/12 08:43 AM
Component/s: None
Affects Version/s: 3.0.9, 3.1.0.m2
Fix Version/s: 3.0.10, 3.1.0.m3

File Attachments: 1. Zip Archive DNTestCaseDates.zip (5 kB)
2. Zip Archive pm_per_request_test.zip (4 kB)

Environment: Ubuntu Linux 11.10, Mysql Server 5.1.61, mysql-connnector-java-5.1.19, OpenJDK 1.6.42

Datastore: MySQL
Severity: Production


 Description  « Hide
Exception is thrown when 2 threads concurrently detach classes which have a Date field persisted as VARCHAR. No error occurs without the concurrency (ie only 1 thread). The exception thrown varies from time to time but seems to relate to the input being given to the date parsing not being in a readable format. It either says it is an empty string or random characters. Please accept my apologies in case this is not a bug and caused by incorrect use of the platform.

Test case attached. Reproduce error as follows: (1) Create database, (2) Run schema tool, (3) Run Main.java with user input "1" to set up test rows, (4) Run with user input "2" to throw exception.

Stacktrace:
12/04/20 16:07:35 INFO DataNucleus.General: >> Running test
12/04/20 16:07:36 INFO DataNucleus.General: Start Thread 1
12/04/20 16:07:36 INFO DataNucleus.General: Start Thread 2
12/04/20 16:07:36 INFO DataNucleus.Query: Reading in results for query "SELECT FROM org.objs.AssetValue" since the connection used is closing
12/04/20 16:07:36 INFO DataNucleus.Query: Reading in results for query "SELECT FROM org.objs.AssetValue" since the connection used is closing
Exception in thread "Thread-1" javax.jdo.JDOUserException: Exception thrown while loading remaining rows of query
at org.datanucleus.api.jdo.JDOAdapter.getUserExceptionForException(JDOAdapter.java:1088)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:269)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.testcase.Main$1.run(Main.java:100)
NestedThrowablesStackTrace:
java.lang.NumberFormatException: For input string: "16339.E163392E"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242)
at java.lang.Double.parseDouble(Double.java:527)
at java.text.DigitList.getDouble(DigitList.java:168)
at java.text.DecimalFormat.parse(DecimalFormat.java:1320)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1935)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1281)
at java.text.DateFormat.parse(DateFormat.java:352)
at org.datanucleus.store.rdbms.mapping.CharRDBMSMapping.getObject(CharRDBMSMapping.java:503)
at org.datanucleus.store.mapped.mapping.SingleFieldMapping.getObject(SingleFieldMapping.java:216)
at org.datanucleus.store.rdbms.fieldmanager.ResultSetGetter.fetchObjectField(ResultSetGetter.java:176)
at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:2228)
at org.objs.AssetValue.jdoReplaceField(AssetValue.java)
at org.objs.AssetValue.jdoReplaceFields(AssetValue.java)
at org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:1931)
at org.datanucleus.store.rdbms.query.PersistentClassROF$1.fetchFields(PersistentClassROF.java:485)
at org.datanucleus.state.JDOStateManager.loadFieldValues(JDOStateManager.java:767)
at org.datanucleus.state.JDOStateManager.initialiseForHollow(JDOStateManager.java:211)
at org.datanucleus.state.ObjectProviderFactory.newForHollowPopulated(ObjectProviderFactory.java:88)
at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2794)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForApplicationId(PersistentClassROF.java:480)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:371)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:172)
at org.datanucleus.store.rdbms.query.ForwardQueryResult$QueryResultIterator.next(ForwardQueryResult.java:376)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.processNumberOfResults(ForwardQueryResult.java:134)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:155)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:257)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.testcase.Main$1.run(Main.java:100)
Exception in thread "Thread-2" javax.jdo.JDOUserException: Exception thrown while loading remaining rows of query
at org.datanucleus.api.jdo.JDOAdapter.getUserExceptionForException(JDOAdapter.java:1088)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:269)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.testcase.Main$2.run(Main.java:114)
NestedThrowablesStackTrace:
java.lang.NumberFormatException: For input string: "16339.E163392E2"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1242)
at java.lang.Double.parseDouble(Double.java:527)
at java.text.DigitList.getDouble(DigitList.java:168)
at java.text.DecimalFormat.parse(DecimalFormat.java:1320)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1935)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1281)
at java.text.DateFormat.parse(DateFormat.java:352)
at org.datanucleus.store.rdbms.mapping.CharRDBMSMapping.getObject(CharRDBMSMapping.java:503)
at org.datanucleus.store.mapped.mapping.SingleFieldMapping.getObject(SingleFieldMapping.java:216)
at org.datanucleus.store.rdbms.fieldmanager.ResultSetGetter.fetchObjectField(ResultSetGetter.java:176)
at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:2228)
at org.objs.AssetValue.jdoReplaceField(AssetValue.java)
at org.objs.AssetValue.jdoReplaceFields(AssetValue.java)
at org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:1931)
at org.datanucleus.store.rdbms.query.PersistentClassROF$1.fetchFields(PersistentClassROF.java:485)
at org.datanucleus.state.JDOStateManager.loadFieldValues(JDOStateManager.java:767)
at org.datanucleus.state.JDOStateManager.initialiseForHollow(JDOStateManager.java:211)
at org.datanucleus.state.ObjectProviderFactory.newForHollowPopulated(ObjectProviderFactory.java:88)
at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2794)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForApplicationId(PersistentClassROF.java:480)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:371)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:172)
at org.datanucleus.store.rdbms.query.ForwardQueryResult$QueryResultIterator.next(ForwardQueryResult.java:376)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.processNumberOfResults(ForwardQueryResult.java:134)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:155)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:257)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.testcase.Main$2.run(Main.java:114)


 

Sort Order: Ascending order - Click to sort in descending order
Julian Schillinger added a comment - 20/Apr/12 10:29 AM
Testcase

Andy Jefferson added a comment - 20/Apr/12 07:26 PM
I would never expect multi-threaded access on a *PM* to work reliably. The docs does say that a PM is not, in general, multithreaded (a PMF is clearly). The PMF prop "javax.jdo.option.Multithreaded" is a hint only that the user may want to do such things, and you haven't specified that either.

Other persistence solutions (e.g Hibernate) don't even attempt to provide such multithreaded access on their equivalent object, and JPA doesn't support it.

I ran the test and all ran fine fwiw.

Julian Schillinger added a comment - 20/Apr/12 09:27 PM
Thank you very much for the quick response. Do I understand correctly that in order to get this to work I need to do one of the following?
1) Set javax.jdo.option.Multithreaded to true (I understand this is not necessarily recommended)
2) Make sure each thread has its own instance of PMF of which I get a new PM for each thread.

Is there a pattern to do this in the context of a web application with Spring Transactions? I guess the scope of the beans would need to be set accordingly.

Julian Schillinger added a comment - 20/Apr/12 10:17 PM
For avoidance of doubt:
1) I dont get the error if each thread has his own PMF.
2) If I have a single static PMF and each thread gets its own PM, I still see the error. (see below)
Not sure whether this is in line with your expectation. Please advice.


static PersistenceManagerFactory pmf;
...
pmf = JDOHelper.getPersistenceManagerFactory("datanucleus.properties");

// set up threads to simulate concurrent access
Thread thread1 = new Thread() {
public void run() {
PersistenceManager pm = pmf.getPersistenceManager();
NucleusLogger.GENERAL.info("Start Thread 1");
Query q = pm.newQuery(AssetValue.class);
...

[same for thread 2]


12/04/21 04:11:31 INFO DataNucleus.Query: Reading in results for query "SELECT FROM org.objs.AssetValue" since the connection used is closing
12/04/21 04:11:31 INFO DataNucleus.Query: Reading in results for query "SELECT FROM org.objs.AssetValue" since the connection used is closing
Exception in thread "Thread-2" javax.jdo.JDOUserException: Exception thrown while loading remaining rows of query
at org.datanucleus.api.jdo.JDOAdapter.getUserExceptionForException(JDOAdapter.java:1088)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:269)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)


Andy Jefferson added a comment - 21/Apr/12 08:55 AM
I said the PMF is thread-safe (as do the docs), so creating multiple PMF's is clearly unnecessary, and since all docs say creating a PMF is expensive then equally unnecessary. Any test that actually isolates a PM to a particular thread passes (for me), and indeed attached is your test but with PM per thread. It works.

The test also demonstrates how a testcase is supposed to be structured to follow the problem reporting guide

Andy Jefferson added a comment - 21/Apr/12 08:55 AM
PM per thread works as designed.

Julian Schillinger added a comment - 21/Apr/12 09:35 AM
Hi Andy, again thank you very much for your quick reply. Unfortunately I get the same error running YOUR testcase. I had to run it twice to have sufficient rows created in the database for the problem to occur. Maybe you can run it again with lets say 10000 rows created to be safe. Stacktrace is below. I ran it on a second machine (same configuration) with same results. What environment are you using maybe that makes the difference? Could it have to do with my machine locale (Hong Kong) or OpenJDK? Thanks

12/04/21 15:30:52 INFO DataNucleus.General: >> Start Thread 1
12/04/21 15:30:52 INFO DataNucleus.Query: Reading in results for query "SELECT FROM org.datanucleus.test.AssetValue" since the connection used is closing
12/04/21 15:30:52 INFO DataNucleus.General: >> Start Thread 2
12/04/21 15:30:52 INFO DataNucleus.Query: Reading in results for query "SELECT FROM org.datanucleus.test.AssetValue" since the connection used is closing
12/04/21 15:30:52 ERROR DataNucleus.General: >> Error in thread 2
javax.jdo.JDOUserException: Exception thrown while loading remaining rows of query
at org.datanucleus.api.jdo.JDOAdapter.getUserExceptionForException(JDOAdapter.java:1088)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:269)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.datanucleus.test.Main$2.run(Main.java:85)
NestedThrowablesStackTrace:
java.lang.NumberFormatException: multiple points
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1102)
at java.lang.Double.parseDouble(Double.java:527)
at java.text.DigitList.getDouble(DigitList.java:168)
at java.text.DecimalFormat.parse(DecimalFormat.java:1320)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1561)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1281)
at java.text.DateFormat.parse(DateFormat.java:352)
at org.datanucleus.store.rdbms.mapping.CharRDBMSMapping.getObject(CharRDBMSMapping.java:503)
at org.datanucleus.store.mapped.mapping.SingleFieldMapping.getObject(SingleFieldMapping.java:216)
at org.datanucleus.store.rdbms.fieldmanager.ResultSetGetter.fetchObjectField(ResultSetGetter.java:176)
at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:2228)
at org.datanucleus.test.AssetValue.jdoReplaceField(AssetValue.java)
at org.datanucleus.test.AssetValue.jdoReplaceFields(AssetValue.java)
at org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:1931)
at org.datanucleus.store.rdbms.query.PersistentClassROF$1.fetchFields(PersistentClassROF.java:485)
at org.datanucleus.state.JDOStateManager.loadFieldValues(JDOStateManager.java:767)
at org.datanucleus.state.JDOStateManager.initialiseForHollow(JDOStateManager.java:211)
at org.datanucleus.state.ObjectProviderFactory.newForHollowPopulated(ObjectProviderFactory.java:88)
at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2794)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForApplicationId(PersistentClassROF.java:480)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:371)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:172)
at org.datanucleus.store.rdbms.query.ForwardQueryResult$QueryResultIterator.next(ForwardQueryResult.java:376)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.processNumberOfResults(ForwardQueryResult.java:134)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:155)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:257)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.datanucleus.test.Main$2.run(Main.java:85)
12/04/21 15:30:52 ERROR DataNucleus.General: >> Error in thread 1
javax.jdo.JDOUserException: Exception thrown while loading remaining rows of query
at org.datanucleus.api.jdo.JDOAdapter.getUserExceptionForException(JDOAdapter.java:1088)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:269)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.datanucleus.test.Main$1.run(Main.java:59)
NestedThrowablesStackTrace:
java.lang.NumberFormatException: multiple points
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1102)
at java.lang.Double.parseDouble(Double.java:527)
at java.text.DigitList.getDouble(DigitList.java:168)
at java.text.DecimalFormat.parse(DecimalFormat.java:1320)
at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1935)
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1281)
at java.text.DateFormat.parse(DateFormat.java:352)
at org.datanucleus.store.rdbms.mapping.CharRDBMSMapping.getObject(CharRDBMSMapping.java:503)
at org.datanucleus.store.mapped.mapping.SingleFieldMapping.getObject(SingleFieldMapping.java:216)
at org.datanucleus.store.rdbms.fieldmanager.ResultSetGetter.fetchObjectField(ResultSetGetter.java:176)
at org.datanucleus.state.AbstractStateManager.replacingObjectField(AbstractStateManager.java:2228)
at org.datanucleus.test.AssetValue.jdoReplaceField(AssetValue.java)
at org.datanucleus.test.AssetValue.jdoReplaceFields(AssetValue.java)
at org.datanucleus.state.JDOStateManager.replaceFields(JDOStateManager.java:1931)
at org.datanucleus.store.rdbms.query.PersistentClassROF$1.fetchFields(PersistentClassROF.java:485)
at org.datanucleus.state.JDOStateManager.loadFieldValues(JDOStateManager.java:767)
at org.datanucleus.state.JDOStateManager.initialiseForHollow(JDOStateManager.java:211)
at org.datanucleus.state.ObjectProviderFactory.newForHollowPopulated(ObjectProviderFactory.java:88)
at org.datanucleus.ObjectManagerImpl.findObject(ObjectManagerImpl.java:2794)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObjectForApplicationId(PersistentClassROF.java:480)
at org.datanucleus.store.rdbms.query.PersistentClassROF.getObject(PersistentClassROF.java:371)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:172)
at org.datanucleus.store.rdbms.query.ForwardQueryResult$QueryResultIterator.next(ForwardQueryResult.java:376)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.processNumberOfResults(ForwardQueryResult.java:134)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:155)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:257)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:108)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:96)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:704)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:475)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:75)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:305)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:794)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1789)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1666)
at org.datanucleus.store.query.Query.execute(Query.java:1639)
at org.datanucleus.api.jdo.JDOQuery.execute(JDOQuery.java:221)
at org.datanucleus.test.Main$1.run(Main.java:59)
12/04/21 15:30:52 INFO DataNucleus.General: >> Stop Thread 2
12/04/21 15:30:52 INFO DataNucleus.General: >> Stop Thread 1
  

Julian Schillinger added a comment - 21/Apr/12 09:42 AM
Just checked: same problem with Sun JRE

Julian Schillinger added a comment - 21/Apr/12 09:48 AM
What does this line in the log mean? Why would the connection be closing?
12/04/21 15:30:52 INFO DataNucleus.Query: Reading in results for query "SELECT FROM org.datanucleus.test.AssetValue" since the connection used is closing

Andy Jefferson added a comment - 21/Apr/12 10:33 AM
since i don't see it and you do then hard to say. The only thing I see wrong with CharRDBMSMapping is that it uses a SimpleDateFormat that isn't synced or per-thread. This is now changed in SVN trunk. Left for you to test it

Julian Schillinger added a comment - 21/Apr/12 11:11 AM
Hi Any, I understand you were not able to see the error, even running multiple times / with more rows. Tomorrow's nightly build jars would have the change and I could use them for test, right?

Julian Schillinger added a comment - 21/Apr/12 01:46 PM
I built the new JARs based on latest SVN trunk and it seems to fix the issue. Thank you for your support.