Hi Thomas,

thanks for jumping in, but the issue has already been resolved. For 
details, see https://groups.google.com/forum/#!topic/h2-database/ild2GvmyaQw . 
And sorry again for the confusion, when I had originally posted this issue 
it did not show for a while, so I had reposted it, causing a redundant 
thread - this one here. The one I linked ( 
https://groups.google.com/forum/#!topic/h2-database/ild2GvmyaQw ) is the 
proper thread which also contains a stack trace.

To give you a brief summary, the message came from H2, but based on a 
DataNucleus bug. Noel was so kind to help me with some hints, so I was able 
to narrow it down. During this bug hunting process, I found another 
DataNucleus bug, even more critical, so I decided to swap out DataNucleus 
for EclipseLink. Everything works fine now.

And btw, thanks to you and the other contributors for H2. 

Cheers,
Carsten

Am Donnerstag, 9. März 2017 14:06:53 UTC+1 schrieb Thomas Mueller Graf:
>
> Hi,
>
> This exception message doesn't seem to come from H2. Probably you should 
> ask at the DataNucleus mailing list. Also, could you post the complete 
> stack trace please (they will need it).
>
> Regards,
> Thomas
>
>
>
>
> On Tuesday, March 7, 2017, Carsten Langsdorf <[email protected] 
> <javascript:>> wrote:
>
>> Sorry for having posted this twice, I wasn't aware this is moderated and 
>> thus reposted when the first post did not show up. Please use this one: 
>> https://groups.google.com/forum/#!topic/h2-database/ild2GvmyaQw
>>
>> Am Dienstag, 7. März 2017 17:12:32 UTC+1 schrieb Carsten Langsdorf:
>>>
>>> Hi everyone,
>>>
>>> I'm getting this strange error on attempting to insert a row. I already 
>>> found and read through several similar occurrences here in the forum, and 
>>> although these gave me some sort of idea about the issue, I still can't see 
>>> how to work around this.
>>>
>>> Okay, here's a more detailed sitrep:
>>>
>>> I am working on a JavaFX program that uses H2 in embedded mode to store 
>>> data in a local database (for now). I'm not using JDBC directly, but 
>>> running through JPA with DataNucleus as persistence provider.
>>>
>>> The product versions are:
>>>
>>>    - jdk1.8.0_121
>>>    - h2-1.4.193
>>>    - DataNucleus 5.0.7
>>>
>>> In one window I deal with 2 tables (seperately), basically doing CRUD 
>>> operations. Among other things there is an 'Add' button for each table - 
>>> which, of course, implements INSERTing a new record via JPA persist.
>>>
>>> One of the 2 buttons works like a charm. Using the other one, however, 
>>> raises an exception:
>>>
>>> Caused by: javax.persistence.PersistenceException: Cannot set Object 
>>> parameter: value = 0 for column "ODDLOOT.BASE.ACCOUNT.ACCOUNTTYPEID" : 
>>> Unerlaubter Wert "0" für Parameter "parameterIndex"
>>> Invalid value "0" for parameter "parameterIndex" [90008-193]
>>>
>>> At first, this misled me into thinking there is a problem with the 
>>> default value for column ODDLOOT.BASE.ACCOUNT.ACCOUNTTYPEID, as it 
>>> references another table and 0 would not be a valid value. I had not been 
>>> worrying about the default values generated by DataNucleus, because the 
>>> database itself holds defaults values for these columns, and it works 
>>> smoothly on the other table that is handled by this window. But to be sure, 
>>> I used a DataNucleus extension (@PrePersist) to even set the value 
>>> originally set by DataNucleus to 1 - which would be valid. Here's the 
>>> result:
>>>
>>> Caused by: javax.persistence.PersistenceException: Cannot set Object 
>>> parameter: value = 1 for column "ODDLOOT.BASE.ACCOUNT.ACCOUNTTYPEID" : 
>>> Unerlaubter Wert "0" für Parameter "parameterIndex"
>>> Invalid value "0" for parameter "parameterIndex" [90008-193]
>>>
>>> Thus, this is not the origin of the problem. Searching for similar 
>>> incidents told me that it is related to the numbering of parameters in 
>>> prepared statements. Obviously enough, I still have 2 issues here:
>>>
>>>    1. DataNucleus creates the prepared statements, i got no control here
>>>    2. The same thing works with the other table
>>>
>>> I already checked the code several times and most thoroughly compared 
>>> the 2 persistance classes about a dozen times - to no avail. 
>>>
>>> Any ideas/suggestions, anyone?
>>>
>>> Any help greatly appreciated.
>>>
>>> Cheers,
>>> Carsten
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to