From: | Jason Topaz <topaz(at)panix(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Cc: | Sam Vaitheeswaran <uaimp(at)yahoo(dot)com(dot)au> |
Subject: | Re: CMP Bean problem |
Date: | 2003-12-08 11:58:07 |
Message-ID: | 1070884687.11776.10.camel@trane.shiawase.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I am not sure this is a JDBC question, but I'll throw in my 2 cents
anyway..
On Mon, 2003-12-08 at 19:50, Sam Vaitheeswaran wrote:
> I am developing a Entity bean (CMP). I deployed and ran this CMP in
> SUN one server and PostgresQL database.
>
> CREATE TABLE jas_product (product_id varchar(15) NOT NULL ,name
> varchar(25) ,description varchar(25) ,baseprice float8 );
>
> com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400:
> Got a JDBC SQLException while executing the SQL statement:
>
> SQL statement<insert into "jas_product"("baseprice", "description",
> "name", "product_id") values(?,?,?,?)> with input values:
> java.lang.Double:75.0, java.lang.String:SuSE Linux Operating system,
> java.lang.String:SuSE Linux, java.lang.String:S1.
>
> Please examine the SQLException for more information.
I'll hazard a guess as to the cause of the problem: it might be that
you're inserting a 27-character value ("SuSE Linux Operating System")
into a 25-character field.
If I'm wrong, though... I've found CMP debugging can be tricky,
especially when the server defers database interaction to the end of the
EJB transaction to improve performance as it appears to be doing in your
case. The error from the database could pop up way after the
"offending" code executed. To really know what's going on, you'd better
follow the directions and pull out the SQLException contents, which
should contain the actual PostgreSQL error message. I'm not sure what
the steps are in SunONE to view an exception caught by the CMP layer, so
I can't help out there (maybe it's just because of the whiskey, but I
didn't see it in your log at first glance)
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2003-12-08 12:54:37 | Re: CMP Bean problem |
Previous Message | Sam Vaitheeswaran | 2003-12-08 10:50:11 | CMP Bean problem |