This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Member DB migration problem" Watch "Member DB migration problem" New topic
Author

Member DB migration problem

Migrated From Jforum.net
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_attachsig,user_allowhtml,user_allowbbcode,user_allowsmilies
,user_allowavatar,user_allow_pm,user_allow_viewonline,user_notify,user_notify_always
,user_notify_text,user_notify_pm,user_popup_pm,rank_id,user_avatar_type,user_email
,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','test@test.com','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.

java.lang.reflect.InvocationTargetException

_____________________________________________________


<!-- 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(Command.java:117) <br /> at net.jforum.view.admin.AdminCommand.process(AdminCommand.java:64) <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:717) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) <br /> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) <br /> at java.lang.Thread.run(Unknown 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(GenericUserDAO.java:521) <br /> at net.jforum.dao.generic.GenericUserDAO.selectAll(GenericUserDAO.java:485) <br /> at net.jforum.view.admin.UserAction.list(UserAction.java:76) <br /> ... 24 more <br /> <br /> END ERROR STACK TRACE-->





____________________________________________________

What I must do more???


[originally posted on jforum.net by honghoekim]
Migrated From Jforum.net
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 users.per.page
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
hmmmm...then I have no way to migrate my member DB using SQL??
[originally posted on jforum.net by honghoekim]
Migrated From Jforum.net
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 jforum.net by monroe]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Member DB migration problem
 
Similar Threads
2.1.6 -> 2.1.7 - Bad Integer 4.83
Quick reply does not work - java.lang.ClassCastException: java.util.ArrayList
Error when opening Topic
VB variables? SQL queries?
Unsupported feature on 2.1.7