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 Error when run migration script 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 "Error when run migration script" Watch "Error when run migration script" New topic
Author

Error when run migration script

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi everyone
when i ran the file phpbb2jforum.sh , it threw an exception error :

Exception in thread "main" java.lang.NoClassDefFoundError: net/jforum/util/preferences/SystemGlobals
at net.jforum.tools.phpbb2jforum.Main.init(Main.java:46)
at net.jforum.tools.phpbb2jforum.Main.main(Main.java:336)

I can't find the util folder at net/jforum/ ? so i don't know how to solve this problem ops:
I'm very thankful if anyone can help me
Regards.
[originally posted on jforum.net by albert]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Oh, i found util folder at WEB-INF/lib/net/jforum directory, but i don't know why it threw this error.
Please help me.
Thank you
[originally posted on jforum.net by albert]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
WEB-INF/lib? It should be at WEB-INF/classes

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

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:WEB-INF/lib? It should be at WEB-INF/classes

Rafael


Ok, it's at WEB-INF/classes, sorry for my wrong information.
But it still doesn't work.
[originally posted on jforum.net by albert]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I worked around it by copy all folder and file in WEBINF/classes/net/jforum to tools/bin/net/jforum .
And i created a folder phpbb2jforum/resource at forum's root directory. Then it worked.
But when importing database, there is an error : Data too long for column 'forum_desc'
Do you have any suggestions?



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

Joined: Apr 22, 2012
Posts: 17424
this is an error :
Cleaning tables...
Cleaning query.clean.banlist
Cleaning query.clean.categories
Cleaning query.clean.forums
Cleaning query.clean.posts
Cleaning query.clean.posts.text
Cleaning query.clean.privmsgs
Cleaning query.clean.privmsgs.text
Cleaning query.clean.ranks
Cleaning query.clean.smilies
Cleaning query.clean.topics
Cleaning query.clean.topicswatch
Cleaning query.clean.users
Cleaning query.clean.votedesc
Cleaning query.clean.voteresults
Cleaning query.clean.votevoters
Cleaning query.clean.groups
Cleaning query.clean.usergroups
Tables cleaned...
Importing users...
Importing categories...
Importing forums...
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'forum_desc' at row 34
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2868)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3118)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1313)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1232)
at net.jforum.tools.phpbb2jforum.Main.importTables(Main.java:282)
at net.jforum.tools.phpbb2jforum.Main.runForrestRun(Main.java:55)
at net.jforum.tools.phpbb2jforum.Main.main(Main.java:352)



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

Joined: Apr 22, 2012
Posts: 17424
Hi everyone.
After modify forum_desc column type to varchar(300) , the import was successfull.
But at the main forum, i don't see any forum or category although i can query them from database.
Is there any error here ?
[originally posted on jforum.net by albert]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I guess that's a permission related issue. You may have to create permissions... which users/groups are allowed to see which category. Maybe the user that you were looking at the main site had no permissions ot see any forum - that's why you dont see any categories either then ...

Log onto the admin panel to ensure everything is set up correctly
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Sid wrote:I guess that's a permission related issue. You may have to create permissions... which users/groups are allowed to see which category. Maybe the user that you were looking at the main site had no permissions ot see any forum - that's why you dont see any categories either then ...

Log onto the admin panel to ensure everything is set up correctly


Hello, at the admin panel i don't see any forum , but i can see the categories title when click to insert new forum. Every users were imported and the forums and categories too, because i can query them from database.
Another error: I think after migrating from phpbb to jforum , unicode characters are not display correctly, when i see the categories title. What I must to do to solve this ?
Thank for your help.
[originally posted on jforum.net by albert]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi, no one answers me
[originally posted on jforum.net by albert]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Well, the conversion code is old and there are many different variation of PhP data and jForum databases. You will probably need to do some manual SQL commands to get things right. Or make some code modifications to get the transfer to work right.

One thing I suspect is that the transfer code is using an older version of the jForum security model. There have been some changes over the years to that.

Assuming you're using 2.1.8, then you probably need to make sure that the following entries are set using your database access tools. (e.g. MySQL admin tool or the like).

First, find your admin group id number from the database. E.g. select * from jforum_groups where group_name like "Admin%".

Next find the "view_forum" role_id for this group. e.g.:

Select * from jforum_roles where group_id = <Admin Group> and name = 'perm_forum'

Then you'll need to find a list of all your forum id's in the jforum_forums table.

For each forum, you will need to make sure there is an entry in the the jforum_role_values table that has the role_id field set to the "perm_forum" role found above and the role_value set to the forum_id.

This should be enough to let you see the forums in the admin screen. Note that you will need to set more rights to the different groups via the admin screen for things to work right. See one of the default groups for specifics on this.


[originally posted on jforum.net by monroe]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error when run migration script
 
Similar Threads
ftpclient class not found?
Build phpbb2JForum from source?
Java 5 Compatibility
I want add a new function
Problems with installation of eclipse 2.1