tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Euclides da Silva Junior - DATAPREVRJ <Jose.Eucli...@rj.previdenciasocial.gov.br>
Subject RES: URGENT, PLEASE. The old Bug with bean cache?
Date Thu, 25 Sep 2003 15:12:54 GMT
Dont worry about that! The condition statement is just a test that i have
included in my the original code...
The real problem is why the dica object doesnt exist?!
Euclides.

-----Mensagem original-----
De: Mike Curwen [mailto:gb_dev@gb-im.com]
Enviada em: quinta-feira, 25 de setembro de 2003 12:10
Para: 'Tomcat Users List'
Assunto: RE: URGENT, PLEASE. The old Bug with bean cache?


Well uhh....

    if (dica == null) // NEW !
      System.out.println("valorrr"+dica.getteDescricaodica());

You check an object, determine it is null, and then try to call a method
(gettDescricaodica()) on that object.. but you just determined it was
null!!
 
That's why you get java.lang.NullPointerException as the root cause of
your servlet exception.



> -----Original Message-----
> From: Jose Euclides da Silva Junior - DATAPREVRJ 
> [mailto:Jose.Euclides@rj.previdenciasocial.gov.br] 
> Sent: Thursday, September 25, 2003 10:01 AM
> To: 'Tomcat Users List'; 'Yoav.Shapira@mpi.com'
> Subject: RES: URGENT, PLEASE. The old Bug with bean cache?
> 
> 
> HERE IS THE ERROR MESSAGE . Thanks in advance, Euclides.
> 
> The server encountered an internal error () that prevented it 
> from fulfilling this request.
> 
> exception 
> 
> org.apache.jasper.JasperException
> 	at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:2
> 48)
> 	at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:295)
> 	at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
> ionDispatcher.
> java:684)
> 	at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(Appli
> cationDispatch
> er.java:432)
> 	at 
> org.apache.catalina.core.ApplicationDispatcher.forward(Applica
> tionDispatcher
> .java:356)
> 	at BancoServlet.recuperaDicaTopico(BancoServlet.java:370)
> 	at BancoServlet.service(BancoServlet.java:228)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> FilterChain.java:247)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> ain.java:193)
> 	at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> va:260)
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> va:191)
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.catalina.core.StandardContext.invoke(StandardContex
> t.java:2415)
> 	at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> Valve.java:180
> )
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
> 	at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
> spatcherValve.
> java:170)
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
> 	at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> Valve.java:172
> )
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:641)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> gineValve.java
> :174)
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.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(Http11Process
> or.java:432)
> 	at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> r.processConne
> ction(Http11Protocol.java:386)
> 	at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoi
> nt.java:534)
> 	at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.jav
> a:530)
> 	at java.lang.Thread.run(Thread.java:536)
> 
> 
> root cause 
> 
> java.lang.NullPointerException
> 	at 
> org.apache.jsp.rodrigo2_jsp._jspService(rodrigo2_jsp.java:228)
> 	at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> Wrapper.java:2
> 04)
> 	at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> .java:295)
> 	at 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(Applicat
> ionDispatcher.
> java:684)
> 	at 
> org.apache.catalina.core.ApplicationDispatcher.doForward(Appli
> cationDispatch
> er.java:432)
> 	at 
> org.apache.catalina.core.ApplicationDispatcher.forward(Applica
> tionDispatcher
> .java:356)
> 	at BancoServlet.recuperaDicaTopico(BancoServlet.java:370)
> 	at BancoServlet.service(BancoServlet.java:228)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> er(Application
> FilterChain.java:247)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> cationFilterCh
> ain.java:193)
> 	at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> rapperValve.ja
> va:260)
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardC
> ontextValve.ja
> va:191)
> 	at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValv
> eContext.invok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
> ine.java:480)
> 
> 
> HERE IS WHERE TOMCAT SHOWS THE ERROR.
> 
> The  bean name is dica. I made a test, putting a line with a 
> condition like
> this:
> if (dica == null) // NEW !
>       System.out.println("valorrr"+dica.getteDescricaodica());
> and this condition is true when this app runs!!! Why? 
> ______________________________________________________________
> ______________
> _____________________
> 
>  System.out.println(" passei no getatribute " + autorizacao);
>  
>   for(int i = 0;pega.hasNext()&&i<10;i++)
>   {
>     dica = (Dica)pega.next();
>     int limite = 0;
>     if (dica == null) // NEW !
>       System.out.println("valorrr"+dica.getteDescricaodica());
>     if (dica.getteDescricaodica().length() <= 40 )
>       limite = dica.getteDescricaodica().length(); 
>     else
>        limite = 40;
>     if (limite == 0) limite = 1;
>   
>     
>     if ( autorizacao == null )
>     
>         { %>
>             <font class="Style_1"><a href=# 
> onClick='javascript:window.open("http://wtrjo210/apresentaDica
> .jsp?num=<%=pa
> gina_atual%>&pos=<%=i+1%>","","width=640,height=450,resizable=
> no,location=no
> ,status=no,scrollbars=no,left=0,top=0");'><b><%=dica.getnomeDi
> ca()%></b></a>
> </font> 
>         <%
>         } 
>      else   
>         { %>
>            <font class="Style_1"><a href=# 
> onClick='javascript:window.open("http://wtrjo210/apresentaaltD
> ica.jsp?num=<%
> =pagina_atual%>&pos=<%=i+1%>","","width=640,height=450,resizab
> le=no,location
> =no,status=no,scrollbars=no,left=0,top=0");'><b><%=dica.getnom
> eDica()%></b><
> /a></font>
>         <%
>         } %>
>      <font 
> class="Style_1">&nbsp;&nbsp;&nbsp;&nbsp;<i><%=dica.getNmAutor(
> )%></i></font>
> 
>      <br>
>      <font 
> class="Style_1"><%=dica.getteDescricaodica().substring(0,limit
> e)%>...</font>
> 
>      <br>
>            
>             <%
>   } 
> 
> 
> -----Mensagem original-----
> De: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
> Enviada em: quinta-feira, 25 de setembro de 2003 11:53
> Para: Tomcat Users List
> Assunto: RE: URGENT, PLEASE. The old Bug with bean cache?
> 
> 
> 
> Howdy,
> You should post the logs with the full error and your 
> relevant source code.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-----Original Message-----
> >From: Jose Euclides da Silva Junior - DATAPREVRJ 
> >[mailto:Jose.Euclides@rj.previdenciasocial.gov.br]
> >Sent: Thursday, September 25, 2003 10:40 AM
> >To: 'tomcat-user@jakarta.apache.org'
> >Subject: URGENT, PLEASE. The old Bug with bean cache?
> >
> >Hi gurus,
> >a little helping hand, please! I have updated my bean and so, i have
> put
> >this new bean version  in right package. However, the problem begins 
> >whenever a new  bean object is created (instanced) by a servlet and 
> >captured by a jsp later. The browser returns me error - 500. 
> Probably, 
> >i guess
> my
> >TomCat 4.1.18 is working with old bean version, instead of the newer.
> What
> >should i do?
> >Euclides.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> 
> This e-mail, including any attachments, is a confidential 
> business communication, and may contain information that is 
> confidential, proprietary and/or privileged.  This e-mail is 
> intended only for the individual(s) to whom it is addressed, 
> and may not be saved, copied, printed, disclosed or used by 
> anyone else.  If you are not the(an) intended recipient, 
> please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

Mime
View raw message