Hi all,
these days I'm trying to change a BMP entity in a CMP.
I had strictly no problem with my CMP but I want to explore the BMP possibilities and
performances.
But It seems I have a problem with the CLOB field of my bean:
- No data is retrieve when loading loading the BMP
- An exception is thrown upon insertion of long string in the CLOB field:
javax.ejb.EJBException: Internal error setting parameters for field content;
CausedByException is:
| Data size bigger than max size for this type: 7115570
| at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:297)
| at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:270)
| at
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:192)
| at
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)
| at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
| at
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
|
Environment:
- JBoss 3.0.8
- Oracle 8.1.7
My Bean:
/**
| * @ejb.bean
| * name="LogItem"
| * view-type="both"
| * type="CMP"
| * primkey-field="id"
| * cmp-version = "2.x"
| * jndi-name="theLogItem"
| *
| * @ejb:transaction
| * type="Required"
| *
| * @ejb.persistence
| * table-name="LOGDATA"
| *
| * @jboss.persistence
| * create-table = "false"
| * remove-table = "false"
| *
| */
| public abstract class SessionLogItemEJBBean implements EntityBean {
|
| //==========================================
| // Business Methods
| //==========================================
|
| ...
|
| //==========================================
| // CMP fields
| //==========================================
|
| /**
| * @ejb.pk-field
| *
| * @ejb.persistence
| * column-name = "LOGDATA_ID"
| * jdbc-type = "INTEGER"
| *
| */
| public abstract Long getId();
| public abstract void setId(Long id);
|
| /**
| * @ejb.persistence
| * column-name = "LOGDATA_CONTENT"
| * jdbc-type = "CLOB"
| */
| public abstract String getContent();
| public abstract void setContent(String content);
|
| /**
| * @ejb.persistence
| * column-name = "LOGDATA_TYP"
| * jdbc-type = "VARCHAR"
| * sql-type = "varchar(300)"
| */
| public abstract String getType();
| public abstract void setType(String type);
|
| //==========================================
| // CMR fields
| //==========================================
|
| //==========================================
| // EJB Callbacks
| //==========================================
| /**
| * @ejb.create-method
| * view-type = "both"
| */
| public Long ejbCreate( ... )throws CreateException{
| ...
| return null;
| }
| public void ejbPostCreate( ... )throws CreateException{
| }
| }
|
Can someone tell what I am missing or if there is a problem with this kind of stuff
(and it's workaround).
Best regards,
Alban.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832043#3832043
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3832043
-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user