DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21153>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21153

The Sitemap is null, this should never be!

           Summary: The Sitemap is null, this should never be!
           Product: Cocoon 2
           Version: 2.0.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


doing load tests on cocoon 2.0.4 brought it down with the following exception:

java.lang.RuntimeException: The Sitemap is null, this should never be!
        at org.apache.cocoon.sitemap.Handler.checkSanity(Handler.java:257)
        at org.apache.cocoon.sitemap.Handler.process(Handler.java:219)
        at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
        at org.apache.cocoon.sitemap.SitemapManager.process
(SitemapManager.java:152)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
        at org.apache.cocoon.servlet.CocoonServlet.service
(CocoonServlet.java:1043)
        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.invokeNex
t(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.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.catalina.core.StandardContext.invoke
(StandardContext.java:2415)
        at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.invokeNex
t(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:594)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(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)


all subsequent requests return the same exception.  to reproduce these results, 
run the following test program with something like "java Main 10000 
http://localhost:8080/cocoon/";



import java.net.*;
import java.util.*;
import java.io.*;


public class Main
{
  public static void main( String[] args ) throws Exception
  {
    if( args.length < 2 ) {
      System.err.println("usage: Main (iterations) (url)+");
      System.exit(1);
    }

    int iterations = Integer.parseInt(args[0]);
    for( int i=1; i<args.length; i++ ) {
      String urlStr = args[i];
      time(iterations, urlStr);
    }
  }


  private static void time( int iterations, String urlStr ) throws Exception
  {
    URL url = new URL(urlStr);
    int[] times = new int[iterations];

    for( int i=0; i<iterations; i++ ) {
      long start = System.currentTimeMillis();
      getURL(url);
      long stop = System.currentTimeMillis();
      times[i] = (int) (stop-start);
    }

    int maxTime = 0;
    int minTime = Integer.MAX_VALUE;
    long avgTime = 0;

    for( int i = 0; i < times.length; i++ ) {
      int time = times[i];
      minTime = Math.min(time,minTime);
      maxTime = Math.max(time,maxTime);
      avgTime += time;
    }
    avgTime /= times.length;

    int perSec = (int) (1000L/avgTime);

    System.out.println();
    System.out.println(url.toString());
    System.out.println("max time: "+maxTime);
    System.out.println("min time: "+minTime);
    System.out.println("avg time: "+avgTime);
    System.out.println("per sec: "+perSec);

  }


  private static void getURL( URL url ) throws IOException
  {
    url.getContent();
  }
}

Reply via email to