Re: CMP Bean problem
От
Jason Topaz
Тема
Re: CMP Bean problem
Дата
Msg-id
1070884687.11776.10.camel@trane.shiawase.org
Ответ на
CMP Bean problem (Sam Vaitheeswaran)
Список
Дерево обсуждения
CMP Bean problem Sam Vaitheeswaran <uaimp@yahoo.com.au>
Re: CMP Bean problem Jason Topaz <topaz@panix.com>
Re: CMP Bean problem Dave Cramer <pg@fastcrypt.com>
Re: CMP Bean problem TANIDA Yutaka <tanida@sra.co.jp>
Re: CMP Bean problem Kris Jurka <books@ejurka.com>
Re: CMP Bean problem TANIDA Yutaka <tanida@sra.co.jp>
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)
В списке pgsql-jdbc по дате отправления