Skip to content

blpConnect hangs with RBloomberg 0.4-150 on R2.13.1

3 messages · Murali.Menon at avivainvestors.com, John Laing

#
Folks,

I am trying to upgrade from R2.11.1 with RBloomberg 0.4-144 and rJava_0.8-6, in which setup I have no problems connecting and using Bloomberg. My Java environment is JRE 6.

I see that some people have got RBloomberg 0.4-150 working under R2.13.1. It doesn't, however, for me: 

I am unable to establish  a connection using

conn <- blpConnect(blpapi.jar.file = 'C:/Program Files/blp/API/blpapi3.jar')

Inside blpConnect.Java() the "Java environment is initialized successfully", but thereafter the call tree gets stuck at .jnew() and hangs.

In .jnew():

o <- .External(RcreateObject, class, ..., silent = silent) 

is the line that hangs (class = "org/findata/blpwrapper/Connection", ... = "Java-Object(WARNING)", silent = FALSE)

I thought I could backtrack to rJava 0.8-8, but that build is not available for R2.13 (and rJava is missing entirely for R2.12) on the CRAN. 

Any suggestions?

Do I need a newer version of Java?

Can anyone point me to rJava 0.8-8 for R2.13 that I could try out instead?


sessionInfo()
R version 2.13.1 Patched (2011-07-22 r56481)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                            LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RBloomberg_0.4-150           rJava_0.9-2      plotrix_3.2-2       PerformanceAnalytics_1.0.3.2   xts_0.8-0           zoo_1.7-2                   

loaded via a namespace (and not attached):
[1] grid_2.13.1     lattice_0.19-31

Thanks,

Murali
#
Hi Murali,

I don't see anything obvious that would cause this to stop working for
you on upgrade. One possibility could be that your Bloomberg API is
installed in a non-standard directory, but that's not definitely the
issue.

It might be useful to look at your Java logs. First, try increasing
the logging level like this:
conn <- blpConnect(blpapi.jar.file = 'C:/Program
Files/blp/API/blpapi3.jar', log.level = "info")

The log will be in your Java home dir (possibly the same as your
Windows home dir) named something like org.findata.blpwrapper.*.log.
We're looking for an entry like "Session Started" or "Service Started"
or something along those lines.

Thanks,
John
On Tue, Sep 6, 2011 at 7:35 AM, <Murali.Menon at avivainvestors.com> wrote:
#
Hi John,

Thank you for the response. I tried as you suggest. There are two logs created:

org.findata.blpwrapper.0.log: 

07-Sep-2011 11:24:54 org.findata.blpwrapper.Connection processSessionStatusEvent
INFO: Session Started

blpjavaapi0.log.0:

2011/09/07 11:24:53.981 [INFO] **********************************************************
2011/09/07 11:24:54.340 com.bloomberglp.blpapi.impl.an  a [INFO] Session established with: /127.0.0.1:8194

I replaced the log.level = "info" with = "finest", and it makes no difference - only these lines appear in either case.

When I look at the successful connections with R2.11.1 and earlier rJava, I get no events in the org.findata* log, but exactly the same events in the blpjavaapi0.log.0 file.

The blpConnect() call hangs and can't be escaped from without closing the R session.

Baffled!

Murali

-----Original Message-----
From: John Laing [mailto:john.laing at gmail.com] 
Sent: 06 September 2011 23:40
To: Menon Murali
Cc: r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] blpConnect hangs with RBloomberg 0.4-150 on R2.13.1

Hi Murali,

I don't see anything obvious that would cause this to stop working for
you on upgrade. One possibility could be that your Bloomberg API is
installed in a non-standard directory, but that's not definitely the
issue.

It might be useful to look at your Java logs. First, try increasing
the logging level like this:
conn <- blpConnect(blpapi.jar.file = 'C:/Program
Files/blp/API/blpapi3.jar', log.level = "info")

The log will be in your Java home dir (possibly the same as your
Windows home dir) named something like org.findata.blpwrapper.*.log.
We're looking for an entry like "Session Started" or "Service Started"
or something along those lines.

Thanks,
John
On Tue, Sep 6, 2011 at 7:35 AM, <Murali.Menon at avivainvestors.com> wrote: