RE: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
> > Yes, at the moment, the limit is 64 columns. > > Kinda reminds me of a famous quote that went something like, "640k > ought to be enough for anybody" :-) LOL --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
On Friday, October 10, 2003, at 10:52 AM, Alexey Loubyansky wrote: Jason Essington wrote: On Thursday, October 9, 2003, at 01:03 PM, Alexey Loubyansky wrote: Jason Essington wrote: I don't see anything immediately obvious about what I am doing different here than with my other entities. All of the others seem happy enough (not pitching exceptions). The only thing I can think that may be causing a problem would be that this entity has 111 persistent fields 6 container managed relationships and 7 non-persistent fields. perhaps the sheer complexity of this entity is causing confusion in the CMP engine? Yes, it is. Now, I know the reason. Thanks. Is there some limit on the complexity of ejb's now, or is this just a growing pain on the way to a faster more efficient server (which the 3.2.2 rc's seem to be)? Yes, at the moment, the limit is 64 columns. Kinda reminds me of a famous quote that went something like, "640k ought to be enough for anybody" :-) If necessary I could possibly whittle this guy down a bit. The necessity should be dictated by project's domain model and common sense. Ya, this one kinda grew out of control. I can't suggest anything, therefore, am working on the fix. Thanks, I'll keep an eye out for it. Sorry, NP, it seems like a reasonable limit, some of us just have unreasonable apps :-/ Thanks -jason --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
Jason Essington wrote: On Thursday, October 9, 2003, at 01:03 PM, Alexey Loubyansky wrote: Jason Essington wrote: I don't see anything immediately obvious about what I am doing different here than with my other entities. All of the others seem happy enough (not pitching exceptions). The only thing I can think that may be causing a problem would be that this entity has 111 persistent fields 6 container managed relationships and 7 non-persistent fields. perhaps the sheer complexity of this entity is causing confusion in the CMP engine? Yes, it is. Now, I know the reason. Thanks. Is there some limit on the complexity of ejb's now, or is this just a growing pain on the way to a faster more efficient server (which the 3.2.2 rc's seem to be)? Yes, at the moment, the limit is 64 columns. If necessary I could possibly whittle this guy down a bit. The necessity should be dictated by project's domain model and common sense. I can't suggest anything, therefore, am working on the fix. Sorry, alex thanks -jason --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
On Thursday, October 9, 2003, at 01:03 PM, Alexey Loubyansky wrote: Jason Essington wrote: I don't see anything immediately obvious about what I am doing different here than with my other entities. All of the others seem happy enough (not pitching exceptions). The only thing I can think that may be causing a problem would be that this entity has 111 persistent fields 6 container managed relationships and 7 non-persistent fields. perhaps the sheer complexity of this entity is causing confusion in the CMP engine? Yes, it is. Now, I know the reason. Thanks. Is there some limit on the complexity of ejb's now, or is this just a growing pain on the way to a faster more efficient server (which the 3.2.2 rc's seem to be)? If necessary I could possibly whittle this guy down a bit. thanks -jason --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
Jason Essington wrote: I don't see anything immediately obvious about what I am doing different here than with my other entities. All of the others seem happy enough (not pitching exceptions). The only thing I can think that may be causing a problem would be that this entity has 111 persistent fields 6 container managed relationships and 7 non-persistent fields. perhaps the sheer complexity of this entity is causing confusion in the CMP engine? Yes, it is. Now, I know the reason. Thanks. alex I'll see If I can figure out what else could be causing issues. I am assuming the problem is with the entity bean since the code that I use to create and remove the beans isn't any different (structurally) than anywhere else in the application. If you have any ideas about which dark corners I should be looking in for a solution, please feel free to share them with me. -jason On Thursday, October 9, 2003, at 11:26 AM, Alexey Loubyansky wrote: Could you, please, provide detailed instructions how to reproduce it? Thanks. alex Jason Essington wrote: Alex That didn't seem to fix it. I don't know if this matters, but I am using the "Instance Per Transaction CMP 2.x EntityBean" container configuration. As a side note, I am also running into a problem creating a new entity where between ejbCreate and ejbPostCreate I receive: java.lang.IllegalArgumentException: Entity primary key is null The stack trace is posted at the bottom of this email. However in ejbCreate I am setting the primary key and calling my getter again to log the primary key, so it is set (but perhaps not persisted). I have log messages in this entity that log when it enters and leaves both ejbCreate and ejbPostCreate and I get all the log messages from ejbCreate, but no messages from ejbPostCreate. This code has been working flawlessly in 3.2.1 and hasn't changed when deployed to 3.2.2. thanks -jason --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
I don't see anything immediately obvious about what I am doing different here than with my other entities. All of the others seem happy enough (not pitching exceptions). The only thing I can think that may be causing a problem would be that this entity has 111 persistent fields 6 container managed relationships and 7 non-persistent fields. perhaps the sheer complexity of this entity is causing confusion in the CMP engine? I'll see If I can figure out what else could be causing issues. I am assuming the problem is with the entity bean since the code that I use to create and remove the beans isn't any different (structurally) than anywhere else in the application. If you have any ideas about which dark corners I should be looking in for a solution, please feel free to share them with me. -jason On Thursday, October 9, 2003, at 11:26 AM, Alexey Loubyansky wrote: Could you, please, provide detailed instructions how to reproduce it? Thanks. alex Jason Essington wrote: Alex That didn't seem to fix it. I don't know if this matters, but I am using the "Instance Per Transaction CMP 2.x EntityBean" container configuration. As a side note, I am also running into a problem creating a new entity where between ejbCreate and ejbPostCreate I receive: java.lang.IllegalArgumentException: Entity primary key is null The stack trace is posted at the bottom of this email. However in ejbCreate I am setting the primary key and calling my getter again to log the primary key, so it is set (but perhaps not persisted). I have log messages in this entity that log when it enters and leaves both ejbCreate and ejbPostCreate and I get all the log messages from ejbCreate, but no messages from ejbPostCreate. This code has been working flawlessly in 3.2.1 and hasn't changed when deployed to 3.2.2. thanks -jason --- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
Could you, please, provide detailed instructions how to reproduce it? Thanks. alex Jason Essington wrote: Alex That didn't seem to fix it. I don't know if this matters, but I am using the "Instance Per Transaction CMP 2.x EntityBean" container configuration. As a side note, I am also running into a problem creating a new entity where between ejbCreate and ejbPostCreate I receive: java.lang.IllegalArgumentException: Entity primary key is null The stack trace is posted at the bottom of this email. However in ejbCreate I am setting the primary key and calling my getter again to log the primary key, so it is set (but perhaps not persisted). I have log messages in this entity that log when it enters and leaves both ejbCreate and ejbPostCreate and I get all the log messages from ejbCreate, but no messages from ejbPostCreate. This code has been working flawlessly in 3.2.1 and hasn't changed when deployed to 3.2.2. thanks -jason 2003-10-09 09:43:07,825 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract com.grcs.hedgehog.close.ejb.local.FXMarkToMarketLocal com.grcs.hedgehog.close.ejb.local.FXMarkToMarketLocalHome.create(com.grc s.hedgehog.close.ejb.local.FXTradeDetailLocal,int) throws javax.ejb.CreateException, causedBy: java.lang.IllegalArgumentException: Entity primary key is null at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache$PreloadKey.(ReadAhea dCache.java:691) at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.getPreloadDataMap(ReadAhea dCache.java:523) at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.load(ReadAheadCache.java:3 08) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEnt ityCommand.java:112) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEnt ityCommand.java:86) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadField(JDBCStoreManag er.java:582) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.getInstanceVa lue(JDBCCMP2xFieldBridge.java:129) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInst anceParameters(JDBCAbstractCMPFieldBridge.java:319) at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(J DBCAbstractCreateCommand.java:291) at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbs tractCreateCommand.java:144) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreMa nager.java:518) at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceM anager.java:208) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createE ntity(CachedConnectionInterceptor.java:269) at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityCont ainer.java:1042) at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor .java:88) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(Entity SynchronizationInterceptor.java:197) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeH ome(CachedConnectionInterceptor.java:214) at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor .java:88) at org.jboss.ejb.plugins.EntityMultiInstanceInterceptor.invokeHome(EntityMu ltiInstanceInterceptor.java:58) at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterce ptor.java:61) at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreatio nInterceptor.java:28) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterce ptor.java:88) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptor CMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java: 98) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor .java:92) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFact oryFinderInterceptor.java:93) at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:48 4) at org.jboss.ejb.Container.invoke(Container.java:720) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalPr oxyFactory.java:293) at org.jboss.ej
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
Alex That didn't seem to fix it. I don't know if this matters, but I am using the "Instance Per Transaction CMP 2.x EntityBean" container configuration. As a side note, I am also running into a problem creating a new entity where between ejbCreate and ejbPostCreate I receive: java.lang.IllegalArgumentException: Entity primary key is null The stack trace is posted at the bottom of this email. However in ejbCreate I am setting the primary key and calling my getter again to log the primary key, so it is set (but perhaps not persisted). I have log messages in this entity that log when it enters and leaves both ejbCreate and ejbPostCreate and I get all the log messages from ejbCreate, but no messages from ejbPostCreate. This code has been working flawlessly in 3.2.1 and hasn't changed when deployed to 3.2.2. thanks -jason 2003-10-09 09:43:07,825 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract com.grcs.hedgehog.close.ejb.local.FXMarkToMarketLocal com.grcs.hedgehog.close.ejb.local.FXMarkToMarketLocalHome.create(com.grc s.hedgehog.close.ejb.local.FXTradeDetailLocal,int) throws javax.ejb.CreateException, causedBy: java.lang.IllegalArgumentException: Entity primary key is null at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache$PreloadKey.(ReadAhea dCache.java:691) at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.getPreloadDataMap(ReadAhea dCache.java:523) at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.load(ReadAheadCache.java:3 08) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEnt ityCommand.java:112) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEnt ityCommand.java:86) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadField(JDBCStoreManag er.java:582) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.getInstanceVa lue(JDBCCMP2xFieldBridge.java:129) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInst anceParameters(JDBCAbstractCMPFieldBridge.java:319) at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(J DBCAbstractCreateCommand.java:291) at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbs tractCreateCommand.java:144) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreMa nager.java:518) at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceM anager.java:208) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createE ntity(CachedConnectionInterceptor.java:269) at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityCont ainer.java:1042) at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor .java:88) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(Entity SynchronizationInterceptor.java:197) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeH ome(CachedConnectionInterceptor.java:214) at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor .java:88) at org.jboss.ejb.plugins.EntityMultiInstanceInterceptor.invokeHome(EntityMu ltiInstanceInterceptor.java:58) at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterce ptor.java:61) at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreatio nInterceptor.java:28) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterce ptor.java:88) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptor CMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java: 98) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor .java:92) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFact oryFinderInterceptor.java:93) at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:48 4) at org.jboss.ejb.Container.invoke(Container.java:720) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalPr oxyFactory.java:293) at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:11 0) at $Proxy118.create(Unknown Source)
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
It was a bug that is fixed now. Could you, please, check it out in 24h? Thanks much! alex Jason Essington wrote: I am using a build from cvs as of this (10/7) morning. It claims to be RC5 the exact code that fails is record.remove(); from the previous example. From the debug output in the server.log file it appears that the relationships are severed and the record and it's recently severed relationships are deleted however after that happens JBoss must be performing a query to see who is left in the collection. It is that query that is failing with a SQLException. If there is more information I could supply you with, please let me know. These entities had been working perfectly in 3.2.1 and the code for them has not changed. -jason On Tuesday, October 7, 2003, at 01:22 PM, Alexey Loubyansky wrote: What JBoss version exactly are you using? 3.2.2RC5? Could you post the exact code that fails? Thanks, alex Jason Essington wrote: I have some code that worked just fine in 3.2.1 but now it is having trouble in the 3.2.2 branch of JBoss. I am getting an SQLException when I try to remove an entity that has a 1-m cascade delete relationship. The code I am using first gets a collection of entities via a finder then iterates over the collection calling .remove() on each entity something like: for (Iterator i = mtmRecords.iterator(); i.hasNext();) { FXMarkToMarketLocal record = (FXMarkToMarketLocal) i.next(); try { if (record != null) { if (log.isDebugEnabled()) log.debug("\nRemoving Mark to Market record "+ record.getRid().toString()+"\n"); record.remove(); } } catch (RemoveException e) { log.warn("Unable to remove an old mark to market record.", e); } } JBoss seems to go ahead and disassociate the related entities then delete the entity and it's related entities (which are to be cascaded) just fine, but when this is complete, it tries to issue the following SQL statement: SELECT rid, FROM tfxmtm WHERE (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) This statement appears to be missing all of its CMP fields (minus the pk field), and is not valid sql. This causes the exception shown below. Is there something I am doing that is no longer allowed in 3.2.2? Or is this just a bug? java.sql.SQLException: ERROR: parser: parse error at or near "FROM" at character 14 at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131) at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Conn ec tion.java:505) at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1State me nt.java:320) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2State me nt.java:48) at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1 St atement.java:153) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery( Wr appedPreparedStatement.java:302) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadE nt ityCommand.java:158) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadE nt ityCommand.java:76) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreMa na ger.java:577) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreMa na ger.java:559) at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceM an ager.java:381) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadE nt ity(CachedConnectionInterceptor.java:352) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySy nc hronizationInterceptor.java:239) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invok e( CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentra nc eInterceptor.java:114) at org.jboss.ejb.plugins.EntityMultiInstanceInterceptor.invoke(EntityMult iI nstanceInterceptor.java:108) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockIntercept or .java:89) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationI nt erceptor.java:54) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInter ce ptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercept or CMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:12 8) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.j av a:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugin
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
I am using a build from cvs as of this (10/7) morning. It claims to be RC5 the exact code that fails is record.remove(); from the previous example. From the debug output in the server.log file it appears that the relationships are severed and the record and it's recently severed relationships are deleted however after that happens JBoss must be performing a query to see who is left in the collection. It is that query that is failing with a SQLException. If there is more information I could supply you with, please let me know. These entities had been working perfectly in 3.2.1 and the code for them has not changed. -jason On Tuesday, October 7, 2003, at 01:22 PM, Alexey Loubyansky wrote: What JBoss version exactly are you using? 3.2.2RC5? Could you post the exact code that fails? Thanks, alex Jason Essington wrote: I have some code that worked just fine in 3.2.1 but now it is having trouble in the 3.2.2 branch of JBoss. I am getting an SQLException when I try to remove an entity that has a 1-m cascade delete relationship. The code I am using first gets a collection of entities via a finder then iterates over the collection calling .remove() on each entity something like: for (Iterator i = mtmRecords.iterator(); i.hasNext();) { FXMarkToMarketLocal record = (FXMarkToMarketLocal) i.next(); try { if (record != null) { if (log.isDebugEnabled()) log.debug("\nRemoving Mark to Market record "+ record.getRid().toString()+"\n"); record.remove(); } } catch (RemoveException e) { log.warn("Unable to remove an old mark to market record.", e); } } JBoss seems to go ahead and disassociate the related entities then delete the entity and it's related entities (which are to be cascaded) just fine, but when this is complete, it tries to issue the following SQL statement: SELECT rid, FROM tfxmtm WHERE (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) This statement appears to be missing all of its CMP fields (minus the pk field), and is not valid sql. This causes the exception shown below. Is there something I am doing that is no longer allowed in 3.2.2? Or is this just a bug? java.sql.SQLException: ERROR: parser: parse error at or near "FROM" at character 14 at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131) at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Conn ec tion.java:505) at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1State me nt.java:320) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2State me nt.java:48) at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1 St atement.java:153) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery( Wr appedPreparedStatement.java:302) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadE nt ityCommand.java:158) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadE nt ityCommand.java:76) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreMa na ger.java:577) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreMa na ger.java:559) at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceM an ager.java:381) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadE nt ity(CachedConnectionInterceptor.java:352) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySy nc hronizationInterceptor.java:239) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invok e( CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentra nc eInterceptor.java:114) at org.jboss.ejb.plugins.EntityMultiInstanceInterceptor.invoke(EntityMult iI nstanceInterceptor.java:108) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockIntercept or .java:89) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationI nt erceptor.java:54) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInter ce ptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercept or CMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:12 8) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.j av a:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactor yF inderInterceptor.java:122) at org.jboss.ejb.Entit
Re: [JBoss-user] SQLException from 3.2.2 branch when trying to remove an entity.
What JBoss version exactly are you using? 3.2.2RC5? Could you post the exact code that fails? Thanks, alex Jason Essington wrote: I have some code that worked just fine in 3.2.1 but now it is having trouble in the 3.2.2 branch of JBoss. I am getting an SQLException when I try to remove an entity that has a 1-m cascade delete relationship. The code I am using first gets a collection of entities via a finder then iterates over the collection calling .remove() on each entity something like: for (Iterator i = mtmRecords.iterator(); i.hasNext();) { FXMarkToMarketLocal record = (FXMarkToMarketLocal) i.next(); try { if (record != null) { if (log.isDebugEnabled()) log.debug("\nRemoving Mark to Market record "+ record.getRid().toString()+"\n"); record.remove(); } } catch (RemoveException e) { log.warn("Unable to remove an old mark to market record.", e); } } JBoss seems to go ahead and disassociate the related entities then delete the entity and it's related entities (which are to be cascaded) just fine, but when this is complete, it tries to issue the following SQL statement: SELECT rid, FROM tfxmtm WHERE (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) OR (rid=?) This statement appears to be missing all of its CMP fields (minus the pk field), and is not valid sql. This causes the exception shown below. Is there something I am doing that is no longer allowed in 3.2.2? Or is this just a bug? java.sql.SQLException: ERROR: parser: parse error at or near "FROM" at character 14 at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131) at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connec tion.java:505) at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Stateme nt.java:320) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stateme nt.java:48) at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc1St atement.java:153) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(Wr appedPreparedStatement.java:302) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEnt ityCommand.java:158) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEnt ityCommand.java:76) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreMana ger.java:577) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreMana ger.java:559) at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceMan ager.java:381) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEnt ity(CachedConnectionInterceptor.java:352) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySync hronizationInterceptor.java:239) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke( CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranc eInterceptor.java:114) at org.jboss.ejb.plugins.EntityMultiInstanceInterceptor.invoke(EntityMultiI nstanceInterceptor.java:108) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor .java:89) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInt erceptor.java:54) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterce ptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptor CMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.jav a:118) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryF inderInterceptor.java:122) at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:490) at org.jboss.ejb.Container.invoke(Container.java:700) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyF actory.java:375) at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38) at $Proxy399.getRid(Unknown Source) at com.grcs.hedgehog.close.ejb.session.DetailSelectionBean.closeCurrentPeri od(DetailSelectionBean.java:174) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Meth