Menu

#1 Null pointer exception while registering and loging in

open
None
5
2003-03-21
2003-03-20
Manoj T K
No

I just installed the JSforum in my PC, with tomcat as the
web app server and mysql as the backend db.
I created the db using the sql script provided along with
the files.Then I just browsed to the index page, and tried
to register as a new member for the forum. On click of
submit, i am getting a null pointer exception. Further to
my investigation, i found that, in AddUser.java, after the
line, ResultSet rs = db.selectQuery("SELECT * FROM
forum_users WHERE user_name= "+ RegUser); when
you execute rs.next() it throws a null pointer exception,
as the resultset rs is null, because it could not find the
value for RegUser which i enterd in the database and the
db.selectQuery returns a null, if the result of the select
query is empty.

The same problem is happening for Login.java also.

Also, in Login.java, you have a line - type = rs.getString
("type");. But there is no column called type in the
database table forum_users. I verified this in the sql
script you have provided also.

Please rectify these and update the jsforum site.
Thanx,
Manoj.

Discussion

  • Erwin Griekspoor

    • assigned_to: nobody --> erwinxyz
    • status: open --> pending
     
  • Erwin Griekspoor

    Logged In: YES
    user_id=725717

    Hi Manoj

    Thanks for reporting the bug. I working on a new version of
    JsForum and i make a soltution voor this bug, I update asap
    the site with the newer version of JsForum

    greetz

    Erwin

     
  • Erwin Griekspoor

    • status: pending --> open
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.