pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
9.1 JDBC 4 driver
8+ messages / 5 participants
[nested] [flat]

* 9.1 JDBC 4 driver
@ 2012-04-25 18:58  Prasanth Reddy <dbadmin@nqadmin.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Prasanth Reddy @ 2012-04-25 18:58 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

We have been using 8.4 jdbc3 driver. Recently we have upgraded it to 9.1-901 JDBC 4 jar.  I am getting an error message (org.postgresql.util.PSQLException: Bad value for type int : 2618079772) while
updating some columns. The column I am updating is a date column and I am using updateDate function of the rowset. Did some google search and found a really old post
(http://archives.postgresql.org/pgsql-jdbc/2007-03/msg00029.php) that talked about oid being returned as Integer and causing this problem when the oid is too big. Below I am including the stack trace.

I have reverted to 8.4 jdbc3 driver and the same code works fine.  So is this a bug in jdbc4?

Thanks,
Prasanth

org.postgresql.util.PSQLException: Bad value for type int : 2618079772
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toInt(AbstractJdbc2ResultSet.java:2731)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:1983)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaData.fetchFieldMetaData(AbstractJdbc2ResultSetMetaData.java:242)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSetMetaData.getBaseColumnName(AbstractJdbc2ResultSetMetaData.java:179)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateValue(AbstractJdbc2ResultSet.java:2924)
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateDate(AbstractJdbc2ResultSet.java:1097)
    at com.sun.rowset.JdbcRowSetImpl.updateDate(JdbcRowSetImpl.java:2489)
    at com.sun.rowset.JdbcRowSetImpl.updateDate(JdbcRowSetImpl.java:2869)
    at com.nqadmin.swingSet.datasources.SSJdbcRowSetImpl.updateDate(SSJdbcRowSetImpl.java:697)
    at com.nqadmin.swingSet.formatting.SSFormattedTextField.updateRowSet(SSFormattedTextField.java:893)
    at com.nqadmin.swingSet.formatting.SSFormattedTextField.updateFieldValue(SSFormattedTextField.java:822)
    at com.nqadmin.swingSet.formatting.SSFormattedTextField.access$0(SSFormattedTextField.java:793)
    at com.nqadmin.swingSet.formatting.SSFormattedTextField$internalVerifier.verify(SSFormattedTextField.java:751)
    at javax.swing.InputVerifier.shouldYieldFocus(InputVerifier.java:132)
    at javax.swing.JComponent$1.acceptRequestFocus(JComponent.java:3589)
    at java.awt.Component.isRequestFocusAccepted(Component.java:7728)
    at java.awt.Component.requestFocusHelper(Component.java:7610)
    at java.awt.Component.requestFocusHelper(Component.java:7603)
    at java.awt.Component.requestFocus(Component.java:7411)
    at javax.swing.JComponent.requestFocus(JComponent.java:1476)
    at javax.swing.text.DefaultCaret.adjustFocus(DefaultCaret.java:530)
    at javax.swing.text.DefaultCaret.adjustCaretAndFocus(DefaultCaret.java:503)
    at javax.swing.text.DefaultCaret.mousePressed(DefaultCaret.java:492)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.Component.processMouseEvent(Component.java:6502)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6270)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2713)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
    at java.awt.EventQueue.access$000(EventQueue.java:101)
    at java.awt.EventQueue$3.run(EventQueue.java:666)
    at java.awt.EventQueue$3.run(EventQueue.java:664)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:680)
    at java.awt.EventQueue$4.run(EventQueue.java:678)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 9.1 JDBC 4 driver
@ 2012-04-25 19:12  Maciek Sakrejda <msakrejda@truviso.com>
  parent: Prasanth Reddy <dbadmin@nqadmin.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Maciek Sakrejda @ 2012-04-25 19:12 UTC (permalink / raw)
  To: dbadmin@nqadmin.com; +Cc: pgsql-jdbc

On Wed, Apr 25, 2012 at 11:58 AM, Prasanth Reddy <dbadmin@nqadmin.com> wrote:
> We have been using 8.4 jdbc3 driver. Recently we have upgraded it to 9.1-901 JDBC 4 jar.  I am getting an error message (org.postgresql.util.PSQLException: Bad value for type int : 2618079772) while
> updating some columns. The column I am updating is a date column and I am using updateDate function of the rowset. Did some google search and found a really old post
> (http://archives.postgresql.org/pgsql-jdbc/2007-03/msg00029.php) that talked about oid being returned as Integer and causing this problem when the oid is too big. Below I am including the stack trace.
>
> I have reverted to 8.4 jdbc3 driver and the same code works fine.  So is this a bug in jdbc4?

The follow-up to the post you linked suggests that the issue had been
fixed at the time, so it may be a different manifestation of the same
thing, but a similar-looking bug was recently fixed in git:

https://github.com/pgjdbc/pgjdbc/commit/4d60ea616eff61262721176db6e77819a23f6dc2

As far as I can tell, though, there are no official builds available
that include this fix yet, so you would have to build from source
(although given that this is a fairly serious issue *if* it does bite
you, perhaps it's time for another release?)
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 9.1 JDBC 4 driver
@ 2012-04-25 19:19  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  parent: Maciek Sakrejda <msakrejda@truviso.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Kevin Grittner @ 2012-04-25 19:19 UTC (permalink / raw)
  To: dbadmin@nqadmin.com; Maciek Sakrejda <msakrejda@truviso.com>; +Cc: pgsql-jdbc

Maciek Sakrejda <msakrejda@truviso.com> wrote:
 
> As far as I can tell, though, there are no official builds
> available that include this fix yet, so you would have to build
> from source (although given that this is a fairly serious issue
> *if* it does bite you, perhaps it's time for another release?)
 
+1
 
I keep pointing people to this page and encouraging them to upgrade
if they are on an earlier release:
 
http://jdbc.postgresql.org/download.html#current
 
If we're going to use language like that, we should be diligent
about not leaving a version there which has bugs not present in
earlier versions.
 
-Kevin



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 9.1 JDBC 4 driver
@ 2012-04-25 20:34  Prasanth Reddy <dbadmin@nqadmin.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Prasanth Reddy @ 2012-04-25 20:34 UTC (permalink / raw)
  To: pgsql-jdbc


The fix seems to coincide with the stack trace location of mine.  But in the fix added, the long value seems to be casted to int again. Wouldn't this cause problem when the value of oid has exceeded
the int range of java? Why not use long data type  for table and column variable?

It would be great if we can get a new jar with the fix.

Thanks,
Prasanth

On Wed, Apr 25, 2012 at 11:58 AM, Prasanth Reddy <dbadmin@nqadmin.com> wrote: 
> We have been using 8.4 jdbc3 driver. Recently we have upgraded it to 9.1-901 JDBC 4 jar.  I am getting an error message (org.postgresql.util.PSQLException: Bad value for type int : 2618079772) while 
> updating some columns. The column I am updating is a date column and I am using updateDate function of the rowset. Did some google search and found a really old post 
> (http://archives.postgresql.org/pgsql-jdbc/2007-03/msg00029.php) that talked about oid being returned as Integer and causing this problem when the oid is too big. Below I am including the stack trace. 
> 
> I have reverted to 8.4 jdbc3 driver and the same code works fine.  So is this a bug in jdbc4? 
 
The follow-up to the post you linked suggests that the issue had been 
fixed at the time, so it may be a different manifestation of the same 
thing, but a similar-looking bug was recently fixed in git: 
 
https://github.com/pgjdbc/pgjdbc/commit/4d60ea616eff61262721176db6e77819a23f6dc2 
 
As far as I can tell, though, there are no official builds available 
that include this fix yet, so you would have to build from source 
(although given that this is a fairly serious issue *if* it does bite 
you, perhaps it's time for another release?) 
--- 
Maciek Sakrejda | System Architect | Truviso 
 
1065 E. Hillsdale Blvd., Suite 215 
Foster City, CA 94404 
(650) 242-3500 Main 
www.truviso.com




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 9.1 JDBC 4 driver
@ 2012-04-25 20:59  Dave Cramer <pg@fastcrypt.com>
  parent: Prasanth Reddy <dbadmin@nqadmin.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Dave Cramer @ 2012-04-25 20:59 UTC (permalink / raw)
  To: dbadmin@nqadmin.com; +Cc: pgsql-jdbc

Ok,

I have tagged 902 and uploaded a jar to jdbc.postgresql.jar and
updated the download page

Please let me know if there are any issues with this jar.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Wed, Apr 25, 2012 at 4:34 PM, Prasanth Reddy <dbadmin@nqadmin.com> wrote:
>
> The fix seems to coincide with the stack trace location of mine.  But in the fix added, the long value seems to be casted to int again. Wouldn't this cause problem when the value of oid has exceeded
> the int range of java? Why not use long data type  for table and column variable?
>
> It would be great if we can get a new jar with the fix.
>
> Thanks,
> Prasanth
>
> On Wed, Apr 25, 2012 at 11:58 AM, Prasanth Reddy <dbadmin@nqadmin.com> wrote:
>> We have been using 8.4 jdbc3 driver. Recently we have upgraded it to 9.1-901 JDBC 4 jar.  I am getting an error message (org.postgresql.util.PSQLException: Bad value for type int : 2618079772) while
>> updating some columns. The column I am updating is a date column and I am using updateDate function of the rowset. Did some google search and found a really old post
>> (http://archives.postgresql.org/pgsql-jdbc/2007-03/msg00029.php) that talked about oid being returned as Integer and causing this problem when the oid is too big. Below I am including the stack trace.
>>
>> I have reverted to 8.4 jdbc3 driver and the same code works fine.  So is this a bug in jdbc4?
>
> The follow-up to the post you linked suggests that the issue had been
> fixed at the time, so it may be a different manifestation of the same
> thing, but a similar-looking bug was recently fixed in git:
>
> https://github.com/pgjdbc/pgjdbc/commit/4d60ea616eff61262721176db6e77819a23f6dc2
>
> As far as I can tell, though, there are no official builds available
> that include this fix yet, so you would have to build from source
> (although given that this is a fairly serious issue *if* it does bite
> you, perhaps it's time for another release?)
> ---
> Maciek Sakrejda | System Architect | Truviso
>
> 1065 E. Hillsdale Blvd., Suite 215
> Foster City, CA 94404
> (650) 242-3500 Main
> www.truviso.com
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 9.1 JDBC 4 driver
@ 2012-04-25 23:59  Kris Jurka <books@ejurka.com>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Kris Jurka @ 2012-04-25 23:59 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: dbadmin@nqadmin.com; pgsql-jdbc



On Wed, 25 Apr 2012, Dave Cramer wrote:

> I have tagged 902 and uploaded a jar to jdbc.postgresql.jar and
> updated the download page
> 
> Please let me know if there are any issues with this jar.

You tagged and released 9.2-dev, not the 9.1 branch.  Please undo 
immediately.  Also you need to change the driver version in 
org/postgresql/util/PSQLDriverVersion.java.

You should also try to build a JDBC3 release at the same time.

Kris Jurka



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 9.1 JDBC 4 driver
@ 2012-04-26 01:55  Dave Cramer <pg@fastcrypt.com>
  parent: Kris Jurka <books@ejurka.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Dave Cramer @ 2012-04-26 01:55 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: dbadmin@nqadmin.com; pgsql-jdbc

On Wed, Apr 25, 2012 at 7:59 PM, Kris Jurka <books@ejurka.com> wrote:
>
>
> On Wed, 25 Apr 2012, Dave Cramer wrote:
>
>> I have tagged 902 and uploaded a jar to jdbc.postgresql.jar and
>> updated the download page
>>
>> Please let me know if there are any issues with this jar.
>
> You tagged and released 9.2-dev, not the 9.1 branch.  Please undo
> immediately.  Also you need to change the driver version in
> org/postgresql/util/PSQLDriverVersion.java.
>
> You should also try to build a JDBC3 release at the same time.
>
> Kris Jurka

Whoops, should be better this time.

I will try to build a jdbc3 jar as soon as possible, probably Friday now

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: 9.1 JDBC 4 driver
@ 2012-04-26 14:50  Prasanth Reddy <dbadmin@nqadmin.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Prasanth Reddy @ 2012-04-26 14:50 UTC (permalink / raw)
  To: pgsql-jdbc

Downloaded the jar and is working great. Thanks for releasing a new jar.

Appreciate your help.

-Prasanth

On Wed, Apr 25, 2012 at 7:59 PM, Kris Jurka <books@ejurka.com> wrote:
>
>
> On Wed, 25 Apr 2012, Dave Cramer wrote:
>
>> I have tagged 902 and uploaded a jar to jdbc.postgresql.jar and
>> updated the download page
>>
>> Please let me know if there are any issues with this jar.
>
> You tagged and released 9.2-dev, not the 9.1 branch.  Please undo
> immediately.  Also you need to change the driver version in
> org/postgresql/util/PSQLDriverVersion.java.
>
> You should also try to build a JDBC3 release at the same time.
>
> Kris Jurka

Whoops, should be better this time.

I will try to build a jdbc3 jar as soon as possible, probably Friday now

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2012-04-26 14:50 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-04-25 18:58 9.1 JDBC 4 driver Prasanth Reddy <dbadmin@nqadmin.com>
2012-04-25 19:12 ` Maciek Sakrejda <msakrejda@truviso.com>
2012-04-25 19:19   ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-04-25 20:34 Re: 9.1 JDBC 4 driver Prasanth Reddy <dbadmin@nqadmin.com>
2012-04-25 20:59 ` Dave Cramer <pg@fastcrypt.com>
2012-04-25 23:59   ` Kris Jurka <books@ejurka.com>
2012-04-26 01:55     ` Dave Cramer <pg@fastcrypt.com>
2012-04-26 14:50 Re: 9.1 JDBC 4 driver Prasanth Reddy <dbadmin@nqadmin.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox