This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JForum and the fly likes error while inserting new message and new user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JForum
Bookmark "error while inserting new message and new user" Watch "error while inserting new message and new user" New topic
Author

error while inserting new message and new user

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I downloaded jforum 2.1.7. I want to test jforum on my own machine
My mysql version is : 5.0.18
Operating system is : windows XP
Tomcat : 5.x

Everything seems works fine but when i try to add new user or add a new message to test forum i get error. Here are the details :


<!-- BEGIN ERROR STACK TRACE <br /> net.jforum.exceptions.ForumException: java.lang.reflect.InvocationTargetException <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:585) <br /> at net.jforum.Command.process(Command.java:117) <br /> at net.jforum.JForum.processCommand(JForum.java:220) <br /> at net.jforum.JForum.service(JForum.java:203) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) <br /> at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834) <br /> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) <br /> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) <br /> at java.lang.Thread.run(Thread.java:595) <br /> Caused by: java.lang.reflect.InvocationTargetException <br /> ... 23 more <br /> Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLException: SQL String can not be NULL <br /> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) <br /> at com.mysql.jdbc.PreparedStatement.init(PreparedStatement.java:494) <br /> at com.mysql.jdbc.Connection.clientPrepareStatement(Connection.java:2186) <br /> at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4781) <br /> at com.mysql.jdbc.Connection.prepareStatement(Connection.java:4686) <br /> at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:190) <br /> at net.jforum.dao.generic.AutoKeys.executeAutoKeysQuery(AutoKeys.java:137) <br /> at net.jforum.dao.generic.AutoKeys.executeAutoKeysQuery(AutoKeys.java:118) <br /> at net.jforum.dao.generic.GenericTopicDAO.addNew(GenericTopicDAO.java:303) <br /> at net.jforum.view.forum.PostAction.insertSave(PostAction.java:1074) <br /> ... 23 more <br /> Caused by: java.sql.SQLException: SQL String can not be NULL <br /> ... 33 more <br /> <br /> END ERROR STACK TRACE-->



Any advice ?

Thanks.

[originally posted on jforum.net by altuga]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Make sure that your jforum-custom.conf file has the following option set:

database.support.autokeys=true

MySQL uses autoincrement fields to create record id's. The section of code that your StackTrace points to is for DB's that don't have support autoincrement fields.

You should probably also verify that all the settings in the config/database/mysql/mysql.properties are correctly defined in your config file as well.


[originally posted on jforum.net by monroe]
 
Have you checked out Aspose?
 
subject: error while inserting new message and new user
 
It's not a secret anymore!