• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

error while inserting new message and new user

Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ?


[originally posted on jforum.net by altuga]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure that your jforum-custom.conf file has the following option set:


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]
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic