JDBC error in 7.0.3

Started by Travis Bauerabout 25 years ago7 messagesgeneral
Jump to latest
#1Travis Bauer
trbauer@indiana.edu

During the run of a java program connected to 7.0.3, the following
errors occurred:

insert into current_resources values (459, 0,
'http://a1829.g.akamaitech.net/6/1829/792/000/search.britannica.com/
images/storethumbs/T_CMB_HG_FDALRTP.jpg', '', '', 'not foundnot found
the requested object does not exist on this server the link you followed
is either outdated inaccurate or the server has been instructed not to let
you have it please inform the site administrator of the referring page r',
'Not Found')
ERROR: Unterminated quotes string

Error updating: insert into current_usages values (115, 459, 'trbauer',
CURRENT_TIMESTAMP, 0) -- java.sql.SQLException:
FATAL 1: Socket command type r unknown

Any subsequent attent to access the database yields:

An I/O error has occured while flushing the output - java.io.IOException:
Broken pipe

The problem is that the first insert statement is correct. Other statements
had proceeded it. Could one of them have been the problem?

Thanks,
--
----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------

#2Gilles Darold
gilles@darold.net
In reply to: Travis Bauer (#1)
Oracle to PostgreSQL

Hi all,

I am currently working on a project for a company selling materials for
building
(cement, sand, stone floor, etc) which have 2500 employees and more than 100
agencies. They are porting their old commercial apps to web based technology.
They use several Oracle database with more than 40 Gb each. We think about
porting these database to PostgreSQL and deploy one server per agency with
replication between them. I think it's a great challenge for us.

So my question: Is someone here have worked on tools to export Oracle database
complex schema to PostgreSQL. If then can you send them to me as I can
construct
a generic Oracle to PostgreSQL converter. My knowledge in Oracle is very poor,
I just know about PostgreSQL but I thinks it's more the goal of PostgreSQL
now that 7.1 is out than migrating from mySQL. So this should be a great tool.

Regards

Gilles DAROLD

#3Peter T Mount
peter@retep.org.uk
In reply to: Travis Bauer (#1)
Re: JDBC error in 7.0.3

Quoting Travis Bauer <trbauer@indiana.edu>:

During the run of a java program connected to 7.0.3, the following
errors occurred:

insert into current_resources values (459, 0,
'http://a1829.g.akamaitech.net/6/1829/792/000/search.britannica.com/
images/storethumbs/T_CMB_HG_FDALRTP.jpg', '', '', 'not foundnot found
the requested object does not exist on this server the link you followed

is either outdated inaccurate or the server has been instructed not to
let
you have it please inform the site administrator of the referring page
r',
'Not Found')
ERROR: Unterminated quotes string

Error updating: insert into current_usages values (115, 459, 'trbauer',

CURRENT_TIMESTAMP, 0) -- java.sql.SQLException:
FATAL 1: Socket command type r unknown

Any subsequent attent to access the database yields:

An I/O error has occured while flushing the output -
java.io.IOException:
Broken pipe

The problem is that the first insert statement is correct. Other
statements
had proceeded it. Could one of them have been the problem?

No, the SQL looks ok. The broken pipe exceptions seem to indicate that the
backend is dying for some reason.

If you use psql, does the connection die if you enter the same queries?

Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

#4Peter T Mount
peter@retep.org.uk
In reply to: Gilles Darold (#2)
Re: Oracle to PostgreSQL

Quoting Gilles DAROLD <gilles@darold.net>:

snip

So my question: Is someone here have worked on tools to export Oracle
database
complex schema to PostgreSQL. If then can you send them to me as I can
construct
a generic Oracle to PostgreSQL converter. My knowledge in Oracle is very
poor,
I just know about PostgreSQL but I thinks it's more the goal of
PostgreSQL
now that 7.1 is out than migrating from mySQL. So this should be a great
tool.

In the source under contrib/retep there's a few Java classes that import/export
into xml. Those classes were originally tested under Oracle 8i and PostgreSQL
7.1beta. They may help.

Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

#5Travis Bauer
trbauer@indiana.edu
In reply to: Peter T Mount (#3)
Re: JDBC error in 7.0.3

Thanks for the reply. I figured it out. The previous insert
statement before this one was including unusual character codes
as part of a string. This was confusing the postmaster, which would
stop interpreting that sql statement at that character and then
for some reason confuse the next statements as part of the
previous one. I'm not sure why this is. I fixed the problem by
having my program "wash" all strings so no unusual characters
get through. If you'd like to puruse this issue further I can
send you the offending string, but I have fixed this particular
problem for my purposes.

--
----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------

Peter T Mount (peter@retep.org.uk) wrote:

Show quoted text

Quoting Travis Bauer <trbauer@indiana.edu>:

During the run of a java program connected to 7.0.3, the following
errors occurred:

insert into current_resources values (459, 0,
'http://a1829.g.akamaitech.net/6/1829/792/000/search.britannica.com/
images/storethumbs/T_CMB_HG_FDALRTP.jpg', '', '', 'not foundnot found
the requested object does not exist on this server the link you followed

is either outdated inaccurate or the server has been instructed not to
let
you have it please inform the site administrator of the referring page
r',
'Not Found')
ERROR: Unterminated quotes string

Error updating: insert into current_usages values (115, 459, 'trbauer',

CURRENT_TIMESTAMP, 0) -- java.sql.SQLException:
FATAL 1: Socket command type r unknown

Any subsequent attent to access the database yields:

An I/O error has occured while flushing the output -
java.io.IOException:
Broken pipe

The problem is that the first insert statement is correct. Other
statements
had proceeded it. Could one of them have been the problem?

No, the SQL looks ok. The broken pipe exceptions seem to indicate that the
backend is dying for some reason.

If you use psql, does the connection die if you enter the same queries?

Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#6Dave Cramer
pg@fastcrypt.com
In reply to: Travis Bauer (#1)
JDBC setObject

Hi all,

I have reported a problem with the PreparedStatement.setObject method on the
general list, and using the bug database.

I haven't received any replies yet. I am prepared to fix the problem myself,
how do I go about this?

Regards,

Dave Cramer

#7Bruce Momjian
bruce@momjian.us
In reply to: Dave Cramer (#6)
Re: JDBC setObject

[ Charset ISO-8859-1 unsupported, converting... ]

Hi all,

I have reported a problem with the PreparedStatement.setObject method on the
general list, and using the bug database.

I haven't received any replies yet. I am prepared to fix the problem myself,
how do I go about this?

Not sure. Seems most people are pretty busy now. If you get it fixed,
please send over a diff so we can get it into 7.2.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026