Bugs item #516404, was opened at 2002-02-12 04:31
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=516404&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Hamann (thomash76)
>Assigned to: Dain Sundstrom (dsundstrom)
Summary: invalid type mapping

Initial Comment:
Hi,

i tried to run an application which uses entity beans with cmp 2.0. Those entities 
have cmp fields 
containing values of type java.util.HashMap which is serializable and therefore a 
valid cmp field 
type. During deployment the tables for all entities are created successfully and with 
the correct 
column types (according to standardjbosscmp-jdbc.xml type-mappings "Oracle8"). But 
when 
creating such an entity via a create method on its home interface an exception is 
thrown (written 
below). The problem can be solved by declaring the return and parameter types of the 
abstract 
cmp field methods to be java.lang.Object instead of any (valid) serializable type...

btw: "Ungnltiger Spaltentyp" is german for "invalid column type"

javax.ejb.EJBException: Internal error setting parameters for field allowedUsers
Embedded Exception
Ungnltiger Spaltentyp
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbs
tractCMPFieldBr
idge.java:220)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbst
ractCMPFieldBr
idge.java:193)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.j
ava:194)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:
131)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:380)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:233)
        at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:680)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1187)
        at 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
        at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationIntercepto
r.java:222)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:80)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:158)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:55)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:102)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
        at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:459)
        at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1086)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
        at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:320)
        at java.lang.reflect.Method.invoke(Native Method)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: Ungnltiger Spaltentyp
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
        at 
oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4560)
        at 
oracle.jdbc.driver.OraclePreparedStatement.setNull(OraclePreparedStatement.java:869)
        at 
org.jboss.resource.adapter.jdbc.local.PreparedStatementInPool.setNull(PreparedStatementInPool.ja
va:78)
        at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:144)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbs
tractCMPFieldBr
idge.java:214)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbst
ractCMPFieldBr
idge.java:193)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.j
ava:194)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:
131)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:380)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:233)
        at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:680)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1187)
        at 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
        at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationIntercepto
r.java:222)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:80)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:158)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:55)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:102)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
        at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:459)
        at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1086)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
        at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:320)
        at java.lang.reflect.Method.invoke(Native Method)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
13:07:31,105 ERROR [EntityContainer] invoke returned an exception
javax.ejb.CreateException: Could not create entity:javax.ejb.EJBException: Internal 
error setting 
parameters for field a
llowedUsers
Embedded Exception
Ungnltiger Spaltentyp
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.j
ava:201)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:
131)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:380)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:233)
        at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:680)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1187)
        at 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
        at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationIntercepto
r.java:222)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:136)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:80)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:158)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:55)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:102)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
        at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:459)
        at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1086)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
        at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
        at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:320)
        at java.lang.reflect.Method.invoke(Native Method)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

with kind regards,
Thomas

----------------------------------------------------------------------

>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-02-12 07:26

Message:
Logged In: YES 
user_id=251431

What is happing is JBossCMP is attempting to set your
HashMap column to null.  Is this column marked NOT NULL in
your database?  

I need some more information before I can look at this. 
Immedately before this exception in your server.log file you
should see a debug message that looks like this:

Set parameter: index=2, jdbcType=INTEGER, value=NULL

Can you post this in a follow up comment?

----------------------------------------------------------------------

Comment By: Thomas Hamann (thomash76)
Date: 2002-02-12 04:38

Message:
Logged In: YES 
user_id=445709

sorry, i forgot...
os: win2k
jdk: jdk1.3.1_01

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=516404&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to