Re: [h2] Odd UUID to BOOLEAN conversion error
I wanted to follow up on this. I did resolve the issue though the problem was entirely caused by a novice mistake on my part. I used "AND" in the SET portion of the update statement instead of ", ". so the assignments were being treated like expressions and confusing the database. original statement for reference to my error. UPDATE MARKET_GLOBAL SET BUYER =? AND BUYER_NAME =? WHERE ID =? Correct UPDATE MARKET_GLOBAL SET BUYER =?, BUYER_NAME =? WHERE ID =? On Thursday, January 21, 2021 at 5:32:49 AM UTC-5 Caltinor wrote: > I am happy to try to create a standalone test case, however that might be > easier said than done. > > As I pointed out, I replicated the code in another method, used the same > input variables, and the update statement worked. I do have another update > statement that assigns a UUID that I suspect might have the same issue. If > i can find a commonality between them that would give me enough to work > with for a test case i will certainly build that and provide it here. > > Until then, I will use CAST for this case. Thank you for your help. > > On Thursday, January 21, 2021 at 5:02:46 AM UTC-5 Noel Grandin wrote: > >> That smells like the kind of bug that H2 sometimes has with determining >> the type of a parameter in a PreparedStatement. >> >> Normally it can be worked around by using CAST around the ? so that H2 >> knows exactly what type to use there. >> >> Possibly we could track down the bug if you can provide a standalone >> test-case. >> > -- 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 h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/e7c42756-7a38-44a8-a1f0-8c6c536376efn%40googlegroups.com.
Re: [h2] Odd UUID to BOOLEAN conversion error
I am happy to try to create a standalone test case, however that might be easier said than done. As I pointed out, I replicated the code in another method, used the same input variables, and the update statement worked. I do have another update statement that assigns a UUID that I suspect might have the same issue. If i can find a commonality between them that would give me enough to work with for a test case i will certainly build that and provide it here. Until then, I will use CAST for this case. Thank you for your help. On Thursday, January 21, 2021 at 5:02:46 AM UTC-5 Noel Grandin wrote: > That smells like the kind of bug that H2 sometimes has with determining > the type of a parameter in a PreparedStatement. > > Normally it can be worked around by using CAST around the ? so that H2 > knows exactly what type to use there. > > Possibly we could track down the bug if you can provide a standalone > test-case. > -- 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 h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/c655efee-360b-469e-8167-1370f4f26e4en%40googlegroups.com.
Re: [h2] Odd UUID to BOOLEAN conversion error
That smells like the kind of bug that H2 sometimes has with determining the type of a parameter in a PreparedStatement. Normally it can be worked around by using CAST around the ? so that H2 knows exactly what type to use there. Possibly we could track down the bug if you can provide a standalone test-case. -- 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 h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/CAFYHVnW0hMkRm362G4BdaxeUz6C_4Jkx7fy4VW9QaNVZ7k5xMA%40mail.gmail.com.
[h2] Odd UUID to BOOLEAN conversion error
Hello Everyone, I am having a rather strange issue with an update statement. I am using a preparedstatement to execute and update statement and passing 3 parameters (UUID, String, int). when I execute the update i get this error "org.h2.jdbc.JdbcSQLDataException: Data conversion error converting "UUID to BOOLEAN"; SQL statement: UPDATE MARKET_GLOBAL SET BUYER =? AND BUYER_NAME =? WHERE ID =? [22018-200]" I have confirmed the variable being passed into the UUID is not null, and that the field type is declared as UUID. To make things more interesting, i created a new method ("test()") and replicated the code, then passed the same variables via this method and it worked. i then called the failing method within the same run instance and it failed. Here is my github with the class in reference: https://github.com/Caltinor/GnCLib/blob/main/src/dicemc/gnclib/trade/dbref/H2Impl.java I am calling executeTransaction which is failing on the first if (it works fine if the count does not equal the entry stock). another thing worth noting is i am calling getMarketList(...) before i call executeTransaction(...). Any help is greatly appreciated. -Caltinor -- 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 h2-database+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/bcb64688-bc9b-4c79-8841-0725fe2191b6n%40googlegroups.com.