Fwd: Re: CMP Bean problem

From: Sam Vaitheeswaran <uaimp(at)yahoo(dot)com(dot)au>
To: pgsql-jdbc(at)postgresql(dot)org
Cc: topaz(at)panix(dot)com
Subject: Fwd: Re: CMP Bean problem
Date: 2003-12-09 22:07:23
Message-ID: 20031209220723.66037.qmail@web21106.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Jason

The problem was the size of the field as you pointed out. I works fine. You guys are great. The support is much better than the expensive paid support.

Cheers
Sam

Jason Topaz <topaz(at)panix(dot)com> wrote:
Subject: Re: [JDBC] CMP Bean problem
From: Jason Topaz
To: pgsql-jdbc(at)postgresql(dot)org
CC: Sam Vaitheeswaran
Date: Mon, 08 Dec 2003 20:58:07 +0900

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> "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)

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

---------------------------------
Yahoo! Personals
- New people, new possibilities. FREE for a limited time!

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-12-09 22:28:56 Re: Out of memory error
Previous Message Kris Jurka 2003-12-09 21:56:09 Re: problem with PSQLException/PSQLState