1 Reply Latest reply on Jan 29, 2002 9:53 AM by Roman

    Authentication Exception,principal=null

    Aanchal Newbie

      Hi,


      I am currently applying security to my Jsp pages which in turn according to method permissions set in the ejb-jar file call the respective EJB's . I made the changes in my web.xml file,and on execution , i am asked to enter username and passed by the server when that jsp page is caled. The DatabaseServerLoginModule method works fine and i get to log onto the next jsp page which in turn calls the EJB's. The output on correct login is as follows :


      2002-01-28 03:12:59 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECT Password FROM Pos.Users WHERE LoginID = ?
      2002-01-28 03:13:02 - ContextManager: JDBCRealm: Authentication successful for user admin
      2002-01-28 03:13:02 - ContextManager: JDBCRealm: Auth ok, user=admin
      2002-01-28 03:13:02 - ContextManager: JDBCRealm: Controled access for admin R(+ /beantest/EJBTest.jsp + null) Ct (jsp(org.apache.jasper.servlet.JspServlet/nul
      l) )
      2002-01-28 03:13:02 - ContextManager: JDBCRealm: The database connection is null or was found to be closed. Trying to re-open it.
      2002-01-28 03:13:02 - ContextManager: JDBCRealm: JDBCRealm.roles: SELECT RoleName FROM Pos.UserRoles WHERE LoginID = ?
      2002-01-28 03:13:02 - ContextManager: JDBCRealm: Auth ok, first role=admin




      But on the next page when i try to access the EJB's it throws an authentication error .I am pasting the error as got on the jboss server :

      LoginException: No matching username found in Principals
      [A2G_CustomersSB] Authentication exception, principal=null
      [EmbeddedTomcatSX] Error occurred in trying to invoke [A2G_CustomersSB.readInput()null
      [EmbeddedTomcatSX] java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
      java.lang.SecurityException: Authentication exception, principal=null
      [EmbeddedTomcatSX] java.lang.SecurityException: Authentication exception, principal=null
      [EmbeddedTomcatSX] at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:213)
      [EmbeddedTomcatSX] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:144)
      [EmbeddedTomcatSX] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
      [EmbeddedTomcatSX] at org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:253)
      [EmbeddedTomcatSX] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:436)
      [EmbeddedTomcatSX] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212)
      [EmbeddedTomcatSX] at $Proxy94.create(Unknown Source)
      [EmbeddedTomcatSX] at java.lang.reflect.Method.invoke(Native Method)
      [EmbeddedTomcatSX] at com.infocorpnow.a2g.util.beantest.GenericBOInvoker.invoke(Unknown Source)
      [EmbeddedTomcatSX] at beantest._0002fbeantest_0002fResultBrowser_0002ejspResultBrowser_jsp_111._jspService(_0002fbeantest_0002fResultBrowser_0002ejspResultBrowser_jsp_111.java:118)
      [EmbeddedTomcatSX] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
      [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
      [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
      [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
      [EmbeddedTomcatSX] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
      [EmbeddedTomcatSX] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
      [EmbeddedTomcatSX] at org.apache.tomcat.core.Handler.service(Handler.java:287)
      [EmbeddedTomcatSX] at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
      [EmbeddedTomcatSX] at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
      [EmbeddedTomcatSX] at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
      [EmbeddedTomcatSX] at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
      [EmbeddedTomcatSX] at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
      [EmbeddedTomcatSX] at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
      [EmbeddedTomcatSX] at java.lang.Thread.run(Unknown Source)

      I have made chanegs to jboss.jcml , jboss.properties , jboss.xml,ejb-jar.xml ,auth.conf, server.xml, web.xml .

      Is there any other file that i may have missed out.Please help urgently!!!

      Thanx
      aanchal.