Title: RE: [JBoss-user] [CMP] anyone using CLOB/text with CMP and MySQL?

We MySQL with TEXT columns.  We don't specify the jdbc-type
or sql-type to XDoclet:

    /**
     * @ejb:interface-method view-type="local"
     * @ejb:persistent-field
     * @jboss:column-name name="EventText"
     */
    public abstract String getEventText();

So the jbosscmp-jdbc.xml just has:

         <cmp-field>
            <field-name>eventText</field-name>
            <column-name>EventText</column-name>
         </cmp-field>

My guess would be the JDBC type should be VARCHAR
if you are going to specify it.

JD

-----Original Message-----
From: Brian Topping [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 12, 2003 5:09 AM
To: JBoss User List (E-mail)
Subject: [JBoss-user] [CMP] anyone using CLOB/text with CMP and MySQL?


Hi all,

Does anyone have success with using MySQL and the sql-type 'text' in their
projects?  I've probably got a misconfiguration here, this seems like
something that ought to work.

Thanks kindly for any info that you can provide!!

Brian

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

Exception:

Caused by: javax.ejb.EJBException: null; CausedByException is:
        null; CausedByException is:
        Internal error getting results for field member headerHtml;
CausedByException is:
        null; nested exception is:
        javax.ejb.EJBException: null; CausedByException is:
        Internal error getting results for field member headerHtml;
CausedByException is:
        null
        at
com.bill2.incamail.ejb.beans.session.ChannelManagerBean.findAllChannelsForAcc
ount ChannelManagerBean.java:78)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.
java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)

jbosscmp-jdbc.xml:

         <cmp-field>
            <field-name>headerHtml</field-name>
            <jdbc-type>CLOB</jdbc-type>
            <sql-type>text</sql-type>
        </cmp-field>

java code:

    /**
     * @ejb:persistent-field
     * @ejb:persistence jdbc-type="CLOB" sql-type="text"
     * @ejb:interface-method
     * @ejb:value-object match="light"
     * @return The value of the attribute
     */
    public abstract String getHeaderHtml();

    /**
     * @ejb:interface-method
     * @param headerHtml The value to be set to the attribute
     */
    public abstract void setHeaderHtml(String headerHtml);

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to