I link to jForum from within an application for which a user has already been validated. I include a session ID in the query string on the URL that links to jForum. This session ID is taken from the query string in CookieUserSSO.java and is used to select user data from my database, which is separate from jForum's. This all works OK on my test system using MySQL 5.0.38, but it fails on my new web hosting configuration. The failure comes when I try to connect to my separate database.
My hosting provider is looking into this, but I was wondering if any jForum experts out there may have a suggestion about where to look? There must be some configuration difference between the two MySQL implementations, mine and my web hosting company's.
Grabbing at straws, I wonder if this may be associated with connection pooling. For example my version of jForum uses connection pooling, but my connecting back to my database does its work outside of any jForum database processes. That is, I just use a simple JDBC driver
java.net.SocketException: java.net.ConnectException: Connection refused
** END NESTED EXCEPTION ** [originally posted on jforum.net by dhhoyle]
Since my code in CookieUserSSO uses a simple connection, I setup jForum to also use simple connections. I still got the same error.
My application updates jforum_users when a user registers or changes things like e-mail address and name. Opening a connection in my application to the jForum database, therefore, works OK. I always close connections after any database access; therefore, I do not have two connections open at the same time. See below.
I apologize for asking you to review my code, but I am stumped. I have attached my version of CookieUserSSO. Just a quick look would be appreciated to see if anything I am doing could confuse MySQL (MySQL connector 5.1.6). Actually, anything that violates some MySQL setup parameter For example, is it possible that jForum still has a connection open to its database, while I am trying to open a second database and my hosting provider's MySQL setup does not allow two database open at the same time? I will ask my web host if something like this is possible.
After I get the "Connection refused" error, jForum proceeds to signon a null user --something I need to stop eventually --, proving that jForum accesses its database OK.
Thanks very much,
Danny [originally posted on jforum.net by dhhoyle]
I found my problem. Due to a mixup in links to jForum, I was merrily making changes to CookieUserSSO.java, but they were not seen by Tomcat and were not therefore recompiled. I was using an older version on my local Linux box, which happily opened my database connections with old user IDs and passwords. Moving to a web host required new user IDs and passwords, uncovering my error.
You were great to look at my ramblings. Your suggestions made me look deeper. When I finally compared .java and .class timesamps, I saw the problem.
Daniel [originally posted on jforum.net by dhhoyle]