2 Replies Latest reply on May 20, 2004 9:11 PM by John Emerson

    Can't get howto servlet examples to work in 3.2.3

    John Emerson Newbie

      I just downloaded a fresh 3.2.3 and a fresh jaas howto. Sucessfully built the jaas_howto server config and successfully started the server.

      When clicking Invoke PublicSession.echo() as java, echoman [PASS]
      from http://localhost:8080/jaas-example1/index.html, I get output from the server and from tomcat as shown below.

      I'm running:
      17:18:45,646 INFO [ServerInfo] Java version: 1.4.2_04,Sun Microsystems Inc.
      17:18:45,646 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.4.2_04-b05,Sun Microsystems Inc.
      17:18:45,646 INFO [ServerInfo] OS-System: Windows XP 5.1,x86

      Any help would be appreciated. Thanks in advance,
      jj

      Server output:
      ...
      2004-05-14 17:19:08,927 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 23s:481ms
      2004-05-14 17:19:15,356 DEBUG [org.apache.tomcat.util.threads.ThreadPool] Getting new thread data
      2004-05-14 17:19:22,465 INFO [STDOUT] Trying a to lookup the Adaptor...
      2004-05-14 17:19:22,465 INFO [STDOUT] Using class: [org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy@192a848] as the RMIAdaptor
      2004-05-14 17:19:22,465 INFO [STDOUT] ObjectName: jboss.web:service=WebServer
      2004-05-14 17:19:22,465 INFO [STDOUT] QWERTY: EmbeddedCatalina4.1.x
      2004-05-14 17:19:22,496 ERROR [org.jboss.ejb.plugins.SecurityInterceptor] Insufficient method permissions, principal=null, method=echo, interface=REMOTE, requiredRoles=[Echo], principalRoles=[]
      2004-05-14 17:19:22,506 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy:
      java.lang.SecurityException: Insufficient method permissions, principal=null, method=echo, interface=REMOTE, requiredRoles=[Echo], principalRoles=[]
      at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:229)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:107)
      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:700)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      ...

      Tomcat output:

      javax.servlet.ServletException: Failed to call SecuredEJB.echo
      at org.jboss.docs.jaas.howto.EJBServlet.callEcho(EJBServlet.java:96)
      at org.jboss.docs.jaas.howto.EJBServlet.processRequest(EJBServlet.java:53)
      at org.jboss.docs.jaas.howto.EJBServlet.doGet(EJBServlet.java:63)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      ...

        • 1. Re: Can't get howto servlet examples to work in 3.2.3
          Scott Stark Master

          The output you show does not match the asserted action taken. If you clicked on the indicated url you would have had to enter the username/password in the resulting basic auth dialog. There is no part of the jaas howto code that creates the following output, so I don't know what your running, but it is not the jaas howto.

          2004-05-14 17:19:22,465 INFO [STDOUT] Trying a to lookup the Adaptor...
          2004-05-14 17:19:22,465 INFO [STDOUT] Using class: [org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy@192a848] as the RMIAdaptor
          2004-05-14 17:19:22,465 INFO [STDOUT] ObjectName: jboss.web:service=WebServer
          2004-05-14 17:19:22,465 INFO [STDOUT] QWERTY: EmbeddedCatalina4.1.x
          



          • 2. Re: Can't get howto servlet examples to work in 3.2.3
            John Emerson Newbie

            I discovered that the classes that I had built under jaas_howto had the offending code that you pointed to:

            2004-05-14 17:19:22,465 INFO [STDOUT] Trying a to lookup the Adaptor...

            $ find jaas_howto -type f -exec grep -l 'Trying a to lookup the Adaptor...' {} \;
            jaas_howto/output/classes/org/jboss/docs/jaas/howto/EJBServlet.class
            jaas_howto/output/web/WEB-INF/classes/org/jboss/docs/jaas/howto/EJBServlet.class

            I had used the Ant distributed with Sun's Java Web Services Development Pack to build jaas_howto. After cleaning and rebuilding with a fresh Ant distribution from Apache, all is well.

            Thanks for the help.
            jj