wood burning stoves 2.0*
The moose likes JForum and the fly likes JForum Won't Load Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "JForum Won Watch "JForum Won New topic
Author

JForum Won't Load

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I've been running jforum for almost 2 years. It's been doing well. However, I just had something very odd happen, and I'm stumped as to how to handle it. First, the environment specifications:

RedHat Linux
Tomcat v5.0.16
JForum v2.1.7
Java 1.4.2
PostgreSQL 7.4.1

Now for the problem. I restarted the Tomcat server and once the server came back online, jforum was not deployed. The application was not running, and it wasn't showing up in the Tomcat manager listing. I've tried re-deploying the application, but it isn't working. The message that I get back from Tomcat is that it is deploying it (meaning no error message), but it still isn't launched, nor is it showing in the Tomcat manager listing. I can't tell if jforum is launching but then closing down, or if something else is at play.

If anyone has some advice regarding how to troubleshoot this, I'm all ears.

Most likely, I will probably need to re-install jforum. However, I don't want to lose all the data and web page modifications that I have made. So if there isn't any advice as to how to re-deploy the application, then please let me know the process that I should take to backup-install-restore my files.

Thank you in advance for any help in getting this application back online.
[originally posted on jforum.net by dbd-mark]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
OK, since you're not seeing jForum in the TC manager, it's got to be some sort of deployment problem. If it was a code failure or DB problem, you should still see the webapp.

Here are some things to check.

Check to see what was actually in the TC webapps directory. If there is a jforum webapp directory, it could be a rights issue. E.g., the app could be there but not accessible from Tomcat. This would explain why TC can't re-deploy the app.

Also, check that there is a web.xml in the WEB-INF directory. If this is missing in the war or the application directory, then it is not a valid webapp and TC will ignore it. (Check rights on this file too.)

Did you check the Tomcat log files for any information? If the web.xml format is invalid, I think TC will print a log message and ignore the webapp.

I can't remember the TC 5.0 syntax, but there may be a context mapping that is trying to point the jForum webapp to a different directory. In 5.5, these are under the config/Catalina/localhost directory, I seem to remember that 5.0 has them in it's server.xml file.. but am not sure.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks for the checklist. I've verified each of the items that you listed:

jforum directory (with application files) in the webapp directory - Yes
Permissions of jforum directory, and the files within it set to read/write for tomcat user - Yes
web.xml file in the WEB-INF directory of jforum - Yes
web.xml contains valid contents - Yes
web.xml set to read/write for the tomcat user - Yes

I checked the Tomcat logs for information regarding the launching of the file and found this (from catalina.out):

The log information listed above was based upon an attempt to launch the application via a <context> entry in the server.xml file.

I've also tried using the Tomcat Manager web interface and typing in the information manually. When I do this, the Manager system says that it deployed it, but nothing happens. This is the entry in the Localhost.txt file regarding that attempt:

Basically, there is no error message with that method. However, it still doesn't load.

I checked in the config/Catalina/localhost directory and there is a jforum.xml file in it with a context entry:

The reference looks correct to me.

Does this information shed more light on the subject? Any other ideas on what I can check next?
[originally posted on jforum.net by dbd-mark]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Well, based on the commons-logger error, it might be a problem with miss match jar files in your common/lib and web-inf/lib directory. Try moving the commons-logging*.jar and log4j*.jar files out of your WEB-INF/lib directory.
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
That looks like a good possibility. I recently added a 3rd party application to handle payments on the site. Some of the files could be conflicting. I followed the instructions regarding the commons-logging and log4j files. I removed them from the WEB-INF/lib directory of jforum and tried re-launching. No luck. I tried to re-launch by using the Tomcat deploy feature in the manager web interface. Should I be trying to re-launch jforum differently?

Here is a listing of the files in the jre/lib/ext directory:

Here are the files in the jforum/lib directory:

Is there a way to determine if the commons-logging.jar file is the wrong version, or in some way conflicting with jforum? Is there more from the error log that needs to be included here?

Thanks for the help. It feels like we are making progress.

[originally posted on jforum.net by dbd-mark]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hmm, I'm not sure about having all those extra files in the ext directory, e.g, The common* files. It make creating CLASSPATHs easier but jar located here apply to ALL applications and ALL application have to support the versions here. Since these are the "trusted" extensions.

I also think that this article has some bearing to your problem:

http://commons.apache.org/logging/troubleshooting.html#Apache%20Tomcat

I'm thinking that by having the commons logging jar in the ext directory, Tomcat can't access the classes it needs because of security constraints.

I am remembering that in my set up, I have made sure that the common-logging*.jar(s) and log4j*.jar are only in the tomcat\common\lib directories. This works to let all applications use logging and minimize the problem of a class from a web app layer being loaded into the application server layer (a security issue).
[originally posted on jforum.net by monroe]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JForum Won't Load