Thread: Having issues with tests
I recently forked Postgresql JDBC to use some unsafe methods to get char arrays
This was before:
41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement
41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement
41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement
41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement
41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement
41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement
41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>
41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>
41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>
41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>
41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>
41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>
41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>
40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery
40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery
40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)
I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the after
Even before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)
1. This is obvious I can fix myself:
\build.xml (The system cannot find the file specified)
java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)
at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)
2. This is obvious I can fix myself
\build.xml (The system cannot find the file specified)
java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)
at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)
3. No clue
expected [0] but found [-1]
java.lang.AssertionError: expected [0] but found [-1]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertEquals(Assert.java:123)
at org.testng.Assert.assertEquals(Assert.java:370)
at org.testng.Assert.assertEquals(Assert.java:380)
at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)
4. This one is weird if I run it separate it works
ERROR: could not determine data type of parameter $1
org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)
5. This one is weird if I run it separate it works
ERROR: could not determine data type of parameter $1
org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)
at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)
5. This is obvious
Large Objects may not be used in auto-commit mode.
org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)
at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)
at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)
at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)
at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)
6. No clue
ERROR: column "bin" is of type bytea but expression is of type oid
Hint: You will need to rewrite or cast the expression.
Position: 43
org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oid
Hint: You will need to rewrite or cast the expression.
Position: 43
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)
at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)
at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)
7. No clue
Should have failed with type mismatch.
java.lang.AssertionError: Should have failed with type mismatch.
at org.testng.Assert.fail(Assert.java:94)
at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)
8. No clue
ERROR: column "data" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 46
org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 46
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)
at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)
at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)
9. No clue
ERROR: column "data" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 46
org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 46
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)
at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)
at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)
10. No clue
ERROR: column "data" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 41
org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 41
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)
at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)
11. No clue
ERROR: invalid input syntax for integer: "test string"
org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)
at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)
12. Not gonna fix yet
Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your class
org.testng.TestNGException:
Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your class
at org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)
13. No clue
ERROR: column "bin" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 65
org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
Position: 65
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)
at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)
If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installed
Connection properties are set in src/test/resources/test.properties
My repo: https://github.com/RapidTransit/postgres
What version of postgres are you running this on ?
On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:
I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
Version 9.3.4
-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with tests
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with tests
What version of postgres are you running this on ?
On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:
I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
I run the tests regularly using ant -lib lib test and it runs fine. Have you tried that ?
On 24 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:
Version 9.3.4-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with testsWhat version of postgres are you running this on ?On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
Unfortunately I can't figure out how to get Ant to work, I have only been exposed to Maven and Gradle
-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 11:32 am
Subject: Re: [JDBC] Having issues with tests
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 11:32 am
Subject: Re: [JDBC] Having issues with tests
I run the tests regularly using ant -lib lib test and it runs fine. Have you tried that ?
On 24 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:
Version 9.3.4-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with testsWhat version of postgres are you running this on ?On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
download it and run ant -lib lib test
On 24 November 2014 at 13:14, <rapidtransit440@aol.com> wrote:
Unfortunately I can't figure out how to get Ant to work, I have only been exposed to Maven and Gradle-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>Sent: Mon, Nov 24, 2014 11:32 am
Subject: Re: [JDBC] Having issues with testsI run the tests regularly using ant -lib lib test and it runs fine. Have you tried that ?On 24 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:Version 9.3.4-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with testsWhat version of postgres are you running this on ?On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
Hi,
It seems difficult to help you on that case as its impossible to find the version you forked from and diffs you've made. Your git repo has no ref in common with our master repo and your fork seems to be old (source copyright year states 2011). Moreover, the unified diff between your sources and current pgjdbc master shows more than 26000 additions/deletions.
AlexisIt seems difficult to help you on that case as its impossible to find the version you forked from and diffs you've made. Your git repo has no ref in common with our master repo and your fork seems to be old (source copyright year states 2011). Moreover, the unified diff between your sources and current pgjdbc master shows more than 26000 additions/deletions.
2014-11-24 17:31 GMT+01:00 Dave Cramer <pg@fastcrypt.com>:
I run the tests regularly using ant -lib lib test and it runs fine. Have you tried that ?On 24 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:Version 9.3.4-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with testsWhat version of postgres are you running this on ?On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
I downloaded the sources from here: http://jdbc.postgresql.org/download.html version
9.3-1102 .I didn't realize there was a git repository until a few days later. I thought I had downloaded the latest stable? I'll try running the Ant task with in Gradle (Because it seems like some sort of dependency issue)
9.3-1102 .I didn't realize there was a git repository until a few days later. I thought I had downloaded the latest stable? I'll try running the Ant task with in Gradle (Because it seems like some sort of dependency issue)
I tried again with Ant, again still can't figure out how to use it.
-----Original Message-----
From: Alexis Meneses <alexis.meneses@gmail.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: rapidtransit440 <rapidtransit440@aol.com>; List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 1:33 pm
Subject: Re: [JDBC] Having issues with tests
From: Alexis Meneses <alexis.meneses@gmail.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: rapidtransit440 <rapidtransit440@aol.com>; List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 1:33 pm
Subject: Re: [JDBC] Having issues with tests
Hi,
It seems difficult to help you on that case as its impossible to find the version you forked from and diffs you've made. Your git repo has no ref in common with our master repo and your fork seems to be old (source copyright year states 2011). Moreover, the unified diff between your sources and current pgjdbc master shows more than 26000 additions/deletions.
AlexisIt seems difficult to help you on that case as its impossible to find the version you forked from and diffs you've made. Your git repo has no ref in common with our master repo and your fork seems to be old (source copyright year states 2011). Moreover, the unified diff between your sources and current pgjdbc master shows more than 26000 additions/deletions.
2014-11-24 17:31 GMT+01:00 Dave Cramer <pg@fastcrypt.com>:
I run the tests regularly using ant -lib lib test and it runs fine. Have you tried that ?On 24 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:Version 9.3.4-----Original Message-----
From: Dave Cramer <pg@fastcrypt.com>
To: rapidtransit440 <rapidtransit440@aol.com>
Cc: List <pgsql-jdbc@postgresql.org>
Sent: Mon, Nov 24, 2014 8:21 am
Subject: Re: [JDBC] Having issues with testsWhat version of postgres are you running this on ?On 23 November 2014 at 11:04, <rapidtransit440@aol.com> wrote:I recently forked Postgresql JDBC to use some unsafe methods to get char arraysThis was before:41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement41.8% - 462 ms - 4 inv. com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement41.8% - 462 ms - 4 inv. java.sql.Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Connection.prepareStatement41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4PreparedStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.Jdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc4.AbstractJdbc4Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3g.AbstractJdbc3gStatement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc3.AbstractJdbc3Statement.<init>41.8% - 462 ms - 4 inv. org.postgresql.jdbc2.AbstractJdbc2Statement.<init>40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.createParameterizedQuery40.3% - 445 ms - 4 inv. org.postgresql.core.v3.QueryExecutorImpl.parseQuery40.2% - 445 ms - 4 inv. java.lang.String.toCharArray <------(Yeah seriously)I forgot to print the after but the after, my slowest method was StringBuffer.toString() in the afterEven before and after my changes I kept getting failed tests (I skipped SSL tests for now because I still can't figure out TestNG's @Provider annotation)1. This is obvious I can fix myself:\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobsLOAPI(BlobTest.java:270)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_LOOP(BlobTest.java:119)2. This is obvious I can fix myself\build.xml (The system cannot find the file specified)java.io.FileNotFoundException: \build.xml (The system cannot find the file specified)at java.io.FileInputStream.open(Native Method)at java.io.FileInputStream.<init>(FileInputStream.java:138)at java.io.FileInputStream.<init>(FileInputStream.java:93)at org.postgresql.test.jdbc2.BlobTest.compareBlobs(BlobTest.java:312)at org.postgresql.test.jdbc2.BlobTest.testUploadBlob_NATIVE(BlobTest.java:133)3. No clueexpected [0] but found [-1]java.lang.AssertionError: expected [0] but found [-1]at org.testng.Assert.fail(Assert.java:94)at org.testng.Assert.failNotEquals(Assert.java:494)at org.testng.Assert.assertEquals(Assert.java:123)at org.testng.Assert.assertEquals(Assert.java:370)at org.testng.Assert.assertEquals(Assert.java:380)at org.postgresql.test.jdbc4.PGCopyInputStreamTest.testReadBytesCorrectlyHandlesEof(PGCopyInputStreamTest.java:45)4. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testComments(PreparedStatementTest.java:406)5. This one is weird if I run it separate it worksERROR: could not determine data type of parameter $1org.postgresql.util.PSQLException: ERROR: could not determine data type of parameter $1at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:412)at org.postgresql.test.jdbc2.PreparedStatementTest.testDollarQuotes(PreparedStatementTest.java:359)5. This is obviousLarge Objects may not be used in auto-commit mode.org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:287)at org.postgresql.largeobject.LargeObjectManager.createLO(LargeObjectManager.java:275)at org.postgresql.jdbc2.AbstractJdbc2Statement.setBinaryStream(AbstractJdbc2Statement.java:1536)at org.postgresql.jdbc2.AbstractJdbc2Statement.setAsciiStream(AbstractJdbc2Statement.java:1467)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetAsciiStream(PreparedStatementTest.java:175)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetAsciiStream(PreparedStatementTest.java:79)6. No clueERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type oidHint: You will need to rewrite or cast the expression.Position: 43at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.PreparedStatementTest.doSetBinaryStream(PreparedStatementTest.java:168)at org.postgresql.test.jdbc2.PreparedStatementTest.testSetBinaryStream(PreparedStatementTest.java:58)7. No clueShould have failed with type mismatch.java.lang.AssertionError: Should have failed with type mismatch.at org.testng.Assert.fail(Assert.java:94)at org.postgresql.test.jdbc2.PreparedStatementTest.testUnknownSetObject(PreparedStatementTest.java:768)8. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBasicFetch(ServerCursorTest.java:54)9. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 46at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerCursorTest.createRows(ServerCursorTest.java:46)at org.postgresql.test.jdbc2.ServerCursorTest.testBinaryFetch(ServerCursorTest.java:73)10. No clueERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41org.postgresql.util.PSQLException: ERROR: column "data" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 41at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testBytea(ServerPreparedStmtTest.java:230)11. No clueERROR: invalid input syntax for integer: "test string"org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: "test string"at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:311)at org.postgresql.test.jdbc2.ServerPreparedStmtTest.testTypeChange(ServerPreparedStmtTest.java:286)12. Not gonna fix yetCan't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classorg.testng.TestNGException:Can't invoke public void org.postgresql.test.ssl.SslTest.runTest() throws java.lang.Throwable: either make it static or add a no-args constructor to your classat org.testng.internal.Utils.checkInstanceOrStatic(Utils.java:795)13. No clueERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65org.postgresql.util.PSQLException: ERROR: column "bin" is of type bytea but expression is of type bigintHint: You will need to rewrite or cast the expression.Position: 65at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2100)at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1839)at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:249)at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:550)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:418)at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:368)at org.postgresql.jdbc2.AbstractJdbc2ResultSet.insertRow(AbstractJdbc2ResultSet.java:849)at org.postgresql.test.jdbc2.UpdateableResultTest.testUpdateStreams(UpdateableResultTest.java:225)If anyone could help it would be greatly appreciated, I used gradle so all you have to do is: "gradlew test" you don't need to have Groovy or Gradle installedConnection properties are set in src/test/resources/test.properties
On 11/26/2014 08:29 AM, rapidtransit440@aol.com wrote: > I downloaded the sources from here: > http://jdbc.postgresql.org/download.html version > 9.3-1102 .I didn't realize there was a git repository until a few days > later. Working on top of a source snapshot will cause you a great deal of pain and frustration. I strongly suggest that you clean your current build tree to remove build product files, then * cd .. * git clone https://github.com/pgjdbc/pgjdbc.git * cd pgjdbc * git checkout REL9_3_1102 * git checkout -b my-patched-rel9_3_1102 which will give you a source tree for 9.3-1102 in a new working branch. Then: * cp -r ../mypgjdbc-9.3-1102/* . which will copy the contents of your modified tree into the current git tree. You can then see what you've changed with "git status", etc. At this point you should try to organise your changes into a set of patches as one or more git commits. Once you have your changes as a separate patch, in the form of a git commit, you can then try to rebase them on top of the current development tree: * git checkout master * git cherry-pick my-patched-rel9_3_1102~0 merge any conflicts, and continue. If this all seems too hard, it might be easier to simply redo your changes on top of the current git master. It's up to you. > I thought I had downloaded the latest stable? Sure, but that's a long way behind the current development tree. You also shouldn't be doing development on top of a source snapshot tarball. Always start with a git clone. It'll make life way, way easier. > I tried again with Ant, again still can't figure out how to use it. Take a look at the README.md in the latest git tree. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services