Plugging JGR into a Java app and launch Deducer

129 views
Skip to first unread message

trblft

unread,
Apr 16, 2013, 5:34:05 AM4/16/13
to ded...@googlegroups.com
Hi,
Big fan of deducer, I'm trying to plug it into another Java app
(imageJ), so I've plugged JGR into imageJ, hell of a fight but it works
well.
So I'm trying to launch Deducer now, but when I do
JGR.MAINRCONSOLE.execute(library(Deducer)) I get this Error message :

java.lang.UnsatisfiedLinkError: Native Library
/home/musicien/R/x86_64-pc-linux-gnu-library/2.15/rJava/jri/libjri.so
already loaded in another classloader
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1901)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1860)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1834)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at org.rosuda.JRI.Rengine.<clinit>(Rengine.java:19)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.rosuda.JRI.Rengine.rniRunMainLoop(Native Method)
at org.rosuda.JRI.Rengine.run(Rengine.java:640)

Any idea on how to fix it? Should I post this on Rosuda devel list?
Thanks. Deducer is amazing, especially the plugin development API.

Ian Fellows

unread,
Apr 16, 2013, 12:35:02 PM4/16/13
to ded...@googlegroups.com
This question is probably better suited to the rosuda devel list. The problem is that you have two java classloaders running at the same time. the usual one started by ImageJ, and the one started from within R by rJava.

I don't know of a solution to this issue. usually java programs are either embedded within R (as in Deducer), or embed R within them. What you are trying to do is both. 


best,
Ian




--

--- You received this message because you are subscribed to the Google Groups "Deducer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deducer+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Bruce Miller

unread,
Apr 17, 2013, 2:18:17 PM4/17/13
to ded...@googlegroups.com
Hi all,

I tried re-installing the new R 3 and then using the line for install Ian has on the Deducer page:
install.packages(c("JGR","Deducer","DeducerExtras"))
library(JGR)
JGR()

Then I followed this:

If you wish to load Deducer every time you start R, open Rprofile.site with notepad. It should be located in the directory: C:\Program Files\R\R-x.x.x\etc

then add:

local({
old <- getOption("defaultPackages")
options(defaultPackages = c(old, "Deducer"))
})
JGR and Deducer will now open with R 3 however the Deducer Data Viewer window is not present/visible. 
Under Window on top menu bar it is listed
Console [1]
Data Viewer [2]

but when you click on Data Viewer it does not open as it did in the past.

Previously the data viewer opened when Deducer started.

What next Ian?

Bruce Miller

unread,
Apr 17, 2013, 2:22:19 PM4/17/13
to ded...@googlegroups.com
Hi all,

Forgot to mention that under preferences "Show data viewer on start up"
is selected.


What next Ian?

Bruce Miller

unread,
Apr 18, 2013, 2:22:21 PM4/18/13
to ded...@googlegroups.com
Hi all,

OK I deleted all vestiges of R 3.0 and installed 2.15.3 then installed
(or attempted to) Deducer as usual. Using the MI CRAN.

Still no data viewer.

I have always had good results using CA-Berkeley CRAN and I
re-=installed Deducer from there and it is now working as expected under
R 2.15.3.

I have not yet attempted to try it again with R 3.0


Issue with corrupted field on MI CRAN?

Ian Fellows

unread,
Apr 18, 2013, 7:36:11 PM4/18/13
to ded...@googlegroups.com
Bruce,

It helps if you are very specific about the behavior you are experiencing. "Somehow killed" doesn't give me much to work with.

A couple things. 

1. You do _not_ want to edit RProfile.site. Those instructions were just for those running Deducer within RGUI not JGR.

2. Upgrading can cause problems with the JGR preferences. try deleting them. They are hidden preference files in your home directory (you can use the rm command in the command prompt). They are named .JGRprefsrc and .JGREditorprefsrc.

Best,
Ian

Bruce Miller

unread,
Apr 18, 2013, 8:06:15 PM4/18/13
to ded...@googlegroups.com
Hi Ina,

Yes "Killed" was a bit vague... :-[
should have said would not launch at all...
With the 2.15.3 version it is working again.
 In any case many tnx for workign on this and developing Deducer.When will a version ready for R. 3. be available or is that even necessary?

Bruce
Ian

To unsubscribe from this group and stop receiving emails from it, send an email to deducer+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
 
---
You received this message because you are subscribed to the Google Groups "Deducer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deducer+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 


-- 
Bruce W. Miller, Ph.D.
Conservation Ecologist
Neotropical Bat Projects


office details
11384 Alpine Road
Stanwood, Mi. 49346
Phone (231) 679-6059


Ian Fellows

unread,
Apr 18, 2013, 9:23:58 PM4/18/13
to ded...@googlegroups.com
Jgr and deducer both work perfectly well with R 3.0.0, though the installers have not yet been upgraded to match. 

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages