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

Category: JBossCMP
Group: v3.0 Rabbit Hole
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Thomas Hamann (thomash76)
Assigned to: Dain Sundstrom (dsundstrom)
Summary: forced cmp-field init during create

Initial Comment:
windows 2000; jdk1.3.1_01; JBoss 3.0.0DR1(2-13-2002; GMT 10:00);

Hi,

i tried to create instance of an entity bean, but all i got was exceptions until i 
initialized all cmp 
fields during the ejbCreate() method of that bean. such a bug is not really severe 
because an 
initialization should always be possible (at least with default values) but according 
to the ejb 
specification the application provider does not have to initialize the cmp-fields. i 
checked whether 
the problem is in the database or in Jboss... the db allows creation of rows such as 
(xyz, null, null) 
- Jboss not! when encountering a null valued cmp-field the process of sql query 
composition stops 
and the creation of the bean instance is unsuccessful - see log output. (this was the 
actual 
problem of bug #516404 "invalid type mapping")

2002-02-13 15:51:57,243 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.jatek/GlossaryEntry] Create: 
pk=Reference [uid: 2176]
2002-02-13 15:51:57,258 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.jatek/GlossaryEntry] Executing 
SQL: 
SELECT COUNT(*) FROM GLOSSARYENTRY WHERE uid_column=?
2002-02-13 15:51:57,258 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.jatek/GlossaryEntry.uid] 
Set 
parameter: index=1, jdbcType=BIGINT, value=2176
2002-02-13 15:51:57,258 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.jatek/GlossaryEntry] Executing 
SQL: 
INSERT INTO GLOSSARYENTRY (uid_column, allowedUsers_column, allowedGroups_column, 
deniedUsers_column, deniedGroups_column, par_column, pos_column, ver_column, 
scr_column, 
typLearnTime_column, matData_column) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2002-02-13 15:51:57,258 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.jatek/GlossaryEntry.uid] 
Set 
parameter: index=1, jdbcType=BIGINT, value=2176
2002-02-13 15:51:57,258 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.jatek/GlossaryEntry.allowedUsers]
 Set 
parameter: index=2, jdbcType=JAVA_OBJECT, value=NULL
2002-02-13 15:51:57,493 ERROR 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.jatek/GlossaryEntry] Could not 
create 
entity
javax.ejb.EJBException: Internal error setting parameters for field allowedUsers
Embedded 
Exception
Ung�ltiger Spaltentyp
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbs
tractCMPFieldBridge.java:238)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbst
ractCMPFieldBridge.java:211)
        at ...

seems like there's a problem in org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil at line 144

btw.: my "old" version of JBoss 3.0.0DR1 managed to create the tables itself by using 
the specified 
type mapping - the new one (from this morning) doesn't - any clue?

Thanks for the support yesterday!
Thomas

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

>Comment By: Thomas Hamann (thomash76)
Date: 2002-03-04 08:54

Message:
Logged In: YES 
user_id=445709

This error occured with an Oracle 8.1.7 and i used type-mapping "Oracle8" from 
standardjbosscmp-jdbc.xml. 
Since i had some problems with the type mapping (Jboss did not use "Oracle8" but the 
default "Hypersonic") 
i decided to use explicit type mapping - added jdbc-type and sql-type for each 
cmp-field in 
jbosscmp-jdbc.xml. I did not test whether this bug (see #521558) is resolved in the 
current CVS version. 
Due to de-/serialization problems with Oracle BLOBs i switched to mySQL.

As soon as i can spare some time i'll run a test with "implicit" type mapping for 
mySQL and without initialized 
cmp fields and let you know!

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

Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-03-03 21:59

Message:
Logged In: YES 
user_id=251431

What database and type-mapping are you using?

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

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

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

Reply via email to