3 Replies Latest reply on Oct 20, 2008 2:18 PM by Stephan H

    Security Exception when switching to Database Authentication

    Stephan H Newbie

      I'm working my way through http://docs.jboss.org/jbossas/getting_started/v5/html/dukesbank.html

      When I switched from password file to database security, I can log in, but when the main page is built, I get this stacktrace and don't know where to look to fix it.

      2008-10-20 12:59:11,362 ERROR [STDERR] Debug: Creating bean manager.
      2008-10-20 12:59:11,381 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: fmizw61h-n
      2008-10-20 12:59:11,382 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.sun.ebank.ejb.customer.CustomerControllerBean.ejbCreate()
      2008-10-20 12:59:11,382 ERROR [STDERR] Debug: CustomerControllerBean ejbCreate
      2008-10-20 12:59:11,421 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2008-10-20 12:59:11,442 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: fmizw636-o
      2008-10-20 12:59:11,442 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.sun.ebank.ejb.account.AccountControllerBean.ejbCreate()
      2008-10-20 12:59:11,442 ERROR [STDERR] Debug: AccountControllerBean ejbCreate
      2008-10-20 12:59:11,462 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2008-10-20 12:59:11,499 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: fmizw64r-p
      2008-10-20 12:59:11,500 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.sun.ebank.ejb.tx.TxControllerBean.ejbCreate()
      2008-10-20 12:59:11,514 ERROR [STDERR] Debug: TxControllerBean ejbCreate
      2008-10-20 12:59:11,542 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2008-10-20 12:59:11,551 ERROR [STDERR] Debug: /main
      2008-10-20 12:59:11,551 ERROR [STDERR] Debug: Forwarding to template.
      2008-10-20 12:59:11,574 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: fmizw66u-q
      2008-10-20 12:59:11,575 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.sun.ebank.ejb.customer.CustomerControllerBean.ejbCreate()
      2008-10-20 12:59:11,575 ERROR [STDERR] Debug: CustomerControllerBean ejbCreate
      2008-10-20 12:59:11,591 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2008-10-20 12:59:11,614 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: fmizw67y-r
      2008-10-20 12:59:11,614 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.sun.ebank.ejb.account.AccountControllerBean.ejbCreate()
      2008-10-20 12:59:11,615 ERROR [STDERR] Debug: AccountControllerBean ejbCreate
      2008-10-20 12:59:11,632 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2008-10-20 12:59:11,642 DEBUG [org.jboss.ejb.StatefulSessionContainer] Created new session ID: fmizw68q-s
      2008-10-20 12:59:11,642 DEBUG [org.jboss.ejb.StatefulSessionContainer] Using create method for session: public void com.sun.ebank.ejb.tx.TxControllerBean.ejbCreate()
      2008-10-20 12:59:11,642 ERROR [STDERR] Debug: TxControllerBean ejbCreate
      2008-10-20 12:59:11,678 DEBUG [org.jboss.proxy.ejb.ProxyFactory] seting invoker proxy binding for stateful session: stateful-rmi-invoker
      2008-10-20 12:59:11,680 ERROR [STDERR] Debug: AccountControllerBean getAccountsOfCustomer
      2008-10-20 12:59:11,693 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException in method: public abstract java.util.ArrayList com.sun.ebank.ejb.account.AccountController.getAccountsOfCustomer(java.lang.String) throws java.rmi.RemoteException,com.sun.ebank.ejb.exception.InvalidParameterException,com.sun.ebank.ejb.exception.CustomerNotFoundException:
      javax.ejb.EJBException: SecurityException
       at com.sun.ebank.ejb.account.AccountControllerBean.getAccountsOfCustomer(AccountControllerBean.java:216)
       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 org.jboss.invocation.Invocation.performCall(Invocation.java:359)
       at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:598)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
       at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:330)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
       at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
       at org.jboss.ejb.Container.invoke(Container.java:954)
       at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
       at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
       at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
       at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
       at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
       at $Proxy78.getAccountsOfCustomer(Unknown Source)
       at com.sun.ebank.web.CustomerBean.getAccounts(CustomerBean.java:113)
       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 org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:314)
       at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
       at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
       at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
       at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:917)
       at org.apache.jsp.template.links_jsp._jspx_meth_c_set_0(links_jsp.java:161)
       at org.apache.jsp.template.links_jsp._jspService(links_jsp.java:84)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
       at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
       at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
       at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:602)
       at com.sun.ebank.web.template.InsertTag.doTag(InsertTag.java:82)
       at org.apache.jsp.template.template_jsp._jspx_meth_tt_insert_2(template_jsp.java:911)
       at org.apache.jsp.template.template_jsp._jspService(template_jsp.java:87)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at com.sun.ebank.web.Dispatcher.doGet(Dispatcher.java:91)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:613)
      2008-10-20 12:59:11,724 ERROR [STDERR] Debug: EJBException:; nested exception is:
       javax.ejb.EJBException: SecurityException
      2008-10-20 13:00:19,801 ERROR [STDERR] Debug: AccountControllerBean ejbPassiavte
      2008-10-20 13:02:07,116 ERROR [STDERR] Debug: TxControllerBean ejbPassiavte
      2008-10-20 13:02:07,143 ERROR [STDERR] Debug: TxControllerBean ejbPassiavte
      2008-10-20 13:02:07,146 ERROR [STDERR] Debug: TxControllerBean ejbPassiavte