db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Eric Miller" <jemil...@uchicago.edu>
Subject Re: JDBC driver question
Date Thu, 20 Jan 2005 16:33:49 GMT
Thanks to all that responded. I'll give your suggestions a try. I was able 
to resolve the specific issue that I was having. Basically, I generated my 
database schema using Hibernate and it didn't create my id field with an 
IDENTITY like I thought it did. I corrected that, and now it seems to work 

I think that will be a definite plus when IBM releases source code for the 
JDBC driver as well. The non-descript exception messages are something that 
I ran into right off the bat. If those could be fixed up, I think that would 
help a lot in terms of ease of use/development. Or, if nothing else, if the 
error codes were at least listed in a document that comes with the driver. 
Does anyone know if there is such a document somewhere? I noticed in the 
Java API Specification documentation that the codes are XOpen or SQL 99. 
There are also vendor specific codes.


----- Original Message ----- 
From: "myrna" <myrna@Golux.Com>
To: "Derby Discussion" <derby-user@db.apache.org>
Sent: Wednesday, January 19, 2005 6:46 PM
Subject: Re: JDBC driver question

> Plus, you could switch on the RetrieveMessagesFromServerOnGetMessage 
> property on. Put it in a derby.properties file where you start 
> networkserver. It's actually a performance-enhancing measure not to have 
> it on by default - it may make sense to have it on while you're 
> developing.
> I did a search on the apache derby site for 'error network server' and the 
> 4th (or so) hit discusses this.
> re opensource driver, see the final part of this thread:
> http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=derby-dev@db.apache.org&msgNo=1648
> SQLState 23502 is actually: Column ''<columnname>''  cannot accept a NULL 
> value; so Ali is probably right - you'll need to drill down to get to the 
> actual problem.
> You can also add the following properties to your derby.properties file:
> derby.infolog.append=true
> derby.logStatementText=true
> derby.stream.error.logSeverityLevel=0
> and you'll see more details show up in the derby.log to help analyze 
> problems.
> Myrna
> Suavi Ali Demir wrote:
>>It may show error message if you call
>>Exception.getMessage() or
>>Exception.getLocalizedMessage() and also loop through
>>nested exceptions using
>>SQLException.getNextException() and get the nested
>>exceptions' stack trace and getMessage().
>>I think Derby does not support RETURN_GENERATED_KEYS
>>and nested exception may say so in this case.
>>--- Jonathan Eric Miller <jemiller@uchicago.edu>
>>>Hi. I'm new to using Derby. I've used it with
>>>limited success so far. Currently, I'm receiving the following exception
>>>while attempting to insert a row in a table using a PreparedStatement 
>>>which was
>>>created using the Statement.RETURN_GENERATED_KEYS flag.
>>>Can someone tell me where I can find out what these
>>>error codes mean (why o why doesn't IBM just print meaningful error 
>>>like every other JDBC driver on the face of the planet)? I looked around
>>>on IBM's Web site to no avail. On a related note, will there be an open
>>>source JDBC driver for Derby?
>>>com.ibm.db2.jcc.c.SqlException: DB2 SQL error:
>>>SQLCODE: -1, SQLSTATE: 23502, SQL
>>>ERRMC: ID¶23502
>>>        at com.ibm.db2.jcc.c.zc.d(zc.java:1351)
>>>        at com.ibm.db2.jcc.a.eb.l(eb.java:366)
>>>        at com.ibm.db2.jcc.a.eb.a(eb.java:64)
>>>        at com.ibm.db2.jcc.a.r.a(r.java:48)
>>>        at com.ibm.db2.jcc.a.ub.c(ub.java:266)
>>>        at com.ibm.db2.jcc.c.ad.Z(ad.java:1666)
>>>        at com.ibm.db2.jcc.c.ad.d(ad.java:2224)
>>>        at com.ibm.db2.jcc.c.ad.V(ad.java:521)
>>>        at

View raw message