Hi Jim,

i found the bug at the weekend. It was my fault, cause i closed the 
resultset some lines before i started the loop. This was the Problem. When 
i create a new record the resultset is still open but not if try to get the 
list...

Thanx
Stephan

At 10:04 01.03.2002 -0600, you wrote:
>Stephan,
>
>I don't see any glaring errors in this code, granted chtml, your statement
>and any of the columns returned by your result set are not null.  You need
>to compile your application with debug (-g) so you can examine the stack
>trace produced by the exception.  This will at least show you what line is
>causing the problem and should lead you to the bug.
>
>Jim
>
> > -----Original Message-----
> > From: Stephan Mülhaus [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 01, 2002 8:52 AM
> > To: Tomcat Users List
> > Subject: RE: Problem with Tomcat or Servlet?
> >
> >
> > okay, here is the part that builds the list:
> >
> > //My Query to get all records from my table
> > r = s.executeQuery("SELECT * FROM fahrzeuge ORDER BY kaufdatum");
> >
> > //a loop to parse the content of my records in my htmlpage
> > //chtml is my htmlpage as a String
> > //helpers.StrTran is a method to replace my placeholder in the htmlpage
> > with the String of my table
> > while(r.next()){
> >                  chtml =
> > helpers.StrTran(chtml,"-CAR-",r.getString("car"));
> >                  chtml =
> > helpers.StrTran(chtml,"-PRODUCER-",r.getString("producer"));
> >                  chtml =
> > helpers.StrTran(chtml,"-COLOR-",r.getString("color"));
> >                  chtml =
> > helpers.StrTran(chtml,"-CODEPLATE-",r.getString("codeplate"));
> >                  chtml =
> > helpers.StrTranList(chtml,"<!---marker--->",cHtmlList+"<!---marker--->");
> > }
> > out.println(chtml);
> >
> > r.close();
> > I hope this helps you to solve my prob
> >
> > At 08:38 01.03.2002 -0600, you wrote:
> > >Sounds like a servlet problem.  To determine the cause of your problem we
> > >will need to see the servlet source code (at least the part that
> > builds the
> > >list).
> > >
> > >Jim
> > >
> > > > -----Original Message-----
> > > > From: Stephan Mülhaus [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, March 01, 2002 8:28 AM
> > > > To: Tomcat Users List
> > > > Subject: Problem with Tomcat or Servlet?
> > > >
> > > >
> > > > Hi everybody,
> > > >
> > > > i have a strange Problem, i have developed a servlet in which i
> > > > can create
> > > > new records in a mysql database and where i can list these
> > records in a
> > > > htmlpage.
> > > > Now the strange behaviour:
> > > > If i try to get the list of records Tomcat throws an
> > NullPointerException
> > > > although the source is okay but if i create a new record and let
> > > > my servlet
> > > > list all my records it shows me all my records!
> > > > I couldn't find any strange entries in my logfiles, everything is
> > > > normal...
> > > > Now, perhaps you can help me, is this a problem of my servlet or
> > > > a problem
> > > > of my tomcat?
> > > >
> > > > Thanx in Advance
> > > > Stephan
> > > >
> > > >
> > > > --
> > > > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > > > For additional commands: <mailto:[EMAIL PROTECTED]>
> > > > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> > > >
> > > >
> > >
> > >
> > >--
> > >To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > >For additional commands: <mailto:[EMAIL PROTECTED]>
> > >Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > ------------------------------------------------------------------
> > ----------------------------
> >
> > Stephan Mülhaus  [EMAIL PROTECTED]
> > NWU Gesellschaft fuer Netzwerk und Kommunikation mbH
> > Phone: +49-231-986510 - 0
> > FAX: +49-231-986522 - 2
> > ------------------------------------------------------------------
> > ----------------------------
> >
> >
> >
> > --
> > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>


--
----------------------------------------------------------------------------------------------
 

Stephan Mülhaus  [EMAIL PROTECTED]
NWU Gesellschaft fuer Netzwerk und Kommunikation mbH
Phone: +49-231-986510 - 0
FAX: +49-231-986522 - 2
----------------------------------------------------------------------------------------------
 



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to