Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Error not thrown back to Java app?

Re: Error not thrown back to Java app?

From: Joseph Weinstein <bigdog_at_bea.com>
Date: Tue, 23 Sep 2003 12:07:09 -0700
Message-ID: <3F7099DD.51B4A34B@bea.com>

Ernie Harrison wrote:

> Help! One of our contractors is saying that Oracle (8i) is not
> throwing back an error message on a primary key violation, so his app
> doesn't know the transaction failed. He isn't an Oracle developer,
> I'm not a Java developer, so we have a disconnect in the middle. The
> app did work until late last week, when he made some changes, but he
> says his changes couldn't have done anything. I'm trying to get this
> resolved before it turns into a puking contest. He wants me to "check
> the transaction log" to see why Oracle is failing to throw the error.
> I'm not sure there is such a thing, at least the way he seems to
> think. On my end, the table simply doesn't have the new rows
> inserted, because there was a primary key violation. But is there a
> situation where Oracle would not throw the error back to the app? Or
> is there something he needs to add to his app to catch it? The app
> seems to have caught other errors at other times; he's experienced
> with Java against DB2, so he's not new to the Java-database
> programming world. But I'm not sure where to turn next on this.
>
> Thanks,
> Harry Boswell

Ask him to collect the jdbc debug logging output. If his environment doesn't have a way of turning this on, he can just add a line to his Java code (once is enough) to send JDBC debug stuff to stdout:

java.sql.DriverManager.setLogStream( System.out );

and see what gets sent to the DBMS, and what SQLExceptions get created in return. It may be that the exception comes back but in a way/place that the application code ignores it. Joe Weinstein at BEA Received on Tue Sep 23 2003 - 14:07:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US