-
15. Re: Teiid 8.5 Build fails
shawkins Oct 7, 2013 8:21 AM (in response to shawkins)From what I see that should not occur with the 9.1 driver as specified in the pom as the source in the pg v3 ConnectionFactoryImpl explicitly checks for UTF8 and not UNICODE.
-
16. Re: Teiid 8.5 Build fails
rakeshsagar Oct 7, 2013 10:58 AM (in response to shawkins)Thanks Steve.
Do you want me to try anything with respect to this test case?
-
17. Re: Teiid 8.5 Build fails
shawkins Oct 7, 2013 3:17 PM (in response to rakeshsagar)Perhaps you're picking up the 9.0 or older driver somewhere in your build. Are you sure this is a clean build?
-
18. Re: Teiid 8.5 Build fails
rakeshsagar Oct 8, 2013 7:30 AM (in response to shawkins)Hi Steve,
I have the postgres 9.1 driver in my pom.xml and in my local maven repostiory.
Downloaded the source code from the downloads link and doing mvn clean package.
Thanks
Rakesh
-
19. Re: Teiid 8.5 Build fails
shawkins Oct 8, 2013 8:02 AM (in response to rakeshsagar)If you can, set a breakpoint in the v3 ConnectionFactoryImpl - http://grepcode.com/file/repo1.maven.org/maven2/postgresql/postgresql/9.1-901-1.jdbc4/org/postgresql/core/v3/ConnectionFactoryImpl.java?av=f
Notice that it not only requests UTF8 at startup, but that it also ensures that the server responds with UTF8. No where on the server side since 7.7.x do set the encoding to UNICODE.
You could also post the surefire .xml to see if there is perhaps a system property that is influencing the pg driver.
Steve
-
20. Re: Teiid 8.5 Build fails
rakeshsagar Oct 8, 2013 8:11 AM (in response to shawkins)I will try to set a breakpoint and check.
Attached is the surefire.xml.
-
21. Re: Teiid 8.5 Build fails
rakeshsagar Oct 15, 2013 2:07 AM (in response to rakeshsagar)Hi Steve,
Any update on this test case failure?
-
22. Re: Teiid 8.5 Build fails
shawkins Oct 15, 2013 7:29 AM (in response to rakeshsagar)I missed a notification for your previous posting, but as expected just modifying the system properties have no affect. With the expected pg driver and the Teiid code neither making references to setting the client_encoding to UNICODE, I can't really guess at what as going on other than a different pg driver is being used on your system.
You can debug or you can add:
URL location = Driver.class.getResource('/'+Driver.class.getName().replace('.', '/')+".class");
System.out.println(location);
into the failing test to print out the jar being used. Mine reports the expected maven jar:
jar:file:/home/shawkins/dm-3/shawkins/.m2/repository/postgresql/postgresql/9.1-901.jdbc4/postgresql-9.1-901.jdbc4.jar!/org/postgresql/Driver.class
-
23. Re: Teiid 8.5 Build fails
rakeshsagar Oct 21, 2013 6:36 AM (in response to shawkins)Hi Steve,
The following is the jar location reported by the test.
jar:file:/E:/CA_Chorus/.m2/repository/postgresql/postgresql/9.1-901.jdbc4/postgresql-9.1-901.jdbc4.jar!/org/postgresql/Driver.class
And printing the unicode from the result set is giving me "UNICODE" and not "UTF8"
Thanks
Rakesh.
-
24. Re: Teiid 8.5 Build fails
shawkins Oct 21, 2013 7:48 AM (in response to rakeshsagar)Debugging the driver/server will be the only way to track this down then. Neither their source nor ours specifies the encoding should be UNICODE, so it's not clear at all where the conversion of UTF8 to the UNICODE name is happening. Given that they are equivalent to pg I am not overly concerned, but it would be good to know why there is a platform variation.
See the ODBCServerRemoteImpl get/setEncoding methods for the primary control points where we handle the encoding.
Steve