2 Replies Latest reply on Dec 8, 2003 1:06 PM by czz4ch

    CoyoteAdapter exception accessing index page

    czz4ch Newbie

      I get the follwoing error when attempting to access main page with JAAS entries in web.xml. It is the struts-menu example which used to work until yesterday. Here are the entries in web.xml:

      **** web.xml ****
      <!-- Restrict all users from accessing /secure.jsp -->
      <security-constraint>
      <web-resource-collection>
      <web-resource-name>Struts Menu</web-resource-name>
      Require users to authenticate
      <url-pattern>/secure.jsp</url-pattern>
      <http-method>POST</http-method>
      <http-method>GET</http-method>
      </web-resource-collection>
      <auth-constraint>
      <role-name>tomcat</role-name>
      </auth-constraint>
      </security-constraint>

      <!-- Login Configuration -->
      <login-config>
      <auth-method>Form</auth-method>
      <realm-name>Roles Demonstration</realm-name>
      </login-config>

      <security-role>
      The Default Role
      <role-name>tomcat</role-name>
      </security-role>
      ******

      **** stack trace ****
      13:29:50,160 ERROR [Engine] CoyoteAdapter An exception or error occurred in the container during the request processing
      java.lang.NullPointerException
      at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:73)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:536)

      ****
      I've seen topics in the forums but no solution for it.
      I've re-installed JBOSS without luck. Seems like a real low-level type of error. Any ideas ?

      Thx . Pierre

        • 1. Re: CoyoteAdapter exception accessing index page
          Jarno Peltoniemi Newbie

          The NullPointerException occured in ContainerStatsValve (a new feature in jboss 3.2). ContainerStatsValve will get broken if it's stopped and restarted as stop() sets InvocationStats variable to null.

          Are you using plain jboss 3.2? One way to get the valve to stop is to call removeValve. I've seen the same exception occur when a custom code reordered the pipeline by calling removeValve for all valves and then adding them back with addValve in a different order. Therefore the code that was fully functional in jboss 3.0 didn't work for 3.2.

          Solutions I can think of are:
          1) ask the developers to fix the ContainerStatsValve
          2) fix the custom code you might be using

          • 2. Re: CoyoteAdapter exception accessing index page
            czz4ch Newbie

            I found my problem ... I had specified an invalid login-config name in my web.xml. I hadn't noticed that there was a WARN entry stating that JBOSS could configure an authenticator for the entry I put in. As soon as I fixed the error, I could get to the page OK. Thx for the feedback !