Thanks for your suggestions. Here is the full stack of exceptions we're getting. We will discuss these options and see what will work. I'll update after that.
8916 | prodent2.nfib.org/192.168.10.212 | Query current year/quarter not defined in SalesServiceImpl.java
org.objectstyle.cayenne.CayenneRuntimeException: [v.1.1-dev February 7 2005] Query exception. at org.objectstyle.cayenne.access.util.SelectObserver.nextQueryException(SelectObserver.java:213) at org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:364) at org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:654) at org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1408) at org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:179) at org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1366) at org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1622) at org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1485) at org.nfib.core.service.sales.SalesServicesImpl.getTransCurrentWeekEndindData(Unknown Source) at org.nfib.core.service.ejb.sales.SalesServiceBean.getTransCurrentWeekEndindData(Unknown Source) at sun.reflect.GeneratedMethodAccessor650.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331) at org.jboss.ejb.Container.invoke(Container.java:723) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:359) at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83) at $Proxy68.getTransCurrentWeekEndindData(Unknown Source) at org.nfib.core.delegate.SalesServiceDelegate.getTransCurrentWeekEndindData(Unknown Source) at org.nfib.web.invMgmt.DispostionHistoryAction.unspecified(Unknown Source) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:256) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194) at org.nfib.web.action.NfibDispatchAction.execute(Unknown Source) at org.nfib.web.invMgmt.InvMgmtCommonAction.execute(Unknown Source) at org.nfib.web.invMgmt.DispostionHistoryAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:430) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.nfib.web.AuthenticationFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:297) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:371) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:731) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:663) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:859) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)Caused by: java.sql.SQLException: ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package "MEMBERSHIP.BAS" has been invalidated
ORA-04065: not executed, altered or dropped package "MEMBERSHIP.BAS"
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 1
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289) at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582) at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986) at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144) at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152) at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609) at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:685) at org.objectstyle.cayenne.access.DataNode.runStoredProcedure(DataNode.java:641) at org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:345) ... 71 more
-----Original Message-----
From: Andrus Adamchik [mailto:andru..bjectstyle.org]
Sent: Thursday, April 07, 2005 1:36 PM
To: cayenne-use..bjectstyle.org
Subject: RE: Reset Cayenne Connection Pool
Hmm... Cayenne pool can auto-reconnect Oracle connections behind the
scenes on some (but not all) failures. Could you post the full stack of
exception?
Anyway, lets discuss the options... Cayenne stack uses standard
DataSource interface to obtain connections. Cayenne PoolManager class is a
default implementation. So you can do *either* of these:
(1) Get a DataSource from DataNode, cast it to PoolManager, call
"dispose()", create new PoolManager and set it as a new DataSource of a
DataNode.
(2) Subclass PoolManager to implement "reset" instead of "dispose", to
keep using the same pool.
(3) Test your app Apache DBCP connection pool, that has more advanced
"auto-reconnect-on-failure" support. It can be used as a replacement of
PoolManager. And in 1.2 it is even supported by the Modeler.
(1) and (2) have a small window when other threads may get errors while
you are handling an error in any one given thread. So if (3) works, it
should be a more reliable option...
Andrus
> Hello guys,
>
> To add to Beth's description - we are getting the following Oracle Error
>
> Caused by: java.sql.SQLException: ORA-04068: existing state of packages
> has been discarded ORA-04061: existing state of package body
> "MEMBERSHIP.SLS" has been invalidated ORA-04065: not executed, altered
> or dropped package body "MEMBERSHIP.SLS" ORA-06508: PL/SQL: could not
> find program unit being called
> ORA-06512: at line 1
>
> through Cayenne after we make changes to a Package and then recompile.
> We are speculating that the pooled connections are caching (on the
> Oracle side) an invalid reference to the Package. After we get the
> failure for a given connection - the call will work if tried again. I
> believe there is a default behavior with the Oracle JDBC driver that
> causes it to try to recompile the package/procedure and refresh it's
> pointer after such a failure. We'd really like to figure out a way to
> cause the Cayenne connection pool to reset (rebuild). We could then
> trigger it on demand so we don't have to restart the application servers
> in order to avoid such an error.
>
> Thanks,
>
> Brian
>
>
> -----Original Message-----
> From: Williams, Beth
> Sent: Thursday, April 07, 2005 9:45 AM
> To: cayenne-use..bjectstyle.org
> Subject: Reset Cayenne Connection Pool
>
>
> We have noticed some application errors related to connection pool and
> changes to stored procedures. We are using several stored procedures
> through the cayenne ProcedureQuery. What we've found is that when and
> if a change is made to one of the packages in the database the state of
> the package is invalidated and the connection pool is discarded. This
> results in an error for the user. The connection pool is reset and so
> the next time the user tries it will work.
>
> Is there a way to reset the Cayenne connection pool through the API so
> that we don't have to restart the server? Thanks in advance.
>
> Beth Williams
> Web Applications Developer, NFIB
> 53 Century Blvd
> Nashville, TN 37214
> 615.872.5332
> beth.william..fib.org
This archive was generated by hypermail 2.0.0 : Thu Apr 07 2005 - 14:41:54 EDT