Rbbg package's CONNECTION_FAILURE

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Rbbg package's CONNECTION_FAILURE

Robert A'gata
Hi,

I managed to install the Rbbg. Now I am trying to follow the manual. I
start with creating a connection to bloomberg. I got an error saying
that Rbbg cannot connect to bloomberg because CONNECTION_FAILURE.
Below is the exact message I got. I have bloomberg anywhere. I am
wondering what might have gone wrong? Thank you.

Best,

Robert

> conn <- blpConnect()
R version 2.15.1 (2012-06-22)
rJava Version 0.9-3
Rbbg Version 0.4-155
Java environment initialized successfully.
Looking for most recent blpapi3.jar file...
Adding C:\blp\API\APIv3\JavaAPI\v3.4.8.1\lib\blpapi3.jar to Java classpath
Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
  org.findata.blpwrapper.WrapperException: Session not started
because: CONNECTION_FAILURE

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

John Laing
Robert,

For Rbbg to work, you must be logged into the Bloomberg desktop on the
same computer where the R session is running. If you have the Excel
API, that's a good way to check if your Bloomberg session is
accessible.

-John

On Sat, Sep 8, 2012 at 11:44 PM, Robert A'gata <[hidden email]> wrote:

> Hi,
>
> I managed to install the Rbbg. Now I am trying to follow the manual. I
> start with creating a connection to bloomberg. I got an error saying
> that Rbbg cannot connect to bloomberg because CONNECTION_FAILURE.
> Below is the exact message I got. I have bloomberg anywhere. I am
> wondering what might have gone wrong? Thank you.
>
> Best,
>
> Robert
>
>> conn <- blpConnect()
> R version 2.15.1 (2012-06-22)
> rJava Version 0.9-3
> Rbbg Version 0.4-155
> Java environment initialized successfully.
> Looking for most recent blpapi3.jar file...
> Adding C:\blp\API\APIv3\JavaAPI\v3.4.8.1\lib\blpapi3.jar to Java classpath
> Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
>   org.findata.blpwrapper.WrapperException: Session not started
> because: CONNECTION_FAILURE
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

altaf
Hi All, Happy Holidays!
I am getting this error in blpConnect():

"> blpConnect(blpapi.jar.file="C:\\Program Files\\Bloomberg\\bloomberg\\API")
R version 2.15.2 (2012-10-26)
rJava Version 0.9-3
Rbbg Version 0.4-155
Java environment initialized successfully.
Adding C:\Program Files\Bloomberg\bloomberg\API to Java classpath
Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
  java.lang.NoClassDefFoundError: com/bloomberglp/blpapi/SessionOptions"

Any idea what is causing it?
Thanks a lot,

Altaf
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

julien cuisinier

Hi Altaf,

Some considerations from a user of the package...
Why do you specify the path for the jar file in your blpConnect call? + I think the argument takes the full path of the jar file & not the directory where it is supposed to be (which is I think what you tried to specify?)
my (successful) call looks like this:
> con.BBG <- blpConnect()R version 2.15.0 (2012-03-30) rJava Version 0.9-3 Rbbg Version 0.4-153 Java environment initialized successfully.Looking for most recent blpapi3.jar file...Adding C:\blp\API\APIv3\JavaAPI\v3.4.8.1\lib\blpapi3.jar to Java classpathBloomberg API Version 3.4.8.1

With "C:\blp\API\APIv3\JavaAPI\v3.4.8.1\lib\blpapi3.jar" the default place for the jar file hence I do not need to mention in the function call (but basically if your jar file is somewhere else for some strange reason this is the kind of file argument is needs)


HTH,Julien


> Date: Thu, 27 Dec 2012 01:40:26 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [R-SIG-Finance] Rbbg package's CONNECTION_FAILURE
>
> Hi All, Happy Holidays!
> I am getting this error in blpConnect():
>
> "> blpConnect(blpapi.jar.file="C:\\Program
> Files\\Bloomberg\\bloomberg\\API")
> R version 2.15.2 (2012-10-26)
> rJava Version 0.9-3
> Rbbg Version 0.4-155
> Java environment initialized successfully.
> Adding C:\Program Files\Bloomberg\bloomberg\API to Java classpath
> Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
>   java.lang.NoClassDefFoundError: com/bloomberglp/blpapi/SessionOptions"
>
> Any idea what is causing it?
> Thanks a lot,
>
> Altaf
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Rbbg-package-s-CONNECTION-FAILURE-tp4642600p4654022.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
     
        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

altaf
Hi Julien, thanks for the reply.  Using your simple command above I get the error:

"> con.BBG<-blpConnect()
R version 2.15.2 (2012-10-26)
rJava Version 0.9-3
Rbbg Version 0.4-155
Java environment initialized successfully.
Looking for most recent blpapi3.jar file...
Error in blpConnect.Java("warning", NULL, TRUE, NULL, TRUE, FALSE) :
  Can't find C:\blp\API\APIv3\JavaAPI please confirm you have Bloomberg Version 3 Java API installed. If it's in a different location, please report this to Rbbg package maintainer.
> "

so that is why I thought I needed to specify the location of the blpapi3.jar file but when I do (not just the path but the actual file) I get my original error:

"> blpConnect(blpapi.jar.file="C:\\Program Files\\Bloomberg\\bloomberg\\API\\blpapi3.jar")
R version 2.15.2 (2012-10-26)
rJava Version 0.9-3
Rbbg Version 0.4-155
Java environment initialized successfully.
Adding C:\Program Files\Bloomberg\bloomberg\API\blpapi3.jar to Java classpath
Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
  java.lang.NoClassDefFoundError: com/bloomberglp/blpapi/SessionOptions"
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

julien cuisinier

Hi,

My guesses at this stage (having tried to specify the location of the jar file myself & failed at it) are the following:(1) your jar file is not the same than would be automatically installed with the BBG WAPI installer(2) The jar file needs other files which are in the standard "C:\blp\API\APIv3\JavaAPI\v3.4.8.1" - but I do not think it is the case, pure personal wild guess here
The main question I think is why do you have the jar file in the folder you referenced & not in the standard one...that lead me to think that you did not install (properly?) the SDK from BBG >> it would put the needed files in the C:\bpl folder where your BBG install is
I know, I know very IT helpdesk-ish but I would recommend to re-install proprely the SDK with a freshly downloaded exe (as you seems to be on Windows) from BBG WAPI page & follow the step by step install instruction from the vignette - ensuring you are logged in your BBG which is obviously ont he same machine than your R / Rbbg

Let us know how you got on & if following the proper install procedure of the vignette it still do not works report this to the maintainer of this extremely useful package...

HTH,Julien


> Date: Thu, 27 Dec 2012 02:04:14 -0800
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [R-SIG-Finance] Rbbg package's CONNECTION_FAILURE
>
> Hi Julien, thanks for the reply.  Using your simple command above I get the
> error:
>
> "> con.BBG<-blpConnect()
> R version 2.15.2 (2012-10-26)
> rJava Version 0.9-3
> Rbbg Version 0.4-155
> Java environment initialized successfully.
> Looking for most recent blpapi3.jar file...
> Error in blpConnect.Java("warning", NULL, TRUE, NULL, TRUE, FALSE) :
>   Can't find C:\blp\API\APIv3\JavaAPI please confirm you have Bloomberg
> Version 3 Java API installed. If it's in a different location, please report
> this to Rbbg package maintainer.
> > "
>
> so that is why I thought I needed to specify the location of the blpapi3.jar
> file but when I do (not just the path but the actual file) I get my original
> error:
>
> "> blpConnect(blpapi.jar.file="C:\\Program
> Files\\Bloomberg\\bloomberg\\API\\blpapi3.jar")
> R version 2.15.2 (2012-10-26)
> rJava Version 0.9-3
> Rbbg Version 0.4-155
> Java environment initialized successfully.
> Adding C:\Program Files\Bloomberg\bloomberg\API\blpapi3.jar to Java
> classpath
> Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
>   java.lang.NoClassDefFoundError: com/bloomberglp/blpapi/SessionOptions"
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Rbbg-package-s-CONNECTION-FAILURE-tp4642600p4654026.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
     
        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

altaf
Thanks again Julien.  The BBG isntallataion is centrally maintained from a package by my company's IT support and so I don't really have any control over it and Bloomberg is so essential to my work (more, even than R) that I don't really want to reinstall any part of it.
I will alert the maintainer of this package as you suggest (John Laing?)
Thanks again and Happy Holidays!
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

Nuno Ramiro
Hi,

It looks like you might have a class path issue, i.e., Java is not able to
find your WAPI jar/Java classes.

I suggest that you double check that you have a blpapi3.jar file (or
similar) under C:\Program Files\Bloomberg\bloomberg\API, as that's the
required file.

If you do, I would then suggest that you point the blpapi.jar.file variable
to the correct jar, e.g.:

blpConnect(blpapi.jar.file="C:\\Program
Files\\Bloomberg\\bloomberg\\API\\blpapi3.jar")

Hope it helps.

Nuno


On 27 December 2012 10:35, altaf <[hidden email]> wrote:

> Thanks again Julien.  The BBG isntallataion is centrally maintained from a
> package by my company's IT support and so I don't really have any control
> over it and Bloomberg is so essential to my work (more, even than R) that I
> don't really want to reinstall any part of it.
> I will alert the maintainer of this package as you suggest (John Laing?)
> Thanks again and Happy Holidays!
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Rbbg-package-s-CONNECTION-FAILURE-tp4642600p4654031.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>



--
Nuno Ramiro

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

John Laing
A typical Bloomberg SDK installation includes 2 blpapi3.jar files. They are
not the same, and for use with Rbbg one is "right" and one is "wrong". On
my Windows box I have:
right file: C:\blp\API\APIv3\JavaAPI\v3.4.5.5\lib\blpapi3.jar
wrong file: C:\blp\API\blpapi3.jar

I don't know the details of Altaf's installation, but I imagine it looks
similar except that the root has been moved from C:\blp to C:\Program
Files\Bloomberg\bloomberg. If you can find the other jar file buried in
there you should be all set.

-John


On Thu, Dec 27, 2012 at 6:58 AM, Nuno Ramiro <[hidden email]> wrote:

> Hi,
>
> It looks like you might have a class path issue, i.e., Java is not able to
> find your WAPI jar/Java classes.
>
> I suggest that you double check that you have a blpapi3.jar file (or
> similar) under C:\Program Files\Bloomberg\bloomberg\API, as that's the
> required file.
>
> If you do, I would then suggest that you point the blpapi.jar.file variable
> to the correct jar, e.g.:
>
> blpConnect(blpapi.jar.file="C:\\Program
> Files\\Bloomberg\\bloomberg\\API\\blpapi3.jar")
>
> Hope it helps.
>
> Nuno
>
>
> On 27 December 2012 10:35, altaf <[hidden email]> wrote:
>
> > Thanks again Julien.  The BBG isntallataion is centrally maintained from
> a
> > package by my company's IT support and so I don't really have any control
> > over it and Bloomberg is so essential to my work (more, even than R)
> that I
> > don't really want to reinstall any part of it.
> > I will alert the maintainer of this package as you suggest (John Laing?)
> > Thanks again and Happy Holidays!
> >
> >
> >
> > --
> > View this message in context:
> >
> http://r.789695.n4.nabble.com/Rbbg-package-s-CONNECTION-FAILURE-tp4642600p4654031.html
> > Sent from the Rmetrics mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> > should go.
> >
>
>
>
> --
> Nuno Ramiro
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

altaf
Thanks, John.  I found the other blpapi3.jar file and made sure I specified that but then I got the following CONNECTION_FAILURE:

> con.BBG <- blpConnect(blpapi.jar.file="C:\\blp\\API\\APIv3\\JavaAPI\\v3.5.1.1\\lib\\blpapi3.jar")
R version 2.15.2 (2012-10-26)
rJava Version 0.9-3
Rbbg Version 0.4-155
Java environment initialized successfully.
Adding C:\blp\API\APIv3\JavaAPI\v3.5.1.1\lib\blpapi3.jar to Java classpath
Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
  org.findata.blpwrapper.WrapperException: Session not started because: CONNECTION_FAILURE

John Laing wrote
A typical Bloomberg SDK installation includes 2 blpapi3.jar files. They are
not the same, and for use with Rbbg one is "right" and one is "wrong". On
my Windows box I have:
right file: C:\blp\API\APIv3\JavaAPI\v3.4.5.5\lib\blpapi3.jar
wrong file: C:\blp\API\blpapi3.jar

I don't know the details of Altaf's installation, but I imagine it looks
similar except that the root has been moved from C:\blp to C:\Program
Files\Bloomberg\bloomberg. If you can find the other jar file buried in
there you should be all set.

-John


On Thu, Dec 27, 2012 at 6:58 AM, Nuno Ramiro <[hidden email]> wrote:

> Hi,
>
> It looks like you might have a class path issue, i.e., Java is not able to
> find your WAPI jar/Java classes.
>
> I suggest that you double check that you have a blpapi3.jar file (or
> similar) under C:\Program Files\Bloomberg\bloomberg\API, as that's the
> required file.
>
> If you do, I would then suggest that you point the blpapi.jar.file variable
> to the correct jar, e.g.:
>
> blpConnect(blpapi.jar.file="C:\\Program
> Files\\Bloomberg\\bloomberg\\API\\blpapi3.jar")
>
> Hope it helps.
>
> Nuno
>
>
> On 27 December 2012 10:35, altaf <[hidden email]> wrote:
>
> > Thanks again Julien.  The BBG isntallataion is centrally maintained from
> a
> > package by my company's IT support and so I don't really have any control
> > over it and Bloomberg is so essential to my work (more, even than R)
> that I
> > don't really want to reinstall any part of it.
> > I will alert the maintainer of this package as you suggest (John Laing?)
> > Thanks again and Happy Holidays!
> >
> >
> >
> > --
> > View this message in context:
> >
> http://r.789695.n4.nabble.com/Rbbg-package-s-CONNECTION-FAILURE-tp4642600p4654031.html
> > Sent from the Rmetrics mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> > should go.
> >
>
>
>
> --
> Nuno Ramiro
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
Reply | Threaded
Open this post in threaded view
|

Re: Rbbg package's CONNECTION_FAILURE

altaf
Thanks to everyone for their suggestions here.  I managed to resolve the issue by going through the following steps:
1)  Reinstall the Bloomberg Java API from WAPI <Go> on Bloomberg to make sure I had the Java API v.3 and point the Rbbg blp.connect() call to this version.
2)  Reinstall the JRE and JDK from Oracle to make sure I had the right javac.exe and add this version to the PATH.
3)  To limit memory usage run 'memory.size(4095)' and add the parameters 'jvm.params = "-Xss1024k", cache.responses = FALSE' to the blp.connect() call.
4)  Make sure bbcomm.exe was running.

Thanks again for all your help,

altaf wrote
Thanks, John.  I found the other blpapi3.jar file and made sure I specified that but then I got the following CONNECTION_FAILURE:

> con.BBG <- blpConnect(blpapi.jar.file="C:\\blp\\API\\APIv3\\JavaAPI\\v3.5.1.1\\lib\\blpapi3.jar")
R version 2.15.2 (2012-10-26)
rJava Version 0.9-3
Rbbg Version 0.4-155
Java environment initialized successfully.
Adding C:\blp\API\APIv3\JavaAPI\v3.5.1.1\lib\blpapi3.jar to Java classpath
Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
  org.findata.blpwrapper.WrapperException: Session not started because: CONNECTION_FAILURE

John Laing wrote
A typical Bloomberg SDK installation includes 2 blpapi3.jar files. They are
not the same, and for use with Rbbg one is "right" and one is "wrong". On
my Windows box I have:
right file: C:\blp\API\APIv3\JavaAPI\v3.4.5.5\lib\blpapi3.jar
wrong file: C:\blp\API\blpapi3.jar

I don't know the details of Altaf's installation, but I imagine it looks
similar except that the root has been moved from C:\blp to C:\Program
Files\Bloomberg\bloomberg. If you can find the other jar file buried in
there you should be all set.

-John


On Thu, Dec 27, 2012 at 6:58 AM, Nuno Ramiro <[hidden email]> wrote:

> Hi,
>
> It looks like you might have a class path issue, i.e., Java is not able to
> find your WAPI jar/Java classes.
>
> I suggest that you double check that you have a blpapi3.jar file (or
> similar) under C:\Program Files\Bloomberg\bloomberg\API, as that's the
> required file.
>
> If you do, I would then suggest that you point the blpapi.jar.file variable
> to the correct jar, e.g.:
>
> blpConnect(blpapi.jar.file="C:\\Program
> Files\\Bloomberg\\bloomberg\\API\\blpapi3.jar")
>
> Hope it helps.
>
> Nuno
>
>
> On 27 December 2012 10:35, altaf <[hidden email]> wrote:
>
> > Thanks again Julien.  The BBG isntallataion is centrally maintained from
> a
> > package by my company's IT support and so I don't really have any control
> > over it and Bloomberg is so essential to my work (more, even than R)
> that I
> > don't really want to reinstall any part of it.
> > I will alert the maintainer of this package as you suggest (John Laing?)
> > Thanks again and Happy Holidays!
> >
> >
> >
> > --
> > View this message in context:
> >
> http://r.789695.n4.nabble.com/Rbbg-package-s-CONNECTION-FAILURE-tp4642600p4654031.html
> > Sent from the Rmetrics mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions
> > should go.
> >
>
>
>
> --
> Nuno Ramiro
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.