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.