This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "What am I doing wrong setting up?" Watch "What am I doing wrong setting up?" New topic
Author

What am I doing wrong setting up?

Ollie Relent
Greenhorn

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: 'java.net.SocketException: java.net.ConnectException: Connection refused: connect'.

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused: connect

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2769)
at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at net.jforum.SimpleConnection.getConnection(SimpleConnection.java:94)
at net.jforum.SimpleConnection.init(SimpleConnection.java:74)
at net.jforum.view.install.InstallAction.configureDatabase(InstallAction.java:679)
at net.jforum.view.install.InstallAction.doInstall(InstallAction.java:172)
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(Command.java:114)
at net.jforum.view.install.InstallAction.process(InstallAction.java:915)
at net.jforum.InstallServlet.service(InstallServlet.java:141)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:947)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


** END NESTED EXCEPTION **


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
Bartender

Joined: Oct 16, 2003
Posts: 1075
    
  10

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...


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18168
    
    8

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
Greenhorn

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

Thanks
Ollie Relent
Greenhorn

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
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
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 jforum.net or 2.3.4 from https://code.google.com/p/jforum2/?


Ping & DNS - updated with new look and Ping home screen widget
Ollie Relent
Greenhorn

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
Greenhorn

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

Joined: Mar 22, 2005
Posts: 39578
    
  27
I would advise to use 2.3.4 from https://code.google.com/p/jforum2/ 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
Greenhorn

Joined: May 10, 2013
Posts: 1
    
    1
Hi,

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

http://www.instantsupportsite.com/self-help/ubuntu-mysql-port-3306/


2) I also set the permissions in MySQL




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

Chris
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What am I doing wrong setting up?
 
Similar Threads
Write permission to index.htm?
Exception during installation
new to db connection help needed
installation problem
Server connection failure during transaction