Hello,
Again me for another problem !!!
During the creation of the bean (Home.Create), I have a ClassCastException :
java.lang.Long !!
My bean has a primary key of the type Long !
I use JBoss and JAWS (CMP) with an Access Database.
It sounds that the ejb-jar file is right.
The error occur during a call to : myHome.create( new Long(1) );
I have the following corresponding methods :
-----------------------------------------------------------------
ODATAServicesRegistryHome
> ODATAServicesRegistryBI Create(Long ...)
> ODATAServicesRegistryBI findByPrimaryKey(Long ...)
ODATAServicesRegistryBean
- Long ejbCreate(Long ...)
- public Long PrimaryKey;
ejb-jar.xml
---------------
<primkey-field>PrimaryKey</primkey-field>
<primary-key-class>java.lang.Long</primary-key-class>
<cmp-field><field-name>PrimaryKey</field-name></cmp-field>
And the JBoss log
---------------------------
[JAWS] java.lang.ClassCastException: java.lang.Long
[JAWS] at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(Unknown Source)
[JAWS] at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(Unknown Source)
[JAWS] at
org.jboss.minerva.jdbc.PreparedStatementInPool.setObject(PreparedStatementIn
Pool.java:281)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setParameter(JDBCCommand.java:31
4)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setPrimaryKeyParameters(JDBCComm
and.java, Compiled Code)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCBeanExistsCommand.setParameters(JDBCBean
ExistsCommand.java:60)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:157
)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCBeanExistsCommand.execute(JDBCBeanExists
Command.java:46)
[JAWS] at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEn
tityCommand.java, Compiled Code)
[JAWS] at
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersisten
ceManager.java:122)
[JAWS] at
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManag
er.java:156)
[JAWS] at
org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)nerFactory
.deploy(ContainerFactory.java:272)
I suppose it is a stupid stuff, but I cannot find what !
Thanks a lot for your help
Christophe
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".