Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

What am I doing wrong setting up?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Marshal
Posts: 28288
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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/?
 
Ollie Relent
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
2.19. I bailed on the beta (which i guess IS the newest version)
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author & internet detective
Posts: 41967
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Chris! Welcome to CodeRanch and thanks for sharing. I gave you a cow as a thank you.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic