java.lang.NullPointerException msg after upgrade - Mailing list pgsql-jdbc

From Olivier BULLAT
Subject java.lang.NullPointerException msg after upgrade
Date
Msg-id 5.0.2.1.2.20030515091316.018b9b88@mail.ifma.fr
Whole thread Raw
Responses Re: java.lang.NullPointerException msg after upgrade
List pgsql-jdbc
Hello,<br /><br /> With some programs which are OK, we upgrade our version of soft:<br /> Now, we use Apache,
Posgresql7.2, servlet java (JDK 1.2), Jserv and jdbc7.2dev-1.2.jar.<br /><br /> Log gives a message
"java.lang.NullPointerException"on instruction <br /> con =
DriverManager.getConnection(jdbc:postgresql://127.0.0.1:5432/menu,session.getValue("nom") + "",
session.getValue("passe")+ "")<br /><br /> The name of JDBC Driver has been changed in java source (msg
ClassNotFound):<br/> before: Class.forName("postgresql.Driver");<br /> now: Class.forName("org.postgresql.Driver");<br
/><br/> Example:<br /> try {<br /><br /> System.err.println("ChoixRecherche.java: Avant ouverture driver");<br /> try
{<br/> // Modif OBULLAT 13/05/03<br /> // Class.forName("postgresql.Driver");<br />
Class.forName("org.postgresql.Driver");//on charge le driver postgresql<br /> } catch (ClassNotFoundException cnfe)
{<br/> System.err.println("Programme ChoixRecherche.java: Couldn't find driver class:");<br />
cnfe.printStackTrace();<br/> }<br /><br /> System.err.println("ChoixRecherche.java: Aprés ouverture driver");<br />
System.err.println("ProgrammeChoixRecherche.java: variables_menu.url_base " + variables_menu.url_base);<br /> con =
DriverManager.getConnection(variables_trombi.url_base,session.getValue("nom")+"",session.getValue("passe")+"");<br/>
System.err.println("ChoixRecherche.java:Aprés con = DriverManager.getConnection");<br /> stmt =
con.createStatement();<br/> System.err.println("ChoixRecherche.java: Aprés stmt = con.createStatement()");<br />
choix(stmt,out);<br /> System.err.println("ChoixRecherche.java: Aprés choix(stmt,out)");<br /> stmt.close();<br />
con.close();<br/> }<br /> catch (SQLException ex) {<br /> while (ex != null) {<br /> out.println("<SQLEXCEPTION>
"+ex);<br /> System.err.println("Programme ChoixRecherche.java: SQLEXCEPTION "+ ex);<br /> ex =
ex.getNextException();<br/> }<br /> }<br /> catch (java.lang.Exception ex) {<br /> ex.printStackTrace();<br />
out.println("<JAVALANGEXEPTION>"+ex);<br /> System.err.println("ChoixRecherche.java: JAVALANGEXCEPTION "+ ex);<br
/>}<br /> }<br /><br /><br /> log are:<br /><br /> ChoixRecherche.java: Avant ouverture driver<br />
ChoixRecherche.java:Aprés ouverture driver<br /> Programme ChoixRecherche.java: variables_menu.url_base
jdbc:postgresql://127.0.0.1:7654/menu<br/> java.lang.NullPointerException: <br /> at
ChoixRecherche.service(ChoixRecherche.java:40)<br/> at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)<br
/>at org.apache.jservssi.ServletInfoRequest.runServlet(JServSSI.java:917)<br /> at
org.apache.jservssi.JServSSI.interpretPage(JServSSI.java:366)<br/> at
org.apache.jservssi.JServSSI.doGet(JServSSI.java:302)<br/> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:499)<br/> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:588)<br/> at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)<br/> at
org.apache.jserv.JServConnection.run(JServConnection.java:188)<br/> at java.lang.Thread.run(Thread.java:479)<br />
ChoixRecherche.java:JAVALANGEXCEPTION java.lang.NullPointerException: <br /><br /> Any idea ?<br /><br />
--------------------------------------------------------------------------<br/> Olivier BULLAT<br /> Responsable du
Centrede Ressources Informatiques<br /> Institut Francais de Mecanique Avancee - IFMA<br /> Campus de CLERMONT-FERRAND
/Les Cezeaux<br /> BP 265<br /> 63175 AUBIERE Cedex<br /> Tel: 04.73.28.80.35<br /> Fax: 04.73.28.81.00<br /> mail:
<fontcolor="#0000FF"><u>Olivier.Bullat@ifma.fr<br /><a eudora="autourl"
href="http://www.ifma.fr/">http://www.ifma.fr</a><br
/></u></font>--------------------------------------------------------------------------<br /> 

pgsql-jdbc by date:

Previous
From: Randall Lucas
Date:
Subject: Re: [SQL] insert problem with special characters
Next
From: "Nick Fankhauser"
Date:
Subject: Re: java.lang.NullPointerException msg after upgrade