Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

JForum Woes...

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Firstly congrats on getting the forum back up!

I have just got around to install JForum (after saying I'd do it for weeks). I have MySQL sucessfully installed, and my webserver fully supports JSP and servlets (I have tested this to confirm). I also have the Java SDK installed.

I have encountered two problems. The second of which (there is a reason for this) is exactly the same as mentioned in Tiago Serafim's thread. After considerable activity, my browser (MyIE2, but tested on vanilla IE6) stops at http://localhost:9090/forums/forums/list.page and shows nothing but a blank page. I have included the log here in case it sheds any light on the problem! Although I can't see anything glaringly obvious.

2004-02-12 06:17:14 HostConfig[lws-standalone]: Deploying web application directory forums
2004-02-12 06:17:14 StandardHost[lws-standalone]: Installing web application at context path /forums from URL file:C:\Program Files\lws-3.0.3\webapps\forums
2004-02-12 06:17:14 WebappLoader[/forums]: Deploying class repositories to work directory C:\Program Files\lws-3.0.3\work\_\lws-standalone\forums
2004-02-12 06:17:14 WebappLoader[/forums]: Deploy class files /WEB-INF/classes to C:\Program Files\lws-3.0.3\webapps\forums\WEB-INF\classes
2004-02-12 06:17:14 WebappLoader[/forums]: Deploy JAR /WEB-INF/lib/commons-fileupload-1.0.jar to C:\Program Files\lws-3.0.3\webapps\forums\WEB-INF\lib\commons-fileupload-1.0.jar
2004-02-12 06:17:14 WebappLoader[/forums]: Deploy JAR /WEB-INF/lib/freemarker.jar to C:\Program Files\lws-3.0.3\webapps\forums\WEB-INF\lib\freemarker.jar
2004-02-12 06:17:14 WebappLoader[/forums]: Deploy JAR /WEB-INF/lib/log4j-1.2.8.jar to C:\Program Files\lws-3.0.3\webapps\forums\WEB-INF\lib\log4j-1.2.8.jar
2004-02-12 06:17:14 WebappLoader[/forums]: Deploy JAR /WEB-INF/lib/lucene-1.2.jar to C:\Program Files\lws-3.0.3\webapps\forums\WEB-INF\lib\lucene-1.2.jar
2004-02-12 06:17:14 WebappLoader[/forums]: Deploy JAR /WEB-INF/lib/mysql.jar to C:\Program Files\lws-3.0.3\webapps\forums\WEB-INF\lib\mysql.jar
2004-02-12 06:17:16 StandardManager[/forums]: Seeding random number generator class java.security.SecureRandom
2004-02-12 06:17:16 StandardManager[/forums]: Seeding of random number generator has been completed
2004-02-12 06:17:16 StandardWrapper[/forums:default]: Loading container servlet default



The first problem I encountered, however, could well be the reason I, and possibly Tiago Serafim, are encounting the second. During the creation of the jforum database, the db_struct procedure throws up the following error:

ERROR 1005: Can't create table '.\jforum\user_groups.frm' (errno: 150)
Query OK, 0 rows affected (0.00 sec)



Thus when one runs data_dump, the following occurs:

ERROR 1146: Table 'jforum.user_groups' doesn't exist
ERROR 1146: Table 'jforum.user_groups' doesn't exist
Query OK, 1 row affected (0.03 sec)



I haven't tried executing the commands directly yet, but that is next on the list. Whether this error is what is leading to the second problem, or whether they are unrelated I do not know.

Any help yourself, or anyone else, could lend to this problem(s) would be very much appricated. Thank you.

P.S. Also after I had extracted the .zip to JForum-<release> in my webapps directory, I had to rename the directory to forums before it would work. This is probably unrelated, however I bring it up as I could find no reference to it in the The First Steps... post. Thanks.
[originally posted on jforum.net by Diello]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I hope you don't mind my posting a reply as opposed to editing my previous, I'm just doing so to preserve the clarity of the thread.

1) Unsurprisingly entering the failed SQL commands doesn't make a difference, same error message.

2) Starting to narrow down the source of this issue I think... Although nothing is shown in the log, the last two messages my webserver produces in verbose are:

log4j:WARN No appenders could be found for logger (freemarker.cache).
log4j:WARN Please initialize the log4j system properly.



So presumably something related to log4j-1.2.8.jar is causing this?

Once again, thanks for any help!

UPDATE:
OK, the RTFM philosophy comes to mind here. In going through the forum I notice jacer's thread where the database connection is not being made. Tracing my log file back further I find that I also have this problem.

java.sql.SQLException: Server connection failure during transaction.
Attemtped reconnect 3 times. Giving up.



However:
1) MySQL service is running fine and can be accessed easily. Username and password are correct as they are what I connect as, and haven't been changed from the defaults. *scratches head*

2) Although almost certainly unrelated now. There is still the question of the errors when creating the db.

Thanks.
[originally posted on jforum.net by Diello]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK! This is becoming quite the saga!

The solution to the second problem is that the webserver must be running on the standard port 80, not on anything else.

So, my problem now is that, although the forum loads fine. I get the following error message from the first problem I had:

java.sql.SQLException: General error: Table 'jforum.user_groups' doesn't exist



lol, again, any help would be appricated!

EDIT: OK, this is all becoming quite surreal (rather fun really ;) ). What I forgot to mention before was that I also created a new admin account in mysql and had jforum connect using that account. Having realised this whilest making a cup of coffee after two hours of playing with an (almost) working board, I came back to figure out which one solved the problem, only to find, that having only spent the previous two hours playing with the database and not the config of the webserver or JF at all, I'd attracted a whole new error! I now get:

java.net.MalformedURLException: unknown protocol: c



Whenever I try to connect to the database, although it does seem to make a satisfactory connection to the db itself (I think).

The plot thickens...
[originally posted on jforum.net by Diello]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The mysql error 150 is relacted to foreign keys. Mysql documentation says that it occurs when you have a table using constraints, then you use DROP myTable and then try to recreate the table ..

The "solution" for that, according to the documentation, is to have the key sequence of constraints in the time you create the table ( aka, the sequence numbers must be in CREATE statement ). But it didn't work for me at all..

A quick solution? just drop the FOREIGN KEY xxxxx from the db_struct script .. this will not change the forum's behavior. I'm trying to solve this, anyway.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your help Rafael.

I had half toyed with the idea of removing the foreign key, but didn't want to chance doing so in case it caused bigger problems. I now have and have a nice db.

However, I have now encounted another problem! :?

When I originally got all the little tweaks done to get the connection established when I had the malformed db, I managed to connect to the forum once, after that on every connection I was presented with a new error message on the webserver log. I wondered if this was due to all the tinkering I'd done so took a clean machine and installed all the necessary on it and configured it all up, however I get the exact same error message on there as I did on the original workstation. I'm 99.8% convinced that I didn't, directly anyway, change any settings between it working on the original workstation, and it not.

I've included the complete webserver log of the event at the end of this post, though I'd guess that the error that is causing the problem is:

java.net.MalformedURLException: unknown protocol: c



Which, I think, implies that a c:\ path has been used at a point at which a URL is needed. Either that or it not finding a required library... OK, now I'm just guessing...

I'm beginning to think I'm having would of those un-technically adapt days!! Maybe I need to sleep more ;)

Anyway, if you could find the time, once more (!), to see if you could shed any light on this current state of affairs. I'd be most thankful!

Complete WebServer Log of Event:

*********************************************
******** STARTING CONNECTION POOL ***********
*********************************************
database.connection.driver = com.mysql.jdbc.Driver
minConnections = 2
maxConnections = 10
timeout = 120
*********************************************
Fri Feb 13 03:18:36 GMT 2004 openning connection 1
Fri Feb 13 03:18:36 GMT 2004 openning connection 2
java.net.MalformedURLException: unknown protocol: c
at java.net.URL.<init>(URL.java:586)
at java.net.URL.<init>(URL.java:476)
at java.net.URL.<init>(URL.java:425)
at uk.co.wilson.xml.MinML2.parse(MinML2.java:624)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at net.jforum.util.BBCodeHandler.parse(BBCodeHandler.java:75)
at net.jforum.JForum.init(JForum.java:265)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:935)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.jav
a:668)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:210)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2416)
at com.gefionsoftware.lws.core.StandardHostValve.invoke(StandardHostValv
e.java:156)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
3)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:572)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:619)
at java.lang.Thread.run(Thread.java:536)

Starting a new session
java.util.NoSuchElementException
at java.util.Vector.lastElement(Vector.java:464)
at java.beans.ObjectHandler.lastExp(XMLDecoder.java:266)
at java.beans.ObjectHandler.dequeueResult(XMLDecoder.java:271)
at java.beans.XMLDecoder.readObject(XMLDecoder.java:150)
at net.jforum.JForum.checkCookies(JForum.java:344)
at net.jforum.JForum.service(JForum.java:417)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:494)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2416)
at com.gefionsoftware.lws.core.StandardHostValve.invoke(StandardHostValv
e.java:156)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
3)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:572)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:619)
at java.lang.Thread.run(Thread.java:536)

Releasing connection...
Deleting a session



Thank You
[originally posted on jforum.net by Diello]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hhmm.. you're getting problems with bb code loading.. The exception points to BBCodeHandler line 75, which is the one that calls the method to parse the XML file.

I get the XML filename by doing





has the full path to the context directory. It is set at JForum.java, at lines 249 and 250.

I have ran jforum both under linux and windows ( I develop under windows ), and never got this problem. Some search at google points to bugs where you have a filename like "c:\mydir", and the "solution" was to change it to "c:/mydir"... As JForum does it automatically, you can't change this path without a hack.

I can't find a reason for this bug now, it is really weird. If you want to make one more test, I suggest you the following:

Put JForum in a new directory, extracting the files from the ZIP.. ( don't copy the actual directory ). Then point another context to this path and try it.

Bizarre... Really..

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bizarre indeed!

Having spent a few solid days tweaking this, that, and the other. I think I shall have to concede defeat. Although I shall keep on working at it between other projects (I hate being defeated by a problem). Really is quite odd! However, I shall keep a close eye on this forum and SF and eagerly await B3+ to see if that makes any difference.

Thanks for your help.
[originally posted on jforum.net by Diello]
 
Nothing up my sleeve ... and ... presto! A tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic