RE: java.lang.NullPointerException....Helllloo PLZ HELP me

2001-05-18 Thread Warren Crossing

can you trouble shoot the null pointers.. i mean is pagecontext
initialized.. do a system.out.println on it

what the the exact lines of code the npe comes from.. are you using jikes to
compile jsp or default javac??

man my boss is gonna kill me 2.. 

-Original Message-
From: Naeem Malik [mailto:[EMAIL PROTECTED]]
Sent: Friday, 18 May 2001 5:34 PM
To: [EMAIL PROTECTED]
Subject: java.lang.NullPointerExceptionHeoo PLZ HELP me


HI
 i mailed again caz i need reply today, my Boss
getting angry. 
 Yesterday I was also mailed my problem but there was
persons who guide me but i need more
guidence to sort out that problem... so i m mailing
again. 
 I am webdevloper developing one website and using
tools JSP, Servlet,
 and working on Jakarta-Tomcat version 3.1. I am the
old user of jakarta-tomcat, 
so i know how to configure it properly. I m using
tomcat for my website but from
last 5 days, I am getting the problems what i
undersatnd it is related to the buffer
or context stuff but i m unbale to sort it out, so
there is full description of 
my problem:
   
1>Some time it start working properly and then
suddenly start give following 
  Exception from Browser>
 
Error: 500
Location: /examples/jsp/New/dyeing.jsp
Internal Servlet Error:

java.lang.NullPointerException
at
jsp.New._0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0._jspService(_000
2fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java:123)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
va:174)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Unknown Source)

then i Checked the 123 line of 
_0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java
there was the following code:

} catch (Exception ex) {
if (out.getBufferSize() != 0)
out.clearBuffer();
pageContext.handlePageException(ex);
} finally {
out.flush();
   
_jspxFactory.releasePageContext(pageContext);
}

OR 


Error: 500
Location: /examples
Internal Servlet Error:

java.lang.NullPointerException
at
org.apache.tomcat.servlets.DefaultServlet.serveFile(DefaultServlet.java:301)
at
org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:218)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Unknown Source)

then i Checked the 301 line of DefaultServlet.java
there was the following code:


if(absPath.indexOf("..") != -1) {
// We have .. in the path...
response.sendError(response.SC_NOT_FOUND);
return;
}


2> or very rarely it gives the following message or
error>


Error: 404
Location: /
File Not Found
/

3> even it gives like most common message of Browser
by the giving the 
   URL> http://localhost:8080 on InternetExplorer and
then suddenly start working and 
   then again same message which is as follow>

   The page cannot be found

   bla bla bla

   HTTP 404 - File not found
   Internet Explorer 





The following r the configurations of My system
I am using Compaq  800 MHZ of PIII, 20 GB Hard
Disk, 128 MB RAM.
Operating System   WinNT 4 +Service Pack 5
Data Base  Oracle 8
Tools  JDK1.3.0_01, JSP1.1, Servlet,
Jakarta-ant, JavaScript,
   HTML and etc   
  
Autoexec.bat Path  =  set
PATH=%PATH%;c:\jdk13\bin;c:\java\jakarta-tomcat\bin
  set JAVA_HOME=c:\jdk13
  set
CLASSPATH=.;c:\jdk13\jre\lib\rt.jar;
  c:\jdk13\lib\tools.jar;
  c:\jdk13\lib\jsdk.jar;
 
c:\java\jakarta-tomcat\lib\servlet.jar
  s

java.lang.NullPointerException....Helllloo PLZ HELP me

2001-05-18 Thread Naeem Malik

HI
 i mailed again caz i need reply today, my Boss
getting angry. 
 Yesterday I was also mailed my problem but there was
persons who guide me but i need more
guidence to sort out that problem... so i m mailing
again. 
 I am webdevloper developing one website and using
tools JSP, Servlet,
 and working on Jakarta-Tomcat version 3.1. I am the
old user of jakarta-tomcat, 
so i know how to configure it properly. I m using
tomcat for my website but from
last 5 days, I am getting the problems what i
undersatnd it is related to the buffer
or context stuff but i m unbale to sort it out, so
there is full description of 
my problem:
   
1>Some time it start working properly and then
suddenly start give following 
  Exception from Browser>
 
Error: 500
Location: /examples/jsp/New/dyeing.jsp
Internal Servlet Error:

java.lang.NullPointerException
at
jsp.New._0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0._jspService(_0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java:123)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)

then i Checked the 123 line of 
_0002fjsp_0002fNew_0002fdyeing_0002ejspdyeing_jsp_0.java
there was the following code:

} catch (Exception ex) {
if (out.getBufferSize() != 0)
out.clearBuffer();
pageContext.handlePageException(ex);
} finally {
out.flush();
   
_jspxFactory.releasePageContext(pageContext);
}

OR 


Error: 500
Location: /examples
Internal Servlet Error:

java.lang.NullPointerException
at
org.apache.tomcat.servlets.DefaultServlet.serveFile(DefaultServlet.java:301)
at
org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:218)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)

then i Checked the 301 line of DefaultServlet.java
there was the following code:


if(absPath.indexOf("..") != -1) {
// We have .. in the path...
response.sendError(response.SC_NOT_FOUND);
return;
}


2> or very rarely it gives the following message or
error>


Error: 404
Location: /
File Not Found
/

3> even it gives like most common message of Browser
by the giving the 
   URL> http://localhost:8080 on InternetExplorer and
then suddenly start working and 
   then again same message which is as follow>

   The page cannot be found

   bla bla bla

   HTTP 404 - File not found
   Internet Explorer 





The following r the configurations of My system
I am using Compaq  800 MHZ of PIII, 20 GB Hard
Disk, 128 MB RAM.
Operating System   WinNT 4 +Service Pack 5
Data Base  Oracle 8
Tools  JDK1.3.0_01, JSP1.1, Servlet,
Jakarta-ant, JavaScript,
   HTML and etc   
  
Autoexec.bat Path  =  set
PATH=%PATH%;c:\jdk13\bin;c:\java\jakarta-tomcat\bin
  set JAVA_HOME=c:\jdk13
  set
CLASSPATH=.;c:\jdk13\jre\lib\rt.jar;
  c:\jdk13\lib\tools.jar;
  c:\jdk13\lib\jsdk.jar;
 
c:\java\jakarta-tomcat\lib\servlet.jar
  set ANT_HOME=c:\java\jakarta-ant
  set Temp=C:\Temp 


 
I will be very thanks full if you guide me that whatÂ’s
going on, is there some thing wrong 
with product or there is some problem in my
configuration.
Where as I using tomcat on port 8080 and I changed it
many times but nothing happen else dam
exceptions or messages. 
I installed JDK1.3 & Tomcat 10 times in these 4 days
with different settings but I am still 
not able to sort out the problem. So again I am very