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.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactor yF 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(BaseLocalProx yF 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.closeCurrentPe ri od(DetailSelectionBean.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j av a:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess or Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(St at elessSessionContainer.java:683)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invok e( CachedConnectionInterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(State le ssSessionInstanceInterceptor.java:72)
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.StatelessSessionContainer.internalInvoke(StatelessSessio nC ontainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProx yF actory.java:375)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSess io nProxy.java:83)
at $Proxy441.closeCurrentPeriod(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j av a:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess or Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.ja va :402)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider. ja va:309)
at org.jboss.net.axis.server.EJBProvider.processMessage(EJBProvider.java: 26 0)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:3 33 )
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy .j ava:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854 )
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase .j ava:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli ca tionFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi lt erChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa lv e.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :4 80)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa lv e.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:643)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecuri ty MgrRealm.java:228)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticat or Base.java:553)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve. ja va:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(Contain er StatsValve.java:76)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :4 80)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2 41 6)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja va :180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher Va lve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja va :172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Security As sociationValve.java:65)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:5 77 )
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :4 80)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv e. java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext .i nvokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java :4 80)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223 )
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 60 1)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces sC onnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 56 5)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo ol .java:619)
at java.lang.Thread.run(Thread.java:554)
-jason




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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

Reply via email to