File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JForum and the fly likes Member DB migration problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Member DB migration problem" Watch "Member DB migration problem" New topic

Member DB migration problem

Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi~ I'm really regular customer

What I want to ask is user db migration.

I have succeded with migrating my old and I want to do this with member table.

I did following steps

(1) insert member information using SQL in jforum_users

I have inserted all the column except NULL column.

insert into jforum_users(user_id,username,user_password,user_session_time
,user_session_page, user_regdate
,user_posts,user_timezone, user_lang,user_dateformat,user_new_privmsg
,user_unread_privmsg, user_viewemail
,user_viewonline,user_karma) values
('6','test1','202cb962ac59075b964b07152d234b70','0','0',now(),'0','','','%d/%M/%Y %H:%i','0','0','0','1','0','1','1','1','1','1','1','0','0','1','1','1','0','','1','0');

(2) insert member information using SQL in jforum_users_groups

insert into jforum_user_groups values ('1','6');

(3) restart Tomcat

But, When I see my admin page and look user menu.

Error occured like this.

For detailed error information, please see the HTML source code, and contact the forum Administrator.



<!-- 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(Unknown Source) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) <br /> at java.lang.reflect.Method.invoke(Unknown Source) <br /> at net.jforum.Command.process( <br /> at net.jforum.view.admin.AdminCommand.process( <br /> at net.jforum.JForum.processCommand( <br /> at net.jforum.JForum.service( <br /> at javax.servlet.http.HttpServlet.service( <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter( <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter( <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter( <br /> at org.apache.catalina.core.StandardWrapperValve.invoke( <br /> at org.apache.catalina.core.StandardContextValve.invoke( <br /> at org.apache.catalina.core.StandardHostValve.invoke( <br /> at org.apache.catalina.valves.ErrorReportValve.invoke( <br /> at org.apache.catalina.core.StandardEngineValve.invoke( <br /> at org.apache.catalina.connector.CoyoteAdapter.service( <br /> at org.apache.coyote.http11.Http11Processor.process( <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( <br /> at$ <br /> at Source) <br /> Caused by: java.lang.reflect.InvocationTargetException <br /> ... 24 more <br /> Caused by: java.lang.NullPointerException <br /> at net.jforum.dao.generic.GenericUserDAO.processSelectAll( <br /> at net.jforum.dao.generic.GenericUserDAO.selectAll( <br /> at net.jforum.view.admin.UserAction.list( <br /> ... 24 more <br /> <br /> END ERROR STACK TRACE-->


What I must do more???

[originally posted on by honghoekim]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hmm, that looks right.

Only way I can see a Null Pointer occurring in the processSelectAll code is if the following query returns a null set:

where the two parameters are 0 and the config setting for the
[originally posted on by monroe]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
hmmmm...then I have no way to migrate my member DB using SQL??
[originally posted on by honghoekim]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
The devil is always in the details... you can create users via SQL that's what the initial data scripts do for the admin and anonymous users. (See the mysql_data_dump.sql for an example).

It could be some sort of db configuration problem or other issue. Have you tried doing the above query from the same id and password that jforum is configured with to access the db? Maybe there is an issue with table rights that is causing the data to not be found.

The devil is in the details... and it's hard to look at the details from afar. But it is possible, you may just have to dig a little deeper into your specific situation details.

You might also want to look thru the DAO (Data Access Object) code. This is how jForum access the database and manages persistent data. The methods that create new users or load users will show you exactly what SQL info is expected.

You might also check you application server logs to see if there is more information than you posted. Sometimes the message reported via the screen is the result of errors found there and not the one of the screen.
[originally posted on by monroe]
I agree. Here's the link:
subject: Member DB migration problem
It's not a secret anymore!