CMR woes
pjcraven Mar 11, 2002 5:00 PMWhen I create two beans that can be related, and then relate them, I have no problem. When I create these beans, and then try and relate them I get the error at the end of this post. I am using the current tip. I am not using a jbosscmp-jdbc.xml file, but I was under the impression that this file is not required. Any help would be greatly appreciated.
13:40:48,408 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
java.lang.IllegalStateException: A CMR field cannot be set or added to a relationship in ejbCreate; this should be done in the ejbPostCreate method instead.
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.addRelation(JDBCCMRFieldBridge.java:696)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.createRelationLinks(JDBCCMRFieldBridge.java:549)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.add(RelationSet.java:87)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.addAll(RelationSet.java:106)
at com.blackbearsolutions.fea.biz.QuestionSet_Bean.addQuestionSetDependency(QuestionSet_Bean.java:35) at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1012)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCReadAheadInterceptor.invoke(JDBCReadAheadInterceptor.java:92)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:184)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:295)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:189)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:108)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:158)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:64)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:435)
at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:346)
at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$EntityProxy.invoke(BaseLocalContainerInvoker.java:475)
at $Proxy21.addQuestionSetDependency(Unknown Source)
at com.blackbearsolutions.fea.biz.TestHarnessBean.doSomething(TestHarnessBean.java:42)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:623)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:158)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:64)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:289)
at org.jboss.ejb.Container.invoke(Container.java:609)
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(UnicastServerRef.java:241)
at sun.rmi.transport.Transport$1.run(Transport.java:152)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
at java.lang.Thread.run(Thread.java:484)