-
1. H2 database boolean type problem !
shawkins Jan 13, 2011 9:42 AM (in response to chaudharygaurav)I should be able to reproduce this, can you tell me was this a dynamic vdb or was it created through Designer (and which version). Also what version of H2 is it targeting?
Steve
-
2. H2 database boolean type problem !
chaudharygaurav Jan 13, 2011 10:55 AM (in response to shawkins)Hi Steve,
This is a dynamic VDB....also the version of H2 is 1.2.143.
Thanks for replying...
-
3. H2 database boolean type problem !
shawkins Jan 13, 2011 11:36 AM (in response to chaudharygaurav)I logged https://issues.jboss.org/browse/TEIID-1435 to cover this. The fix will be in 7.3 shortly.
It looks to me like your runtime type currently should be coming in as object. When is your exception handling on insert? Is it when the source query is submitted to H2 or before then?
Steve
-
4. H2 database boolean type problem !
chaudharygaurav Jan 13, 2011 12:04 PM (in response to shawkins)Hi Steve,
Thanks for the prompt reply. This is coming when we do the executeUpdate on the PreparedStatement.
Steve, Can you please tell me where to apply this fix in 7.2? Is it the H2ExecutionFactory? The problem is that 7.3 is not available yet and as we needed it now, I can apply that change temporarily and then can take the 7.3 release when it gets available.
Thanks
-
5. H2 database boolean type problem !
shawkins Jan 13, 2011 12:38 PM (in response to chaudharygaurav)The best fix is to the teiid-common-core JDBCSQLTypeInfo class. I attached the patch to the issue. It adds the BOOLEAN SQL type mapping. After patching the class and putting the updated client jar in the server/{profile}/lib directory. You would then need to reimport the metadata so that the boolean column is appropriately detected.
If you still want to persue a workaround, could you provide the Teiid update statement you are running and the stacktrace.
Steve
-
6. H2 database boolean type problem !
chaudharygaurav Jan 13, 2011 1:26 PM (in response to shawkins)Steve, I tried building the teiid source but the tests are failing. Is there something specific I need to do or are they supposed to fail? Also, I tried skipping the tests and all the modules are building now but now the integration tests are failing. Is there any way out of this?
-
7. H2 database boolean type problem !
shawkins Jan 13, 2011 2:08 PM (in response to chaudharygaurav)What tests are failing for you? Everything built fine for me locally on Fedora 14.
-
8. H2 database boolean type problem !
rareddy Jan 13, 2011 2:09 PM (in response to chaudharygaurav)Gaurav,
I am assuming you are building on 7.2. All tests should be passing. Can you tell which tests were failing? + plaform you are running on? Also, you can skip all tests in maven by providing "-DskipTests" command. You need to execute
maven -DskipTests install -P release
and then find the built artifacts in "build/target" directory.
Ramesh..
-
9. H2 database boolean type problem !
chaudharygaurav Jan 13, 2011 4:23 PM (in response to rareddy)Hi Steve & Ramesh,
I am able to get the build running. There was something wrong with my environment only. But, the problem is, this change has not resolved the problem faced by me. I am still seeing them as NULL instead of BOOLEANS.
The change I did was to replace the line
addTypeMapping(BOOLEAN, BOOLEAN_CLASS, Types.BIT);
with
addTypeMapping(BOOLEAN, BOOLEAN_CLASS, Types.BIT, Types.BOOLEAN );
and then I built it, replaced the new teiid-7.2.0.Final-client.jar in my application.
Can you please recheck if the change is right?
Thanks
-
10. H2 database boolean type problem !
shawkins Jan 13, 2011 4:34 PM (in response to chaudharygaurav)Did you re-import your metadata? You would do this by creating a new vdb version, removing/re-adding the .vdb file on a running server, or by deleting the relevant cached metadata under {profile}/data/teiid/{vdb-file}.
Also what is indicating that the type is null? When I reproduced this issue I was seeing boolean columns getting the teiid catch all object type.
Steve
-
11. H2 database boolean type problem !
chaudharygaurav Jan 14, 2011 2:49 PM (in response to shawkins)Thanks Steve ! It works for me now.
-
12. H2 database boolean type problem !
chaudharygaurav Mar 24, 2011 5:02 PM (in response to chaudharygaurav)Hi !
I was just seeing the defect https://issues.jboss.org/browse/TEIID-1435 and saw that there is one more file changed which was not included into the patch. Should we include that as well?
Thanks
-
13. H2 database boolean type problem !
shawkins Mar 28, 2011 1:34 PM (in response to chaudharygaurav)If you didn't already get a message, see the JIRA issue. Also for such a code specific question, it's best just to ask on the JIRA.
Steve
-
14. H2 database boolean type problem !
chaudharygaurav Mar 28, 2011 2:41 PM (in response to shawkins)Thanks Steve. I saw the Jira issue