-
1. Re: ClusteredHTTPSessionService not found
haraldgliebe Jul 3, 2003 7:49 AM (in response to simon555)You're using the default configuration (that doesn't contain clustering) but probably have marked the web-application as distributable (Look for a element in WEB-INF/web.xml). To get rid of this warning either remove the distributable element or deploy the war in the "all" configuration.
But this is just a warning, what causes the deployment to fail is the CNF below.
There seems to be a typo "java.long.String" in one of the deployment descriptors. Just search for the string and replace it with "java.lang.String"
Regards,
Harald -
2. Re: ClusteredHTTPSessionService not found
simon555 Jul 4, 2003 12:09 PM (in response to simon555)Thanks for your help.That works.But When I were debuging ,the server occured a internal error().show following:
javax.servlet.ServletException: Lookup of java:/comp/env/ failed
at tutorial.web.ComputeServlet.init(ComputeServlet.java:122)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:666)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
The pieces of code for ComputeServlet shows flollwing:
public void init() throws ServletException {
try{
Context context = new InitialContext();
value = (String)context.lookup("java:/comp/env/Title");
Object ref = context.lookup("java:/comp/env/ejb/Fibo");
home = (FiboHome)PortableRemoteObject.narrow(ref,FiboHome.class);
}catch(Exception e){
throw new ServletException("Lookup of java:/comp/env/ failed");
}
}
Where dose the error happend?
Simon555 -
3. Re: ClusteredHTTPSessionService not found
haraldgliebe Jul 4, 2003 1:25 PM (in response to simon555)> ...
> }catch(Exception e){
> throw new ServletException("Lookup of java:/comp/env/ failed");
> }
>
Could you print out the stack trace of the original exception (with e.printStackTrace())?
Harald -
4. Re: ClusteredHTTPSessionService not found
simon555 Jul 4, 2003 9:34 PM (in response to simon555)That's results:
Fibonacci Computation
null java.lang.NullPointerException at tutorial.web.ComputeServlet.doPost(ComputeServlet.java:74) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 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) 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.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) 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:2415) 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.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509) 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:594) 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)
The pieces of codes for doPost() method of ComputeServlet were as in the following:
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("");
out.println(value);
out.println("");
out.println("<h1>");
out.println(value);
out.println("</h1>");
try{
Fibo bean = home.create();
int limit = 0;
String value = request.getParameter("limit");
if(value != null){
try{
limit = Integer.parseInt(value);
}catch(Exception e){
}
}
double[] result = bean.compute(limit);
bean.remove();
out.println("");
out.print("The");
out.print(limit);
out.print("first Fibonacci number");
for(int i = 0;i < result.length;i++){
out.println("");
out.println(i);
out.println(":");
out.println(result);
}
out.println("");
}catch(Exception e){
out.println(e.getMessage());
e.printStackTrace(out);
}finally{
out.println("");
out.close();
}
}
Simon555