Fwd: Re: CMP Bean problem

Поиск
Список
Период
Сортировка
От Sam Vaitheeswaran
Тема Fwd: Re: CMP Bean problem
Дата
Msg-id 20031209220723.66037.qmail@web21106.mail.yahoo.com
обсуждение исходный текст
Список 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@panix.com> wrote:
Subject: Re: [JDBC] CMP Bean problem
From: Jason Topaz
To: pgsql-jdbc@postgresql.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!

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: problem with PSQLException/PSQLState
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Out of memory error