aspose file tools*
The moose likes JForum and the fly likes Mild warning/suggestion - develop using an Oracle JDK and a local installed DB (and why) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Mild warning/suggestion - develop using an Oracle JDK and a local installed DB (and why)" Watch "Mild warning/suggestion - develop using an Oracle JDK and a local installed DB (and why)" New topic
Author

Mild warning/suggestion - develop using an Oracle JDK and a local installed DB (and why)

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
My initial setup was OpenJDK, the embedded HSQLDB, JForum2 and development through Eclipse. I've had several problems, and intermittent performance. In short, my recommendation is,

- Don't use OpenJDK...
- Don't use the embedded HSQLDB database...

...for anything other than a trial assessment. This is not adverse criticism of either technology. OpenJDK is an amazing piece of work, and I rather wish there was something like HSQLDB in other environments - it looks good. There seems to be a mismatch, despite standards, with JForum abilities, that's all.


Here's a short list of problems,

- There's no way to fix problems in an embedded database
If bad data gets in there, development needs a fresh installation. This page on upgrades suggests there is a GUI built in to an embedded HSQLDB,

http://jforum.net/upgrading217to218.jsp

But I never got far enough to try it.

When I say bad data, I found localhost banned from my development installations. The easiest way to fix this is to clear out the banned table, but that's not easy on an embedded DB.

- CAPTCHA code fails
Initially, CAPTCHAs show, but then they are replaced by generic images. Also, the CAPTCHA code appeared to be performing intermittently with registrations, though why that should happen is obscure.

The JForum2 download page offers a download for a CAPTCHA .jar, so I guess they know about this,

https://code.google.com/p/jforum2/downloads/list

but I didn't initially spot this. Also, I don't know how to get the .jar working (?)

- Intermittent DB connections
The database connections had a habit of failing. Once they failed on install - a rather distressing hangup.

DB connection problems seem to be an ongoing issue in Java generally, and must be very hard to answer questions about - frustration all ways. But again an embedded DB leaves the developer with little room for manoeuvre - especially if using a binary JForum such as recent JForum2 releases.

I note that some of these issues cross other threads. but here it is as one. If you get here early, you might like to know that switching to Oracle/Sun JDK and and a Postgre DB (nothing fancy, a packaged version), has removed these issues (so far).
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30913
    
158

I see why you are recommending not to use an embedded database. What was the problem with Open JDK? Or you switched them both together?


[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
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
You go me. I changed them both together. My only evidence is JForum2's .jar download. If anyone has experience of that rig (JForum2, non-embedded DB and Open JDK), or knows about why JForum2 site carries that post, that would be a good addition to this thread (I'll modify the recommendation)?

(I've still got a minor problem with CAPTCHA it seems, On a ban it should preferably redirect to the banned page, but puts up the form with an empty CAPTCHA. Still, I rate that behaviour as minor).
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42595
    
  65
It depends on which JForum version you're using. The JForum version hosted at Google Code works fine with OpenJDK as long as you replace the captcha library; see http://jforum.andowson.com/posts/list/69.page for details.

Whether JForum 2.1.x does -which it seems you're using- I have no idea.

See this post of mine for some clarification about the various version of JForum which are out in the wild: http://www.coderanch.com/t/622325/jforum/Preserving-customizations-upgrading#2845374


Ping & DNS - my free Android networking tools app
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
I can't edit the original post (I don't think?). So...

That first link is magic. It's what's missing from this post.

Revised comments,

- OpenJDK is good
...but if used, spare some problems and read the post linked above on the CAPTCHA jar posted with the Google revisions of JForum2. Then it may be a good idea to install the .jar, even if the intention is to disable CAPTCHA (what if you forget?)

- Don't use the embedded HSQLDB, if a decision is made to develop with JForum
The original comments stand. Nothing against HSQLDB, but in contextt of embedding in JForum, only good for a trial run.

Little more on the connection issues (In the interim, I remembered),

While developing in Eclipse, Eclipse would baulk at starting the DB (that was only one issue, mind). There are too many factors to look at (too many logs for a Java beginner?). But this doesn't make for clean development.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42595
    
  65
With respect to Hsqldb : I like it, and have used it in embedded mode even in web apps, but only where very few tables were involved, and where alterations happened in strictly controlled circumstances. I don't think I'd ever want to try it with a schema as a complex as JForum has. Even if it can handle the data volume, the architectural benefits of a standalone DB outweigh the perceived benefits of an embedded DB in this case, IMO.
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
So, a mild suggestion that embedded HSQLDB is maybe not a good plan for production.

To the qualifying above, I'd add. I've spent maybe ten days with Java so far, and had no gear loaded. The provision of embedded HSQLDB let me assess JForum very quickly. Also, the fact it was there was a sign that, though in terms of forum software JForum is in something of a wilderness, being Java based, this was good software, something I've felt time and again.

If I ever get to source (not impossible, but not soon) I guess I might propose a note on the installer page. Not an impressive change, but helpful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mild warning/suggestion - develop using an Oracle JDK and a local installed DB (and why)