aspose file tools*
The moose likes JForum and the fly likes User Details CVS Bug Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "User Details CVS Bug" Watch "User Details CVS Bug" New topic
Author

User Details CVS Bug

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi Guys!!!

I'm having the following problem with my JForum 2.1.6 CVS version!

The screen show the following message when I try to see any user details page:

----------
An error has occurred.

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

java.lang.reflect.InvocationTargetException
----------

OK, let's see the HTML source code:

----------
<!-- BEGIN ERROR STACK TRACE <br /> 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:116) <br /> at net.jforum.JForum.service(JForum.java:183) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) <br /> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738) <br /> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526) <br /> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) <br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) <br /> at java.lang.Thread.run(Thread.java:595) <br /> Caused by: java.lang.NullPointerException <br /> at net.jforum.dao.generic.GenericPostDAO.countUserPosts(GenericPostDAO.java:350) <br /> at net.jforum.view.forum.UserAction.profile(UserAction.java:496) <br /> ... 24 more <br /> <br /> END ERROR STACK TRACE-->
----------

So, let's see the line 496 from jforum\view\forum\UserAction.java:

----------

----------

So, I tried to repeat the same behaviours at JForum 2.1.6 original and no error happened! Maybe it be a CVS version error!

I would like to help, because I'm a Java developer, but not so much familiarized with JForum architecture.
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hmm..

GenericPostDAO.java, line 350, have this line of code:



The file generic_queries.sql contains the PostModel.countUserPosts query.

Check if your installation does.

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

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:Hmm..

GenericPostDAO.java, line 350, have this line of code:



The file generic_queries.sql contains the PostModel.countUserPosts query.

Check if your installation does.

Rafael


Hi Rafael!!!

My GenericPostDAO.java 350 line is the same!

But the original 2.1.6 version doesn't have the following generic_queries.sql line:

PostModel.countUserPosts = SELECT COUNT(1) AS total FROM jforum_posts where user_id = ? AND forum_id IN (:fids AND need_moderate = 0



So, let me ask you something simple:

When I decide to "upgrade" my original 2.1.6 version to the last CVS's version, it's not enough to "upgrade" the following path: WEB-INF\classes\net\jforum\, am I right?

I ask you it because I yet don't know how to mantain the main configuration files in cases of "upgrades"! (just manually...)

Must have a more intelligent and efficient way to do it, there isn't?
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I've just made a full upgrade yesterday on my existing installation 2.16 to lastest CVS version.
You have to upgrade all files deployed.
Example, I'm using jetty server and my jforum is in /jetty/webapps/JForum and I've to upgrade all files in :
/jetty/webapps/JForum/images
/jetty/webapps/JForum/templates
/jetty/webapps/JForum/WEB-INF/classes
/jetty/webapps/JForum/WEB-INF/config
/jetty/webapps/JForum/WEB-INF/lib

Be carrefull if you've made changes in images, for others parts if you've made changes directly in your cvs repository, cvs should have merged diff. And for lib you have to remove, after upgrade, duplicates entries with older revisions like dw-1.1.jar & dwr-1.1-RC1.jar
Note : If you haven't made yours changes in template in cvs directory, you've to manually diffing them with current deployed directory

note 2 : if xxxx_db_struct.sql has changed, you've to manually apply changes to database schema, example : jforum_users new column -> user_authhash VARCHAR(32)
You can also create un new db then export from old and restore datas (not structure) to the new

Currently I've a 2.1.7 JForum running 8)


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

Joined: Apr 22, 2012
Posts: 17424
redhand wrote:You can also create un new db then export from old and restore datas (not structure) to the new


Hi redhand!!!

TKS for all!!!

Do you have any idea about how to export it, as you sad? Something like a SQL command... I really don't know. I would try to copy all the C:\mysql\data\jforum\ files... but I'm not sure if it's the right way...

Helps or tips would be welcome!!!

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
redhand wrote:As you are using MySQL db, you have plenty of tools like phpMyAdmin(if you have a php interperter) or better use SqlYog free Edition http://www.webyog.com/
else maybe I could quickly write some basic export/import tool in java like phpbb2jforum converter


TKS Guy!!!

I suggest a continuation about this specific point at the 2.1.6 x 2.1.7: SQL Differences topic! ;)

[ ]'s
[originally posted on jforum.net by leandro_salvador]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
As you are using MySQL db, you have plenty of tools like phpMyAdmin(if you have a php interperter) or better use SqlYog free Edition http://www.webyog.com/
else maybe I could quickly write some basic export/import tool in java like phpbb2jforum converter
[originally posted on jforum.net by redhand]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Here is the command to dump a MySQL databse into an export file:

mysqldump -uDBUSER -pDBPASS -hlocalhost --opt --allow-keywords --flush-logs --hex-blob --master-data --max_allowed_packet=16M --quote-names --result-file=OUTPUT_FILE_NAME.sql DB_TO_BACKUP

The command is entered all on one line, substitute your DB username and password in the -u and -p areas, and the output file name, and database name where appropriate.

To import the file back into MySQL:

While in MySQL:
mysql> source filename_you_created.sql
mysql> \. filename_you_created.sql

or from command line:
mysql DB_name < filename_you_created.sql

[originally posted on jforum.net by GatorBait3]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: User Details CVS Bug