5 Replies Latest reply on Mar 25, 2003 10:37 AM by Adrian Brock

    my EJBException not wrapped in RemoteException

    Tarek Kassem Newbie

      Due to database error, I am throwing EJBException from ejbStore of entity bean.
      throw new EJBException("My error message");
      This bean is called from stateless session bean with CMT required. Thus my EJBException is caught by the container and thrown to the client as RemoteException.
      Here comes the problem the RemoteException does not wrap my original exception at all.
      I am using jboss-3.0.4_tomcat-4.1.12.

      PLease Help

        • 1. Re: my EJBException not wrapped in RemoteException
          Adrian Brock Master

          This works for me.

          Perhaps you can show the stacktrace
          from the server log?

          Also try the latest version of jboss, there
          was some recent work done to tidyup some of the
          exception handling.

          Regards,
          Adrian

          • 2. Re: my EJBException not wrapped in RemoteException
            Tarek Kassem Newbie

            The stack trace:
            2003-03-24 07:28:55,511 ERROR [STDERR] javax.transaction.TransactionRolledbackException: Exception in store of entity :31; CausedByException is:
            Exception in store of entity :31; nested exception is:
            javax.transaction.TransactionRolledbackException: Exception in store of entity :31
            2003-03-24 07:28:55,511 ERROR [STDERR] javax.transaction.TransactionRolledbackException: Exception in store of entity :31
            2003-03-24 07:28:55,511 ERROR [STDERR] void org.jboss.ejb.GlobalTxEntityMap.syncEntities(javax.transaction.Transaction)
            2003-03-24 07:28:55,511 ERROR [STDERR] GlobalTxEntityMap.java:128
            2003-03-24 07:28:55,511 ERROR [STDERR] void org.jboss.ejb.EntityContainer.synchronizeEntitiesWithinTransaction(javax.transaction.Transaction)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntityContainer.java:172
            2003-03-24 07:28:55,511 ERROR [STDERR] void org.jboss.ejb.EntityContainer.remove(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntityContainer.java:504
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
            2003-03-24 07:28:55,511 ERROR [STDERR] native code
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntityContainer.java:1173
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntitySynchronizationInterceptor.java:297
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] CachedConnectionInterceptor.java:186
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntityReentranceInterceptor.java:90
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntityInstanceInterceptor.java:163
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.EntityLockInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntityLockInterceptor.java:107
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] EntityCreationInterceptor.java:69
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(org.jboss.invocation.Invocation, boolean)
            2003-03-24 07:28:55,511 ERROR [STDERR] AbstractTxInterceptor.java:107
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] TxInterceptorCMT.java:178
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.TxInterceptorCMT.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] TxInterceptorCMT.java:60
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.SecurityInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,511 ERROR [STDERR] SecurityInterceptor.java:130
            2003-03-24 07:28:55,511 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.LogInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,527 ERROR [STDERR] LogInterceptor.java:204
            2003-03-24 07:28:55,527 ERROR [STDERR] java.lang.Object org.jboss.ejb.EntityContainer.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,527 ERROR [STDERR] EntityContainer.java:493
            2003-03-24 07:28:55,527 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
            2003-03-24 07:28:55,542 ERROR [STDERR] BaseLocalContainerInvoker.java:301
            2003-03-24 07:28:55,542 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
            2003-03-24 07:28:55,542 ERROR [STDERR] LocalHomeProxy.java:105
            2003-03-24 07:28:55,542 ERROR [STDERR] void $Proxy124.remove(java.lang.Object)
            2003-03-24 07:28:55,542 ERROR [STDERR] ae.comtrust.crm.ui.customer.CustomerDataObject ae.comtrust.crm.cis.CISManagerBean.modifyCustomer(ae.comtrust.crm.ui.customer.CustomerDataObject)
            2003-03-24 07:28:55,542 ERROR [STDERR] CISManagerBean.java:355
            2003-03-24 07:28:55,542 ERROR [STDERR] java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
            2003-03-24 07:28:55,558 ERROR [STDERR] native code
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] StatelessSessionContainer.java:660
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] CachedConnectionInterceptor.java:186
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] StatelessSessionInstanceInterceptor.java:77
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(org.jboss.invocation.Invocation, boolean)
            2003-03-24 07:28:55,558 ERROR [STDERR] AbstractTxInterceptor.java:107
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] TxInterceptorCMT.java:178
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.TxInterceptorCMT.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] TxInterceptorCMT.java:60
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.SecurityInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] SecurityInterceptor.java:130
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.plugins.LogInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] LogInterceptor.java:204
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.StatelessSessionContainer.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] StatelessSessionContainer.java:313
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.ejb.Container.invoke(java.lang.String, java.lang.Object[], java.lang.String[])
            2003-03-24 07:28:55,558 ERROR [STDERR] Container.java:712
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.mx.server.MBeanServerImpl.invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[])
            2003-03-24 07:28:55,558 ERROR [STDERR] MBeanServerImpl.java:517
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.invocation.local.LocalInvoker.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] LocalInvoker.java:98
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.invocation.InvokerInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] InvokerInterceptor.java:102
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.proxy.TransactionInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] TransactionInterceptor.java:77
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.proxy.SecurityInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] SecurityInterceptor.java:80
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(org.jboss.invocation.Invocation)
            2003-03-24 07:28:55,558 ERROR [STDERR] StatelessSessionInterceptor.java:111
            2003-03-24 07:28:55,558 ERROR [STDERR] java.lang.Object org.jboss.proxy.ClientContainer.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
            2003-03-24 07:28:55,558 ERROR [STDERR] ClientContainer.java:76
            2003-03-24 07:28:55,558 ERROR [STDERR] ae.comtrust.crm.ui.customer.CustomerDataObject $Proxy144.modifyCustomer(ae.comtrust.crm.ui.customer.CustomerDataObject)
            2003-03-24 07:28:55,558 ERROR [STDERR] ae.comtrust.crm.ui.customer.CustomerDataObject ae.comtrust.crm.ui.customer.CustomerUtility.modifyCustomer(ae.comtrust.crm.ui.customer.CustomerDataObject)
            2003-03-24 07:28:55,558 ERROR [STDERR] CustomerUtility.java:68
            2003-03-24 07:28:55,558 ERROR [STDERR] void ae.comtrust.crm.ui.customer.ServletManageCustomer.doExecuteModify(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] ServletManageCustomer.java:178
            2003-03-24 07:28:55,558 ERROR [STDERR] void ae.comtrust.crm.ui.customer.ServletManageCustomer.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] ServletManageCustomer.java:61
            2003-03-24 07:28:55,558 ERROR [STDERR] void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] HttpServlet.java:740
            2003-03-24 07:28:55,558 ERROR [STDERR] void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] HttpServlet.java:853
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] ApplicationFilterChain.java:247
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] ApplicationFilterChain.java:193
            2003-03-24 07:28:55,558 ERROR [STDERR] void ae.comtrust.crm.ui.security.AuthenticationFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
            2003-03-24 07:28:55,558 ERROR [STDERR] AuthenticationFilter.java:34
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] ApplicationFilterChain.java:213
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.ApplicationFilterChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
            2003-03-24 07:28:55,558 ERROR [STDERR] ApplicationFilterChain.java:193
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardWrapperValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardWrapperValve.java:260
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardPipeline.java:643
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardPipeline.java:480
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] ContainerBase.java:995
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardContextValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardContextValve.java:191
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardPipeline.java:643
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.valves.CertificatesValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,558 ERROR [STDERR] CertificatesValve.java:246
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardPipeline.java:641
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardPipeline.java:480
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] ContainerBase.java:995
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardContext.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardContext.java:2396
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardHostValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardHostValve.java:180
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardPipeline.java:643
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.valves.ErrorDispatcherValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,558 ERROR [STDERR] ErrorDispatcherValve.java:170
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,558 ERROR [STDERR] StandardPipeline.java:641
            2003-03-24 07:28:55,558 ERROR [STDERR] void org.apache.catalina.valves.ErrorReportValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,558 ERROR [STDERR] ErrorReportValve.java:172
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,574 ERROR [STDERR] StandardPipeline.java:641
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.valves.AccessLogValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,574 ERROR [STDERR] AccessLogValve.java:469
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,574 ERROR [STDERR] StandardPipeline.java:641
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,574 ERROR [STDERR] StandardPipeline.java:480
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,574 ERROR [STDERR] ContainerBase.java:995
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.StandardEngineValve.invoke(org.apache.catalina.Request, org.apache.catalina.Response, org.apache.catalina.ValveContext)
            2003-03-24 07:28:55,574 ERROR [STDERR] StandardEngineValve.java:174
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,574 ERROR [STDERR] StandardPipeline.java:643
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.StandardPipeline.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,574 ERROR [STDERR] StandardPipeline.java:480
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.core.ContainerBase.invoke(org.apache.catalina.Request, org.apache.catalina.Response)
            2003-03-24 07:28:55,574 ERROR [STDERR] ContainerBase.java:995
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.connector.http.HttpProcessor.process(java.net.Socket)
            2003-03-24 07:28:55,574 ERROR [STDERR] HttpProcessor.java:1040
            2003-03-24 07:28:55,574 ERROR [STDERR] void org.apache.catalina.connector.http.HttpProcessor.run()
            2003-03-24 07:28:55,574 ERROR [STDERR] HttpProcessor.java:1151
            2003-03-24 07:28:55,574 ERROR [STDERR] void java.lang.Thread.run()
            2003-03-24 07:28:55,574 ERROR [STDERR] Thread.java:484

            • 3. Re: my EJBException not wrapped in RemoteException
              Adrian Brock Master

              Yep,

              The latest version includes a version of transaction
              rolled back that wraps the causing exception.

              Regards,
              Adrian

              • 4. Re: my EJBException not wrapped in RemoteException
                Tarek Kassem Newbie

                As far as I know the latest final release
                JBoss- 3.0.6_Tomcat-4.1.18.zip
                I tested this release and I can say that the TransactionRolledBack exception thrown to the client does not wrap my original exception.

                Please Help.

                • 5. Re: my EJBException not wrapped in RemoteException
                  Adrian Brock Master

                  Sorry,

                  By latest version I meant the one from CVS
                  jboss-3.0.7RC1

                  Regards,
                  Adrian