Hi!
     I am working with Jbos3.0 .While trying to create an entity bean i get the 
following error?

snapshot of jbosscmp-jdbc.xml

<entity>
  <ejb-name>ArticleAssignment</ejb-name>
       <table-name>ARTICLE_ASSIGNMENT</table-name>
  <cmp-field>
   <field-name>serialNumber</field-name>
   <column-name>SERIAL_NUMBER</column-name>
   <jdbc-type>NUMERIC</jdbc-type>
   <sql-type>NUMBER</sql-type>
  </cmp-field>

  <cmp-field>
   <field-name>createdBy</field-name>
   <column-name>CREATED_BY</column-name>
   <jdbc-type>NUMERIC</jdbc-type>
   <sql-type>NUMBER</sql-type>
  </cmp-field>

  <cmp-field>
   <field-name>createdDate</field-name>
   <column-name>CREATED_DATE</column-name>
   <jdbc-type>TIMESTAMP</jdbc-type>
   <sql-type>DATE</sql-type>
  </cmp-field>

  <cmp-field>
   <field-name>lastUpdatedBy</field-name>
   <column-name>LAST_UPDATED_BY</column-name>
   <jdbc-type>INTEGER</jdbc-type>
   <sql-type>INTEGER</sql-type>
  </cmp-field>

  <cmp-field>
   <field-name>lastUpdatedDate</field-name>
   <column-name>LAST_UPDATED_DATE</column-name>
   <jdbc-type>TIMESTAMP</jdbc-type>
   <sql-type>DATE</sql-type>
  </cmp-field>

  <cmp-field>
   <field-name>updateCount</field-name>
   <column-name>UPDATE_COUNT</column-name>
   <jdbc-type>INTEGER</jdbc-type>
   <sql-type>INTEGER</sql-type>
  </cmp-field>
.
.
.
.

StackTrace


19:31:23,433 ERROR [ArticleAssignment] Could not create entity
java.lang.ClassCastException: java.lang.Long
        at 
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:1971)
        at 
oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:2052)
        at
org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setObject(LocalPreparedStatement.java:607)

        at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:156)
        at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:283)

        at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:262)

        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:450)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
        at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)

        at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)
        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)
        at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1116)
        at 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
        at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:257)

        at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)

        at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
        at
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
        at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
        at
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:227)

        at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
        at $Proxy13.create(Unknown Source)
        at
com.cadmus.rpm.domain.session.ModelFactory.ModelFactoryBean.createArticleAssignment(Unknown
 Source)
        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)
        at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:664)

        at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

        at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)

        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
        at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
        at org.jboss.ejb.Container.invoke(Container.java:705)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
        at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
        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)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at sun.rmi.transport.Transport$1.run(Transport.java:148)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:536)
19:31:23,449 ERROR [STDERR] javax.ejb.CreateException: Could not create
entity:java.lang.ClassCastException: java.lang.Long
19:31:23,464 ERROR [STDERR]     at
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:199)

19:31:23,464 ERROR [STDERR]     at
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)
19:31:23,464 ERROR [STDERR]     at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:450)
19:31:23,464 ERROR [STDERR]     at
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
19:31:23,464 ERROR [STDERR]     at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)

19:31:23,464 ERROR [STDERR]     at
org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:579)
19:31:23,464 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
19:31:23,464 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:31:23,480 ERROR [STDERR]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:31:23,480 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:324)
19:31:23,480 ERROR [STDERR]     at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1116)
19:31:23,480 ERROR [STDERR]     at
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
19:31:23,917 ERROR [STDERR]     at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:257)

19:31:23,933 ERROR [STDERR]     at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)

19:31:23,933 ERROR [STDERR]     at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:134)
19:31:23,949 ERROR [STDERR]     at
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
19:31:23,949 ERROR [STDERR]     at
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
19:31:23,964 ERROR [STDERR]     at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
19:31:23,964 ERROR [STDERR]     at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
19:31:23,980 ERROR [STDERR]     at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
19:31:30,839 ERROR [STDERR]     at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
19:31:30,839 ERROR [STDERR]     at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
19:31:30,855 ERROR [STDERR]     at
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
19:31:30,855 ERROR [STDERR]     at
org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome(BaseLocalContainerInvoker.java:227)

19:31:30,871 ERROR [STDERR]     at
org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
19:31:30,886 ERROR [STDERR]     at $Proxy13.create(Unknown Source)
19:31:30,886 ERROR [STDERR]     at
com.cadmus.rpm.domain.session.ModelFactory.ModelFactoryBean.createArticleAssignment(Unknown
 Source)
19:31:30,902 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
19:31:30,902 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:31:30,917 ERROR [STDERR]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:31:30,917 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:324)
19:31:30,933 ERROR [STDERR]     at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:664)

19:31:30,933 ERROR [STDERR]     at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

19:31:30,949 ERROR [STDERR]     at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)

19:31:30,949 ERROR [STDERR]     at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
19:31:30,964 ERROR [STDERR]     at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
19:31:30,964 ERROR [STDERR]     at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
19:31:30,980 ERROR [STDERR]     at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
19:31:30,980 ERROR [STDERR]     at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
19:31:30,996 ERROR [STDERR]     at
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
19:31:31,011 ERROR [STDERR]     at org.jboss.ejb.Container.invoke(Container.java:705)
19:31:31,011 ERROR [STDERR]     at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
19:31:31,027 ERROR [STDERR]     at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:362)
19:31:31,027 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
19:31:31,042 ERROR [STDERR]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:31:31,042 ERROR [STDERR]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:31:31,058 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:324)
19:31:31,058 ERROR [STDERR]     at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
19:31:31,074 ERROR [STDERR]     at 
sun.rmi.transport.Transport$1.run(Transport.java:148)
19:31:31,074 ERROR [STDERR]     at java.security.AccessController.doPrivileged(Native 
Method)
19:31:31,089 ERROR [STDERR]     at 
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
19:31:31,089 ERROR [STDERR]     at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
19:31:31,105 ERROR [STDERR]     at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
19:31:31,105 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:53


Any help will be welcome,

Thanks,
Rahul Ganjoo.



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to