2 Replies Latest reply on Jul 1, 2003 2:12 PM by Grzegorz Stelmaszek

    CMR field value is already loaded exception

    Jason Anderson Newbie

      In JBoss 3.2.1 I get this new exception when using CMP and code that used to work with previous versions of JBoss. Any ideas on what the cause is? Thanks! The offending entity bean calls is to get one side of Set of objects for N:N relation, within a transaction which is doing other stuff including writes.


      Caused by: javax.ejb.EJBException: CMR field value is already loaded
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge$FieldState.loadRelations(JDBCCMRFieldBridge.java:1531)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMRFieldBridge.java:1051)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMRFieldBridge.java:1037)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getInstanceValue(JDBCCMRFieldBridge.java:550)
      at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getValue(JDBCCMRFieldBridge.java:508)
      at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:124)
      ...

        • 1. Re: CMR field value is already loaded exception
          Sverker Abrahamsson Novice

          I am getting the same error with JBoss 3.2.0 and an 1:N relation.

          javax.ejb.EJBException: CMR field value is already loaded
          at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge$FieldState.l
          oadRelations(JDBCCMRFieldBridge.java:1531)
          at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMR
          FieldBridge.java:1051)
          at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.load(JDBCCMR
          FieldBridge.java:1037)
          at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getInstanceV
          alue(JDBCCMRFieldBridge.java:550)
          at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.getValue(JDB
          CCMRFieldBridge.java:508)
          at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke
          (EntityBridgeInvocationHandler.java:124)
          at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
          at com.limetransit.sms.entity.AccountEntityCMP$Proxy.getPriceList(<gener
          ated>)

          The problem started recently, I've been running the same code for monts without changing that part.

          Any ideas?

          • 2. Re: CMR field value is already loaded exception
            Grzegorz Stelmaszek Newbie

            I started getting it when switched to an OptimisticLocking modified-strategy.