1

Trying to run OpenForis Calc, embedded Tomcat instance fails.

Error seems to appear here:

Apr 17, 2015 2:13:47 AM org.apache.catalina.startup.HostConfig deployDescriptor 
INFO: Deploying configuration descriptor /opt/OpenForisCalc/calc-server/tomcat/conf/Catalina/localhost/calc.xml

Apr 17, 2015 2:13:58 AM org.apache.catalina.core.StandardContext startInternal  
SEVERE: Error listenerStart

Then if messes up with the rest (this repeats a lot):

Apr 17, 2015 2:13:58 AM org.apache.catalina.core.StandardContext startInternal 
SEVERE: Context [/calc] startup failed due to previous errors 
David Foerster
  • 35,754
  • 55
  • 92
  • 145
  • It went fine. I only got the message when the Tomcat ran and the Software didn't open on Firefox. – Marcelo Rezende Apr 17 '15 at 18:24
  • @tohuwawohu It never worked. But i had no error message during the installation. – Marcelo Rezende Apr 17 '15 at 18:30
  • I think so. I've never opened postgresql. I have it ONLY for Calc. – Marcelo Rezende Apr 17 '15 at 18:38
  • Wait wait... It is stuck. It open Calc... blue screen... Loading bar... but nothing further. – Marcelo Rezende Apr 17 '15 at 18:51
  • Many. It get stuck and freezes Firefox. Let me copy it. – Marcelo Rezende Apr 17 '15 at 18:56
  • Apr 17, 2015 3:50:59 PM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 6 instance(s) to be deallocated for Servlet [spring] Apr 17, 2015 3:51:00 PM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 6 instance(s) to be deallocated for Servlet [spring] Apr 17, 2015 3:51:01 PM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 6 instance(s) to be deallocated for Servlet [spring] Apr 17, 2015 3:54:33 PM org.apache.catalina.core.StandardServer await – Marcelo Rezende Apr 17 '15 at 18:57
  • Ok... I restarted and reinstalled Cal... and restarted again. It is the same. Tomcat runs now. Calc opens on Firefox, but remains stuck in the loading. I can see the Plataform (buttons and so), but no interaction. Apr 17, 2015 4:15:25 PM org.apache.catalina.core.StandardService stopInternal INFO: Stopping service Catalina Apr 17, 2015 4:15:25 PM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 3 instance(s) to be deallocated for Servlet [spring] – Marcelo Rezende Apr 17 '15 at 19:18
  • Please check if **JavaScript is enabled** in your browser. With JavaScript **disabled**, the first page of Calc displays about 11 buttons without functionality and some horizontal lines. Alternatively, try to access Calc using Google Chrome or [Chromium](https://apps.ubuntu.com/cat/applications/chromium-browser/). I assume it isn't a server-side issue any more, but a browser issue. – tohuwawohu Apr 17 '15 at 19:24
  • JavaScript was enabled. Do you think Calc will automatically recognize Chromium once I install it? Do I have to uninstall Firefox? – Marcelo Rezende Apr 17 '15 at 19:33
  • After installing chromium, just open the following URL in chromium: http://localhost:8081/calc - you don't need to uninstall firefox. If it doesn't work, check the calc log (see my answer, i've edited it). – tohuwawohu Apr 17 '15 at 19:44

1 Answers1

1

I assume this is because Calc isn't able to access the PostgreSQL database. Double-check if PostgreSQL is running:

sudo service postgresql status

should return something like

9.3/main (port 5432): online

If PostgreSQL is running, check the credentials. By default, there's no admin password set for PostgreSQL. Calc assumes postgres as admin password, by default. So, if you didn't set a password yet, follow the instructions to do so:

  1. Start the postgresql command line client as user postgres:

    sudo -u postgres psql postgres
    
  2. Inside the client:

    \password postgres
    
  3. Now, you can enter the admin password - you should choose a secure one!

If you want to change the password Calc is using (maybe because you've choosen a more secure one): open the following file with your favorite text editor:

/opt/OpenForisCalc/calc-server/tomcat/conf/Catalina/localhost/calc.xml

and look for a line looking like:

<Parameter name="calc.jdbc.adminpassword" value="postgres" />

EDIT:

If you still encounter problems, you should check the logs directly. You'll find them in

/opt/OpenForisCalc/calc-server/tomcat/logs

There should be a log file calc.log - check its contents for errors.

David Foerster
  • 35,754
  • 55
  • 92
  • 145
tohuwawohu
  • 7,282
  • 5
  • 27
  • 33
  • i did what you told me. I get: 9.3/main (port 5432): online – Marcelo Rezende Apr 17 '15 at 19:01
  • It does: 2015-04-17 16:14:51,830 [localhost-startStop-1] DEBUG (DatabaseInitializer.java [isDBInitialized]:56) - Check database initialization: driver=org.postgresql.Driver host=localhost port=5432 user=calc 2015-04-17 16:14:52,255 [localhost-startStop-1] DEBUG (DatabaseInitializer.java [isDBInitialized]:61) - Database exists 2015-04-17 16:15:25,367 [http-apr-8081-exec-5] WARN (R.java [getJriPath]:86) - Error getting JRI library path from R – Marcelo Rezende Apr 17 '15 at 19:50
  • 2015-04-17 16:43:30,320 [localhost-startStop-1] DEBUG (DatabaseInitializer.java [isDBInitialized]:56) - Check database initialization: driver=org.postgresql.Driver host=localhost port=5432 user=calc 2015-04-17 16:43:31,309 [localhost-startStop-1] DEBUG (DatabaseInitializer.java [isDBInitialized]:61) - Database exists 2015-04-17 16:44:03,985 [http-apr-8081-exec-5] WARN (R.java [getJriPath]:86) - Error getting JRI library path from R – Marcelo Rezende Apr 17 '15 at 19:50
  • Is R installed? Did you tell the Calc installer to use `/usr/lib/R` as R installation directory? Maybe again the full log may provide useful information... – tohuwawohu Apr 17 '15 at 19:54
  • I did. The full log is too big to paste here. Check this part: Apr 17, 2015 4:58:40 PM com.sun.jersey.api.core.ScanningResourceConfig init INFO: No provider classes found. Apr 17, 2015 4:58:40 PM org.codehaus.enunciate.modules.jersey.EnunciateJerseyServletContainer configure INFO: org.codehaus.enunciate.modules.amf.JAXRSProvider not found. – Marcelo Rezende Apr 17 '15 at 20:00
  • from the calc.log 2015-04-17 16:58:30,117 [localhost-startStop-1] DEBUG (DatabaseInitializer.java [isDBInitialized]:56) - Check database initialization: driver=org.postgresql.Driver host=localhost port=5432 user=calc 2015-04-17 16:58:30,206 [localhost-startStop-1] DEBUG (DatabaseInitializer.java [isDBInitialized]:61) - Database exists 2015-04-17 16:58:43,027 [http-apr-8082-exec-1] WARN (R.java [getJriPath]:86) - Error getting JRI library path from R – Marcelo Rezende Apr 17 '15 at 20:02
  • Again, just guessing: rjava isn't available. Try `sudo apt-get install r-cran-rjava` and restart Calc afterwards. – tohuwawohu Apr 17 '15 at 20:08
  • For full logfile, use something like http://www.tinyupload.com/ and add a link to the uploaded log. Regarding R: see http://cran.r-project.org/bin/linux/ubuntu/README and http://askubuntu.com/questions/506560/how-to-install-package-of-r – tohuwawohu Apr 17 '15 at 20:19
  • It worked!! I need to copy some things we have done here before you delete the questions. ok? – Marcelo Rezende Apr 17 '15 at 20:32
  • No problem :-) great to hear that it works now! – tohuwawohu Apr 17 '15 at 20:38
  • I'll do my best (maybe tomorrow, here's already near midnight...) - btw, regarding the comments - i can only delete my own comments, you should remove your ones if they aren't required any more to understand question and answer. – tohuwawohu Apr 17 '15 at 21:11