users@glassfish.java.net

GlassFish: java.sql.SQLException: Not in a transaction

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Sep 2008 19:16:45 PDT

I am working with GlassFish (from NetBeans 6.1). We are using SLSBs and CMT. The transaction attribute is REQUIRED for all business methods. We are getting SQL exceptions all the time and it seems it just happen randomly. Here is the exception and thank you for the help.

Local Exception Stack:
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Not in a transaction
Error Code: 17063
Call: SELECT ID, CONTACT_PERSON, EMAIL, DESCRIPTION, PHONE, NAME, CREATED_DATE FROM WBID_CLIENT_SYSTEM
Query: ReportQuery(com.warnerbros.ads.wbid.core.entity.ClientSystem)
        at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:566)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
        at oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:473)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:285)
        at oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:615)
        at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2416)
        at oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2382)
        at oracle.toplink.essentials.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:802)
        at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
        at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
        at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746)
        at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
        at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
        at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
        at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:478)
        at com.warnerbros.ads.wbid.core.dao.ClientSystemDaoBean.findAll(ClientSystemDaoBean.java:36)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3986)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:127)
        at $Proxy142.findAll(Unknown Source)
        at my.package.admin.clientsystem.ClientSystemService.findAllClientSystems(ClientSystemService.java:26)
        at my.package.admin.ClientSystemsRequestBean.updateClientSystems(ClientSystemsRequestBean.java:125)
        at my.package.admin.ClientSystemsRequestBean.init(ClientSystemsRequestBean.java:79)
        at com.sun.rave.web.ui.appbase.servlet.LifecycleListener.fireInit(LifecycleListener.java:617)
        at com.sun.rave.web.ui.appbase.servlet.LifecycleListener.attributeAdded(LifecycleListener.java:452)
        at org.apache.coyote.tomcat5.CoyoteRequest.setAttribute(CoyoteRequest.java:1752)
        at org.apache.coyote.tomcat5.CoyoteRequestFacade.setAttribute(CoyoteRequestFacade.java:540)
        at javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:308)
        at com.sun.faces.context.RequestMap.put(ExternalContextImpl.java:1069)
        at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:560)
        at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
        at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
        at com.sun.webui.jsf.component.TableRowGroupBase.getSourceData(TableRowGroupBase.java:2758)
        at com.sun.webui.jsf.component.TableRowGroupBase.getTableRowDataProvider(TableRowGroupBase.java:582)
        at com.sun.webui.jsf.component.TableRowGroupBase.setRowKey(TableRowGroupBase.java:712)
        at com.sun.webui.jsf.component.TableRowGroupBase.iterate(TableRowGroupBase.java:1609)
        at com.sun.webui.jsf.component.TableRowGroupBase.processDecodes(TableRowGroupBase.java:1470)
        at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
        at com.sun.webui.jsf.component.WebuiComponent.processDecodes(WebuiComponent.java:79)
        at com.sun.webui.jsf.component.Form.processDecodes(Form.java:115)
        at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
        at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
        at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
        at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
        at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:493)
        at com.sun.faces.extensions.avatar.components.PartialTraversalViewRootImpl.processDecodes(PartialTraversalViewRootImpl.java:147)
        at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
        at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:94)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
        at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
        at my.package.admin.web.AuthorizationFilter.doFilter(AuthorizationFilter.java:151)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
        at my.package.admin.web.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.sql.SQLException: Not in a transaction
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:285)
        at oracle.jdbc.driver.OracleConnection.needLine(OracleConnection.java:2015)
        at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:498)
        at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:518)
        at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:210)
        at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:193)
        at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.java:869)
        at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:704)
        at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:475)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1162)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:612)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:485)
[Message sent by forum member 'jinsongyang' (jinsongyang)]

http://forums.java.net/jive/thread.jspa?messageID=298933