Search code examples
reclipsederbystatet

Information shows in browser, not "R Help" pane, when using StatET


I am using Eclipse 2018-09 and StatET 3.6.1. I have two R environments: one for R 3.3.2, another for R 3.5.1. When I execute a command like ?lm to call up a help page in v3.3.2, the page appears in the StatET "R Help" pane, as I want it to. But when I execute the same command to call up a help page in v3.5.1, the console tells me "starting httpd help server," and the help page loads in my browser. How can I get help to load in the "R Help" pane when using v3.5.1?

The problem arises whether or not I run Eclipse as an administrator, and whether or not I "Auto Run" R 3.5.1 upon booting. And as far as I can tell, the configurations for the two versions of R are nearly identical:

  • Both are running Windows 10 and JRE 1.8.0_121.
  • Both with version 2.1 of the rj package.
  • For both, I've checked every box in "Run Configurations > R Console > R Console > Eclipse Integration," including "Enable R Help for StatET."
  • For both, options("help_type") == 'html'.

Inspection of the different log files that I get when using Auto Run with the two versions of R suggests that there is some sort of StatET config problem that has to do with Derby. These messages appear only when I boot R 3.5.1:

!ENTRY de.walware.statet.r.core 4 -1 2018-11-16 02:50:29.092
!MESSAGE An error occurred when initializing DB for model.
!STACK 1
org.eclipse.core.runtime.CoreException: An error occurred when loading embedded DB (Derby + DBCP)
    DB ConnectionURL=[path redacted]\eclipse-workspace\.metadata\.plugins\de.walware.statet.r.core\db
[...]
Caused by: java.sql.SQLException: Another instance of Derby may have already booted the database C:\[path redacted]\eclipse-workspace\.metadata\.plugins\de.walware.statet.r.core\db.
[...]
Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database C:\[path redacted]\eclipse-workspace\.metadata\.plugins\de.walware.statet.r.core\db.

But I don't know what to make of this problem or how to fix it.


Solution

  • Stephan Wahlbrink, the creator of StatET, recommended running this command at startup:

    registerS3method("print", "help_files_with_topic", rj::print.help_files_with_topic)
    

    I ran the command, and it solved the problem.

    (Stephan added that the Derby errors that I saw in the logs were unrelated to the problem of displaying help in the "R Help" pane.)