This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JForum and the fly likes JForum in Eclipse/Tomcat - gotchas Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "JForum in Eclipse/Tomcat - gotchas" Watch "JForum in Eclipse/Tomcat - gotchas" New topic
Author

JForum in Eclipse/Tomcat - gotchas

robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
I've just taken a 3hr hit on problems with this rig. I'm ganging both my major issues together on this thread.

It should be said, these are JForum issues, but influenced by development in Eclipse rather than being JForum-isolated issues, as they stand.

Also, it should be said, I'm a beginner - twelve days (I think) into Java. These may be bread and butter to experienced developers. But if I can spare anyone this loss, I will (stubborn, huh?). Here they are,


'Unsupported character encoding'
This error seems so like nothing, but brought me to a breaking halt. On trying to open some JForum files, this error appears. The explanation is even reported by Eclipse,

Character encoding '${encoding}' is not supported by this platform

Why the Eclipse code detects Freemarker markings as a suggestion of file-type detection, I don't know. What is for sure is that solutions provided by a web search failed. It was not possible to reorganise (or I found) set Eclipse preferences to handle the files. Maybe this is fundamental to the file-detection code, so the preferences do not work? What can be done is to ask the files to be handled on a case by case basis.

-- press the offered button twice (my computer is slow, but the GUI seems to loose keystrokes like it was a webpage)

-- choose 'other encoding' as 'UTF-8'

I can imagine there are systems where this will not occur at all, but if it does, and there's plenty of evidence on the web that it does, it's a bind.


"com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source" (and the like)
Oh, this is obscure. The test environment is returning 404's, or even seemingly hanging, on everything. With next to no errors, unless you're lucky enough to catch the above.

Not only are there few errors or hints, but they may be misleading. See this, on Stackoverflow,

http://stackoverflow.com/questions/3566146/setting-property-source-to-org-eclipse-jst-jee-serverjsftut-did-not-find-a

i.e. this is *not* the problem.

....and what is massively misleading is this,

On first installation Eclipse will succeed in raising a database connection to an unconfigured JForum WAR import

I suspect this is not peculiar to my setup, as it seemed to happen both on embedded HSQLDB (see my other recent thread, this is likely another cause of those problems) and Postgre. How Eclipse manages this I'm sure I'd like to know sometime, but for now,

Do not, I repeat, do not alter 'server.xml', or follow other likely looking lines of approach from web searches. Try this,

-- shutdown the server, remove the project.

-- open,

appBase > WEB-INF > config > SystemGlobals

and alter the username and password to the correct values for your database (this is noted in some other threads here). Also change anything else that needs changing, such as if you named the database something other than the default 'jforum'. I needed my driver to be 'postgresql'

-- open,

appBase > WEB-INF > config > databases > relevantDBName > relevantDBName.properties

and change the information there. I needed the driver name 'postgresql' there, too.

This is a full manual DB configure, as per,

https://code.google.com/p/jforum2/wiki/ManualInstallation

None of the key settings values are correct, and how Eclipse/JForum makes a DB connection without them, I don't know? A tribute of sorts to the software? Anyhow, in Eclipse, right-click the server, then,

-- clean (maybe not necessary, but this action would have crashed the installation before the configuration above, so not a bad idea)

-- add your project back into the server

-- use the 'Data Source Explorer' to check the DB is actually running (if you like)

-- restart the server

If you typed the configuration details in correctly, you should now be up and running. With an installation/development version which can be stopped/started, and cleaned, without causing a lost evening.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

Thanks for sharing your experiences. This is going to be very helpful to someone at some point. Have another cow.


[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
These cows are kinda cool This material ought to be going in a loose manual, really, but given that JForum3 is in the air, and Google JForum2, I felt here would be as good as anywhere. Cows keep me sluggin'! Next up, email, likely...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

I agree here is a good place. The JForum site directs people to this forum so it is official enough. The manual word gave me an idea to consolidate such work. I created a wiki page with your articles along with some I've written on JForum. Wiki pages are editable by all members. Can you add links to the wiki page back to the forum threads as you write more of these?
robert crowther
Ranch Hand

Joined: Oct 19, 2013
Posts: 41
    
  10
Jeanne, that's a very good idea. I think the plan was that this material would gather on the JForum site, but the maker seems to have very limited time, probably allocated to JForum3 if anything.

Unfortunately I'm getting a logon page from the link, and couldn't find the page through the site. Could you title the pages, or point me in the right direction? I'd be glad to post links back. Anything to help, really - I think JForum is a lovely piece of software and it's creator deserves help, even as straightforward as this.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41062
    
  43
robert crowther wrote:Unfortunately I'm getting a logon page from the link, and couldn't find the page through the site.

This has been fixed.


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

Joined: Oct 19, 2013
Posts: 41
    
  10
Thankyou Ulf,
Rob
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JForum in Eclipse/Tomcat - gotchas
 
Similar Threads
Tutorial PostgreSQL 8.3 on Glassfish V2.1 for ConnectionPool in Netbeans 6.5.1, WindowsXP (Post 3)
Feedback on issues found with 2.1.7-b3 installation
Internationalization
Error while trying to configure the database
Netbeans doesn't realize if JBoss is running