Hello all

We are currently developping an EJB/Web-App which uses CMP 2.0 and IBM DB2. We have 
been trying to upgrade from JBoss 3.2.1 to 3.2.3 and hereby experienced the following 
problem:

There is a unidirectional one-to-many CMR between Bean1 and Bean2. The foreign key in 
Bean2 (p_nr) is part of its compound primary key (p_nr,kat) and is of type VARCHAR(15) 
in the database, String as the member of the bean. The values of p_nr are usually 
shorter than 15 characters, consist of eg seven characters ("2222372" in the example). 
In JBoss 3.2.1, when I call the get-accessor getPNr() of Bean2, everything is fine. 
But when I deploy the same ear to JBoss 3.2.3, a call of the get-accessor getPNr() of 
exactly the same instance of Bean2 produces the attached Exception.

Nowhere in our code do we append the white spaces.

Any hint or help will be highly appreciated.

Nicolas


2004-02-25 10:26:40,904 ERROR [org.jboss.ejb.plugins.LogInterceptor] 
TransactionRolledbackLocalException in method: public abstract java.lang.String 
Bean1Local.getPNr(), causedBy:
java.lang.IllegalStateException: New value [2222372        ] of a foreign key field 
pNr changed the value of a primary key field pNr[2222372]
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.setInstanceValue(JDBCCMP2xFieldBridge.java:195)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setForeignKey(JDBCCMRFieldBridge.java:1299)
        at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMRFieldBridge.java:1283)
        at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.load(ReadAheadCache.java:391)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:111)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:72)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:612)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:594)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:381)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:352)
        at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:239)
        at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
        at 
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
        at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:54)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:297)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
        at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
        at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:489)
        at org.jboss.ejb.Container.invoke(Container.java:700)
        at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
        at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
        at $Proxy78.getPNr(Unknown Source)

[...]


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3823144#3823144

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3823144


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to