Meaningless Drivel is fun!
The moose likes JForum and the fly likes What am I doing wrong setting up? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "What am I doing wrong setting up?" Watch "What am I doing wrong setting up?" New topic

What am I doing wrong setting up?

Ollie Relent

Joined: Apr 25, 2013
Posts: 11
Hey people.

So as an enthusiast and someone who wants to try server side things to complement my web design, i have setup Tomcat and it's using a derby database which i've got storing various information that my jsp pages gather.

I want to add a forum which is only accessible after the user has logged in. I looked around and it seems Jforum is the most popular java based one. All good and fine.

I've slapped and unzipped into webapps but CANNOT get the thing to run. I keep getting...

com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Server connection failure during transaction. Due to underlying exception: ' Connection refused: connect'.

MESSAGE: Connection refused: connect

STACKTRACE: Connection refused: connect
at com.mysql.jdbc.StandardSocketFactory.connect(
at com.mysql.jdbc.MysqlIO.<init>(
at com.mysql.jdbc.Connection.createNewIO(
at com.mysql.jdbc.Connection.<init>(
at com.mysql.jdbc.NonRegisteringDriver.connect(
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at net.jforum.SimpleConnection.getConnection(
at net.jforum.SimpleConnection.init(
at net.jforum.view.install.InstallAction.configureDatabase(
at net.jforum.view.install.InstallAction.doInstall(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.jforum.Command.process(
at net.jforum.view.install.InstallAction.process(
at net.jforum.InstallServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.AbstractHttp11Processor.process(
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$ Source)
at Source)


Attempted reconnect 3 times. Giving up.

I've changed my Tomcat ports to 80 and 443 to make it easier and nicer for myself and have 'my' current database in a completely different directory for security, which i've linked as a resource etc. I have not created another database for Jforum/any tables etc as I didnt think I had to.

I've tried following the Jforum install.jsp but each attempt ends in failure. Can anyone show me how to get this working?

I've followed a few tutorials aswell on setting up but to no avail.

Many Thanks and much thanks if you can help

Ranganathan Kaliyur Mannar

Joined: Oct 16, 2003
Posts: 1101

Hi Ollie,
Welcome to the Ranch!

Which version of the software did you download? I have earlier installed 2.1.8 and did not face any issues...
Did you also check the installation page provided in the site?

You might have missed setting a directory permission...

Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

You said that you're using a Derby database, but the stack trace says that the MySQL database driver can't connect to the database.

I expect there's somewhere in the configuration where you specify how the application should connect to its database? You should look there.
Ollie Relent

Joined: Apr 25, 2013
Posts: 11
Ok, so i used the standard setup it describes and I get the forum up, that said, it has its own login system etc, which is a bit annoying.

I was using the MYSQL type before Derby uses MYSQL style sql etc when I setup my db and tables using the ij batch file.

Does anyone know how to get jforum running from your OWN database for login things. I already have a table which stores username, password and email plus a few more things, so i would much prefer to use that. This is because after logging in the user can do more things than use use the forum. Adding the forum was a nice extra feature I desired in my spec.

I used the datasource type before and tried putting in my filepath to the db but it didnt find it/like this config.

Has anyone got Jforum to work with a pre-existing derby db? The db already has a table with user names passwords, emails, D.O.B etc

Ollie Relent

Joined: Apr 25, 2013
Posts: 11
Thanks for the welcome folks

I have the latest version of jforum and the latest version of derby. Yup i followed the installation guide :S
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
You can't just point JForum at some table containing user data; JForum expects specific table names and fields. Unless the DB you're pointing it at has that exact schema information, JForum is simply not going to work.

What is "the latest version of jforum"? 2.19 or 3.0 beta from or 2.3.4 from
Ollie Relent

Joined: Apr 25, 2013
Posts: 11
Yer I agree. I that case, i expect its easier to fill in the jforum tables with information when my users sign up using my form? Seeing as I have extra columns in my old table couldn't I just add extra colums to the jforum tables? I dont think that would affect any queries it performs to retrieve data etc....(hopefully)
Ollie Relent

Joined: Apr 25, 2013
Posts: 11
2.19. I bailed on the beta (which i guess IS the newest version)
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
I would advise to use 2.3.4 from over 2.1.9; it has a bunch of bug and security fixes and other improvements over 2.1.9. In fact, if you grab the latest source code from the SVN (which is stable), you get a whole bunch of functional improvements.

Yes, I would expect that it's easier to add your columns to the JForum tables. Note that you will have to adapt the JForum code that handles that table (specifically, the User entity, and the SQL queries that read and write its content), so that your additional fields do get handled properly. It may be possible that that's not necessary, but only a source code inspection would prove or disprove that.
Christopher Ward

Joined: May 10, 2013
Posts: 1

I just hit the same problem as the original question here.

My Tomcat server runs on a Linux box and I was connecting through a browser on Windows.

I found I got it to work by doing two things

1) Open port 3306 on the Linux box

2) I also set the permissions in MySQL

I leave this info here in the hope it helps someone, some day, some how!

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33119

Thanks Chris! Welcome to CodeRanch and thanks for sharing. I gave you a cow as a thank you.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: What am I doing wrong setting up?
It's not a secret anymore!