Now I am getting this errror when trying to call the create function, 

13:44:41,220 ERROR [LogInterceptor] EJBException, causedBy:
java.lang.ClassCastException
        at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceV
alue(JDBCCMRFieldBridge.java:773)
        at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDB
CCMRFieldBridge.java:624)
        at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke
(EntityBridgeInvocationHandler.java:121)
        at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
        at com.ingotz.points.core.entity.TransactionBean$Proxy.setTr_type(<gener
ated>)
        at com.ingotz.points.core.entity.TransactionBean.ejbPostCreate(Unknown S
ource)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.jboss.ejb.plugins.CMPPersistenceManager.postCreateEntity(CMPPersi
stenceManager.java:240)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.post
CreateEntity(CachedConnectionInterceptor.java:277)
        at org.jboss.ejb.EntityContainer.postCreateHome(EntityContainer.java:725
)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityConta

The line that causes the problem is as follows (in a JSP file) 

        Transaction tranMan = tran.create(new Date(),new Integer(1),new 
Boolean(false), new Boolean(false),transtype); 


The TransactionHome Create function is as follows
  public Transaction create( Date tr_date, Integer tr_state, Boolean tr_summary, 
Boolean tr_non_refundable, TransType tr_type ) throws RemoteException, CreateException;

The ejbcreate code is as follows

          public Long ejbCreate( Date tr_date, Integer tr_state, Boolean tr_summary, 
Boolean tr_non_refundable, TransType tr_type)
            throws CreateException
          {
                setTr_date(tr_date);
                setTr_state(tr_state);
                setTr_summary(tr_summary);
                setTr_non_refundable(tr_non_refundable);
            return null;
          }
        
          public void ejbPostCreate(Date tr_date, Integer tr_state, Boolean 
tr_summary, Boolean tr_non_refundable, TransType tr_type )
            throws CreateException
          {
                setTr_type(tr_type);
          }



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830114#3830114

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830114


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to