Home » Eclipse Projects » EclipseLink » stackOverFlowError
stackOverFlowError [message #871620] |
Mon, 14 May 2012 10:35  |
Eclipse User |
|
|
|
Getting a stackoverflow with a onetoone relationship between two entities.
Attached a screen print of the eclipse debug session.
The 2 entities are called CpTransaction and CpTransCoverage.
Field/mapping info for the CpTransaction class entity:
@OneToOne(cascade = CascadeType.ALL, mappedBy = "cpTransaction")
@PrivateOwned
@JoinTable(name = "CP_COVERAGE", joinColumns = @JoinColumn(name = "PARENT_ID", referencedColumnName = "TRANSACTION_ID"))
private CpTransCoverage cpTerrorismCoverage;
Field/mapping info for the CpTransCoverage class entity:
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "PARENT_ID", nullable = false)
private CpTransaction cpTransaction;
|
|
| | |
Re: stackOverFlowError [message #871706 is a reply to message #871690] |
Mon, 14 May 2012 13:56   |
Eclipse User |
|
|
|
When I removed the "MappedBy" parm in CpTransaction, I get the following error
Internal Exception: java.sql.SQLException: [SQL0205] Column CPTERRORISMCOVERAGE_COVERAGE_ID not in table CP_COVERAGE in WBQUOTEVI.
Error Code: -205
Call: SELECT t1.COVERAGE_ID, t1.COVERAGE_TYPE, t1.BUILDING_NUMBER, t1.COV_GROUP, t1.COVERAGE_CLASS_CODE, t1.COVERAGE_CODE, t1.COVERAGE_DESC, t1.FORM_NUMBER, t1.LIABILITY_LIMIT, t1.LOB_CODE, t1.LOCATION_NUMBER, t1.PREMIUM_ACTUAL, t1.PREMIUM_MEET_MIN, t1.PREMIUM_MIN, t1.PREMIUM_OVERRIDE, t1.PREMIUM_OVERRIDE_RESET, t1.PREMIUM_PREVIOUS, t1.PREMIUM_PREVIOUS_PRO, t1.RATED_COVERAGE_FLAG, t1.RATING_MODIFIED_RATE, t1.RATING_ORIGINAL_RATE, t1.RATING_RMF, t1.SORT_SEQ, t1.STATE_CODE, t1.SUBCOVERAGE_DESC, t1.ACTION_CODE, t1.BLANKET_ID, t1.PARENT_ID FROM CP_COVERAGE t0, CP_COVERAGE t1 WHERE (((t0.PARENT_ID = ?) AND (t1.COVERAGE_ID = t0.cpTerrorismCoverage_COVERAGE_ID)) AND (t1.COVERAGE_TYPE = ?))
bind => [81111, P]
Query: ReadObjectQuery(name="cpTerrorismCoverage" referenceClass=CpTransCoverage sql="SELECT t1.COVERAGE_ID, t1.COVERAGE_TYPE, t1.BUILDING_NUMBER, t1.COV_GROUP, t1.COVERAGE_CLASS_CODE, t1.COVERAGE_CODE, t1.COVERAGE_DESC, t1.FORM_NUMBER, t1.LIABILITY_LIMIT, t1.LOB_CODE, t1.LOCATION_NUMBER, t1.PREMIUM_ACTUAL, t1.PREMIUM_MEET_MIN, t1.PREMIUM_MIN, t1.PREMIUM_OVERRIDE, t1.PREMIUM_OVERRIDE_RESET, t1.PREMIUM_PREVIOUS, t1.PREMIUM_PREVIOUS_PRO, t1.RATED_COVERAGE_FLAG, t1.RATING_MODIFIED_RATE, t1.RATING_ORIGINAL_RATE, t1.RATING_RMF, t1.SORT_SEQ, t1.STATE_CODE, t1.SUBCOVERAGE_DESC, t1.ACTION_CODE, t1.BLANKET_ID, t1.PARENT_ID FROM CP_COVERAGE t0, CP_COVERAGE t1 WHERE (((t0.PARENT_ID = ?) AND (t1.COVERAGE_ID = t0.cpTerrorismCoverage_COVERAGE_ID)) AND (t1.COVERAGE_TYPE = ?))")} Local Exception Stack: ;Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException;Internal Exception: java.sql.SQLException: [SQL0205] Column CPTERRORISMCOVERAGE_COVERAGE_ID not in table CP_COVERAGE in WBQUOTEVI.;Error Code: -205;Call: SELECT t1.COVERAGE_ID, t1.COVERAGE_TYPE, t1.BUILDING_NUMBER, t1.COV_GROUP, t1.COVERAGE_CLASS_CODE, t1.COVERAGE_CODE, t1.COVERAGE_DESC, t1.FORM_NUMBER, t1.LIABILITY_LIMIT, t1.LOB_CODE, t1.LOCATION_NUMBER, t1.PREMIUM_ACTUAL, t1.PREMIUM_MEET_MIN, t1.PREMIUM_MIN, t1.PREMIUM_OVERRIDE, t1.PREMIUM_OVERRIDE_RESET, t1.PREMIUM_PREVIOUS, t1.PREMIUM_PREVIOUS_PRO, t1.RATED_COVERAGE_FLAG, t1.RATING_MODIFIED_RATE, t1.RATING_ORIGINAL_RATE, t1.RATING_RMF, t1.SORT_SEQ, t1.STATE_CODE, t1.SUBCOVERAGE_DESC, t1.ACTION_CODE, t1.BLANKET_ID, t1.PARENT_ID FROM CP_COVERAGE t0, CP_COVERAGE t1 WHERE (((t0.PARENT_ID = ?) AND (t1.COVERAGE_ID = t0.cpTerrorismCoverage_COVERAGE_ID)) AND (t1.COVERAGE_TYPE = ?));bind => [81111, P];Query: ReadObjectQuery(name="cpTerrorismCoverage" referenceClass=CpTransCoverage sql="SELECT t1.COVERAGE_ID, t1.COVERAGE_TYPE, t1.BUILDING_NUMBER, t1.COV_GROUP, t1.COVERAGE_CLASS_CODE, t1.COVERAGE_CODE, t1.COVERAGE_DESC, t1.FORM_NUMBER, t1.LIABILITY_LIMIT, t1.LOB_CODE, t1.LOCATION_NUMBER, t1.PREMIUM_ACTUAL, t1.PREMIUM_MEET_MIN, t1.PREMIUM_MIN, t1.PREMIUM_OVERRIDE, t1.PREMIUM_OVERRIDE_RESET, t1.PREMIUM_PREVIOUS, t1.PREMIUM_PREVIOUS_PRO, t1.RATED_COVERAGE_FLAG, t1.RATING_MODIFIED_RATE, t1.RATING_ORIGINAL_RATE, t1.RATING_RMF, t1.SORT_SEQ, t1.STATE_CODE, t1.SUBCOVERAGE_DESC, t1.ACTION_CODE, t1.BLANKET_ID, t1.PARENT_ID FROM CP_COVERAGE t0, CP_COVERAGE t1 WHERE (((t0.PARENT_ID = ?) AND (t1.COVERAGE_ID = t0.cpTerrorismCoverage_COVERAGE_ID)) AND (t1.COVERAGE_TYPE = ?))");at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333);at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:684);at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526);at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1729);at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566);at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207);at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193);at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:667);at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2603);at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2574);at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:444);at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1080);at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:808);at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040);at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:412);at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2800);at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1521);at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1503);at org.eclipse.persistence.internal.indirection.NoIndirectionPolicy.valueFromQuery(NoIndirectionPolicy.java:323);at org.eclipse.persistence.mappings.ForeignReferenceMapping.valueFromRowInternal(ForeignReferenceMapping.java:2061);at org.eclipse.persistence.mappings.OneToOneMapping.valueFromRowInternal(OneToOneMapping.java:1635);at org.eclipse.persistence.mappings.ForeignReferenceMapping.valueFromRow(ForeignReferenceMapping.java:1950);at org.eclipse.persistence.mappings.ForeignReferenceMapping.readFromRowIntoObject(ForeignReferenceMapping.java:1332);at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:344);at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:694);at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java:612);at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:565);at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:497);at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:456);at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:723);at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:742);at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:423);at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1080);at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:808);at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040);at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:383);at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1126);at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2842);at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1521);at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1503);at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1477);at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:484);at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:741);at com.gmrc.jpa.domain.controller.CpTransactionManagerImpl.findByProperty(CpTransactionManagerImpl.java:921);at com.gmrc.jpa.domain.controller.CpTransactionManagerImpl.findByPolicyNumber(CpTransactionManagerImpl.java:750);at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method);at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60);at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37);at java.lang.reflect.Method.invoke(Method.java:611);at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307);at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182);at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149);at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138);at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171);at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106);at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171);at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204);at $Proxy122.findByPolicyNumber(Unknown Source);at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method);at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60);at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37);at java.lang.reflect.Method.invoke(Method.java:611);at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307);at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198);at $Proxy123.findByPolicyNumber(Unknown Source);at com.gmrc.jpa.domain.service.ManagedCpTransactionService.isLastTransactionCheck(ManagedCpTransactionService.java:138);at com.gmrc.cpp.struts.actions.OpenAction.open(OpenAction.java:142);at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method);at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60);at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37);at java.lang.reflect.Method.invoke(Method.java:611);at com.gmrc.cpp.struts.actions.CppBaseAction.dispatchMethod(CppBaseAction.java:962);at com.gmrc.cpp.struts.actions.CppBaseAction.execute(CppBaseAction.java:330);at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110);at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431);at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236);at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196);at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414);at javax.servlet.http.HttpServlet.service(HttpServlet.java:575);at javax.servlet.http.HttpServlet.service(HttpServlet.java:668);at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214);at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774);at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456);at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178);at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125);at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92);at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:46);at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192);at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89);at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926);at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023);at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3703);at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304);at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962);at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662);at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195);at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452);at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511);at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305);at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83);at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165);at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217);at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161);at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138);at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204);at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775);at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905);at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659);Caused by: java.sql.SQLException: [SQL0205] Column CPTERRORISMCOVERAGE_COVERAGE_ID not in table CP_COVERAGE in WBQUOTEVI.;at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650);at com.ibm.as400.access.JDError.throwSQLException(JDError.java:621);at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1557);at com.ibm.as400.access.AS400JDBCPreparedStatement.<init>(AS400JDBCPreparedStatement.java:193);at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:2025);at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java:1967);at com.ibm.as400.access.AS400JDBCConnectionHandle.prepareStatement(AS400JDBCConnectionHandle.java:915);at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.pmiPrepareStatement(WSJdbcConnection.java:2530);at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:2775);at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:2723);at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1402);at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1351);at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:658);at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:576);... 106 more;
|
|
| | | | | | | | |
Re: stackOverFlowError [message #873230 is a reply to message #873218] |
Thu, 17 May 2012 14:57  |
Eclipse User |
|
|
|
@Cache(type=CacheType.NONE, alwaysRefresh = true) is what is likely causing the problem. Try removing the type=CacheType.NONE as this is very bad - In conjunction with the alwaysRefresh and the always cascade and the bidirectional relationships, it means when it goes to build one object from the database it will always then have to build the CP_TRANSACTION, which will inturn cause the referenced object to be again rebuilt from the database (since the object being built in the cache). Using CacheType.NONE really should be avoided except in extreme situations. As the javadoc for the setting notes "This cache type should not be used to disable caching, to properly disable caching set the @Cache isolation attribute to ISOLATED."
Hope this helps.
Best Regards,
Chris
|
|
|
Goto Forum:
Current Time: Wed Jul 23 19:15:19 EDT 2025
Powered by FUDForum. Page generated in 0.05899 seconds
|