Here is the exact output from the JOnAS execution window giving the
PostgreSQL JDBC driver error, when I try to insert a String column around
10k long:

Failed to create bean in database
The SQL Statement is too long - insert into Customer_History (id,
id_customer, id_admin, timestamp, description) values (2015, 37515, 1,
'2000-12-02 09:00:16.259', 'Logged E-Mail To Customer:....
....
[what follows is a 10k email message]
....
')
        at org.postgresql.Connection.ExecSQL(Connection.java:324)
        at org.postgresql.jdbc2.Statement.execute(Statement.java:273)
        at org.postgresql.jdbc2.Statement.executeUpdate(Statement.java:73)
        at
org.postgresql.jdbc2.PreparedStatement.executeUpdate(PreparedStatement.java:
126)
        at
com.nextalarm.EJB.JOnASCustomerHistoryBeanCustomerHistory.createData(JOnASCu
stomerHistoryBeanCustomerHistory.java:184)
        at
com.nextalarm.EJB.JOnASCustomerHistoryBeanCustomerHistoryHome.create(JOnASCu
stomerHistoryBeanCustomerHistoryHome.java:50)
        at
com.nextalarm.EJB.JOnASCustomerHistoryBeanCustomerHistoryHome_Skel.send(JOnA
SCustomerHistoryBeanCustomerHistoryHome_Skel.java:42)
        at
org.objectweb.david.libs.protocols.giop.GIOPProtocol$ServerSession_Low.send(
GIOPProtocol.java:638)
        at
org.objectweb.jonathan.libs.protocols.tcpip.TcpIpProtocol$Session.run(TcpIpP
rotocol.java:431)
        at
org.objectweb.jonathan.libs.resources.JScheduler$JJob.run(JScheduler.java:25
2)

System Exception in create or finder method:javax.ejb.EJBException

This puzzles me because I thought JOnAS used prepared statements for
inserts; however, the above error message (coming out of the PostgreSQL
driver) seems to indicate a direct statement is occuring, rather than a
prepared one. Maybe it's being translated internally by the JDBC driver from
a prepared statement to a regular one.

In any case, help would be appreciated; how else on earth can one insert
columns >8k into PostgreSQL via CMP?

Thanks in advance,
Bryan




----- Original Message -----
From: "Bryan (Mailing Lists)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 01, 2000 5:35 PM
Subject: MORE Re: CMP and PostgreSQL "TEXT" datatype?


> By the way, I should also add that I have already been using "String", but
> when I try to insert a value that's pretty long (e.g. 10k bytes), I get an
> exception from the PostgreSQL driver, "Query too long" or something like
> that.
>
> Thanks in advance,
> Bryan
>
>
> ----- Original Message -----
> From: "Bryan (Mailing Lists)" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, December 01, 2000 2:29 PM
> Subject: CMP and PostgreSQL "TEXT" datatype?
>
>
> > Can someone please tell me which Java class I should use in a JOnAS CMP
> bean
> > to represent the "TEXT" datatype in PostgreSQL?
> >
> > The TEXT datatype is not described anywhere in the JOnAS "Bean
> Programmer's
> > Guide".
> >
> > Thank you,
> > Bryan
> >
> >
> >
> > ----
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body of the message "unsubscribe jonas-users".
> > For general help, send email to [EMAIL PROTECTED] and
> > include in the body of the message "help".
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to