Hello,

JBoss 2.1
I receive an error error during EJB Entity object (CMP) creation (hypersonicSQL):

I have only a TINYINT field in the bean, i have controlled the mapping and this is 
correct (no changes was made to the type mappings):
         <cmp-field>
           <field-name>byteObjectId</field-name>
           <column-name>byteObjectId</column-name>
           <sql-type>TINYINT</sql-type>
           <jdbc-type>TINYINT</jdbc-type>
         </cmp-field>

The database is correct (autodeployed):

The error:

[JAWS] java.lang.ClassCastException: java.lang.Short
[JAWS]  at 
org.hsql.jdbcPreparedStatement.setObjectInType(jdbcPreparedStatement.java:1013)
[JAWS]  at org.hsql.jdbcPreparedStatement.setObject(jdbcPreparedStatement.java:463)
[JAWS]  at 
org.opentools.minerva.jdbc.PreparedStatementInPool.setObject(PreparedStatementInPool.java:282)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setParameter(JDBCCommand.java:333)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.setParameters(JDBCCreateEntityCommand.java:165)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:158)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:135)
[JAWS]  at 
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:122)
[JAWS]  at 
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:207)
[JAWS]  at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
[JAWS]  at java.lang.reflect.Method.invoke(Native Method)
[JAWS]  at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
[JAWS]  at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
[JAWS]  at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:87)
[JAWS]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[JAWS]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[JAWS]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[JAWS]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:151)
[JAWS]  at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[JAWS]  at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
[JAWS]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:425)
[JAWS]  at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212)
[JAWS]  at $Proxy21.create(Unknown Source)
[JAWS]  at 
sisaejb.system.eb.objectid.ObjectIdGeneratorAccessBean.<init>(ObjectIdGeneratorAccessBean.java:65)
[JAWS]  at 
sisaejb.system.sb.objectid.ObjectIdFactoryBean.getNewObjIdAccessBean(ObjectIdFactoryBean.java:98)
[JAWS]  at 
sisaejb.system.sb.objectid.ObjectIdFactoryBean.getNewIntObjectId(ObjectIdFactoryBean.java:67)
[JAWS]  at java.lang.reflect.Method.invoke(Native Method)
[JAWS]  at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:472)
[JAWS]  at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87)
[JAWS]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[JAWS]  at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[JAWS]  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[JAWS]  at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:177)
[JAWS]  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[JAWS]  at 
org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271)
[JAWS]  at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:471)
[JAWS]  at 
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:152)
[JAWS]  at $Proxy15.getNewIntObjectId(Unknown Source)
[JAWS]  at 
sisaejb.system.sb.objectid.ObjectIdFactoryAccessBean.getNewIntObjectId(ObjectIdFactoryAccessBean.java:110)
[JAWS]  at 
sisaejb.system.common.server.LSuiteBaseServer.getNewIntegerObjectId(LSuiteBaseServer.java:36)
[JAWS]  at sisaejb.system.eb.language.LanguageBean.ejbCreate(LanguageBean.java:106)
.............

Thanks in advance for help.




<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Franco Biaggi">
<meta name="GENERATOR" content="Franco Biaggi">
</head>

<body>

<p>&nbsp; </p>

<table BORDER="1" COLS="1" WIDTH="452" BGCOLOR="#FFFF00">
  <tr>
    <td width="446"><font face="Comic Sans MS"><small><small><br>
    <font color="#3333FF"><a href="http://www.ticino.com/usr/fbiaggi/">Franco 
Biaggi</a></font><small><br>
    <font color="#3333FF"><a href="http://www.sisa.ch">SISA Studio Informatica 
SA</a></font><small><small><small> <br>
    </small></small></small><font color="#3333FF">R&amp;D 
Services</font><small><small><small>
    <br>
    </small></small></small><font color="#3333FF">Via Carvina 
1</font><small><small><small> <br>
    </small></small></small><font color="#3333FF">CH-6807 
Taverne</font><small><small><small> <br>
    </small></small></small><font color="#3333FF">Efax +1 801 705 
2839</font></small></small></small><br>
    </small></small></small><font color="#3333FF">Tel. +41 91 935 75 35&nbsp; Fax. +41 
91 935
    75 30</font></small></small></small><br>
    </small></small></small><font color="#3333FF">Sorry for my bad 
english...</font><small><small><small> <br>
</font></td>
  </tr>
</table>
</body>
</html>




_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to