Originally created by: veit.g...@googlemail.com
Originally owned by: andow... (code.google.com)@gmail.com
What steps will reproduce the problem?
1. Deploy JForum 2.3.5
2. Select HSQLDB on install
3. Leave everything on default
4. Try to register a new user
5. Exception occurs
What is the expected output? What do you see instead?
The user should have been registered. Exception occurs.
What version of the product are you using? On what operating system,
database, and application server/servlet container?
* Product: JForum 2.3.5
* OS: Windows 7 64bit
* DB: HSQLDB
* AP: Tomcat 7.0.52
* JDK: 1.7.51, 64bit
Please provide any additional information below.
Trying to register a new user after a fresh installation using HSQLDB, the following error occurs:
An error has occurred.
For detailed error information, please see the HTML source code, and contact the forum Administrator.
org.hsqldb.HsqlException: data exception: invalid character value for cast
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: andow... (code.google.com)@gmail.com
The error message is as follows:
Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLDataException: data exception: invalid character value for cast
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.throwError(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.setParameter(Unknown Source)
at org.hsqldb.jdbc.JDBCPreparedStatement.setString(Unknown Source)
at net.jforum.dao.generic.GenericUserDAO.findAllUsersByEmail(GenericUserDAO.java:1159)
at net.jforum.dao.generic.GenericUserDAO.findByEmail(GenericUserDAO.java:1112)
at net.jforum.view.forum.UserAction.insertSave(UserAction.java:291)
... 27 more
Because the SQL query needs some parameters to pass in, but HSQLDB's SQL statement has different positions of limits before where conditions.
The fix: HsqldbUserDAO.java should implement a findAllUsersByEmail() instead of GenericUserDAO.java's findAllUsersByEmail().
Status: Accepted
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: andow... (code.google.com)@gmail.com
These two SQL queries contain String parameters in different positions:
UserModel.findByEmail
UserModel.findByIp
Add the following two methods into HsqldbUserDAO.java:
findAllUsersByEmail()
findAllUsersByIp()
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: andow... (code.google.com)@gmail.com
commit in [[r331]]
Status: Fixed