You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by "Heydari, Parviz" <he...@dnb.no> on 2000/09/06 16:59:39 UTC

NullPointerException...

Hi,

I run a jsp file named HSSide21.jsp that reads some data from data base! I
think a java file by name "jrun__HSSide212ejspd.java" should be generated
for this jsp file
in directory
C:\Programfiler\Allaire\JRun\servers\default\default-app\WEB-INF\jsp
But this file is not generated, that is why I get NullPointerException:	
null
java.lang.NullPointerException at
jrun__HSSide212ejspd._jspService(jrun__HSSide212ejspd.java, Compiled Code) 
at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40) 
at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code) 
at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled Code) 
.....
.....
....

The jsp file;
<% try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); } catch(Exception e)
{} %>
<% java.sql.Connection db = null; %>
<% java.sql.Statement st=null; %>
<% java.sql.ResultSet rs=null; %>
<% try { db = java.sql.DriverManager.getConnection( "jdbc:odbc:jsp",
"dbuser", "dbuser" ); } catch(Exception e) { %>
<% } %>
<% try { st = db.createStatement(); } catch(Exception e) {} %>
<HTML>
<% try { rs = st.executeQuery( "select Navn from Tabell1 where Navn =
'Sko';" ); } catch(Exception e) {} %>
<% try { while ( rs.next() ) { %>
<%= rs.getString("Navn") %>
<% } } catch(Exception e) {} %>
</HTML>
<% rs.close();  %>
<% st.close();  %>
<% db.close();  %>

Does anyone why jrun__HSSide212ejspd.java is not generated or any idea!?
Thanks
-Parviz


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *