[R-SIG-Finance] R in batch mode - RBloomberg

Matteo Fornasier matteo.fornasier at gmail.com
Tue Feb 8 20:45:55 CET 2011


Hi,
thanks for your reply. For the first point I check but I think I've to
check better!

For the second point here's the error:

Feb 8, 2011 8:39:31 PM org.findata.blpwrapper.Connection
processSessionStatusEvent
WARNING: SessionConnectionUp = {
    server = localhost/127.0.0.1:8194
}

Kindly,

Matteo


On Tue, Feb 8, 2011 at 6:22 PM, Ana Nelson <nelson.ana at gmail.com> wrote:
> Matteo,
>
> the %h says that RBloomberg is trying to write logs to the user's home
> directory but under PHP this might be somewhere unexpected, you might look
> for how to disable logging or write the logfile somewhere that PHP has
> permission to write to.
>
> The WrapperException error is different, I will look into this tomorrow.
> That looks like a new version of RBloomberg which might have introduced an
> error. It would be helpful if you could look in the logs for any useful
> information about the error. (check your home directory, like Documents and
> Settings/Your Name)
>
> -Ana
>
>
> On Tue, Feb 8, 2011 at 4:40 PM, Matteo Fornasier
> <matteo.fornasier at gmail.com> wrote:
>>
>> Hi,
>> thanks for the reply. I updated the version of R and install the package.
>> If I test the script via command line here's the output:
>>
>> > library(RBloomberg)
>> Loading required package: rJava
>> > con = blpConnect()
>> R version 2.12.1 (2010-12-16)
>> rJava Version 0.8-8
>> RBloomberg Version 0.4-146
>> Java environment initialized successfully.
>> Looking for most recent blpapi3.jar file...
>> Adding C:\blp\API\APIv3\JavaAPI\v3.4.1.3\lib\blpapi3.jar to Java classpath
>> Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
>> org.findata.blpwrapper.WrapperException: Session not started. See
>> logs. Please report this to blpwrapper maintainer.
>>
>>
>> If I test the script via PHP, here's the output:
>> > bl = blpConnect()
>>
>> R version 2.12.1 (2010-12-16)
>>
>> rJava Version 0.8-8
>>
>> RBloomberg Version 0.4-146
>> Java environment initialized successfully.
>> Looking for most recent blpapi3.jar file...
>> Adding C:\blp\API\APIv3\JavaAPI\v3.4.1.3\lib\blpapi3.jar to Java classpath
>> Error in .jnew("org/findata/blpwrapper/Connection", java.log.level) :
>> java.io.IOException: Couldn't get lock for
>> %h/org.findata.blpwrapper.%g.log
>> Calls: blpConnect ... eval -> eval -> blpConnect.Java -> .jnew ->
>> .External
>> Execution halted
>>
>>
>> Now I try to understand why happeneds these error. Have you or any
>> others any idea.
>> Many thanks and best regards,
>>
>> Matteo
>>
>>
>>
>> On Tue, Feb 8, 2011 at 4:31 PM, Ana Nelson <nelson.ana at gmail.com> wrote:
>> > Hi, Matteo,
>> >
>> > Can you update to the Java-based version of RBloomberg available from
>> > findata.org? You are also running a very old version of R.
>> >
>> > Can you test your script just from the command line rather than via PHP?
>> >
>> > -Ana
>> >
>> >
>> >
>> > On Tue, Feb 8, 2011 at 9:37 AM, Matteo Fornasier
>> > <matteo.fornasier at gmail.com> wrote:
>> >>
>> >> Hi all,
>> >> I've a problem with R.
>> >> I'm using R in batch mode calling it trought php:
>> >> exec("C:\Program\R\R-2.7.1\bin\R.exe CMD BATCH blablabla\.txt");
>> >>
>> >> It's function very well and I did a lot of interesting application.
>> >> In the webserver there is Bloomberg so I want download some time
>> >> series to analyse and so on.
>> >> If I launch the script in R it run and do all calculation but if I
>> >> call the script in batch mode in the output I see that the script stop
>> >> just when should start the connection with bloomberg:
>> >>
>> >> R version 2.7.1 (2008-06-23)
>> >> Copyright (C) 2008 The R Foundation for Statistical Computing
>> >> ISBN 3-900051-07-0
>> >> [...]
>> >>
>> >> [Previously saved workspace restored]
>> >>
>> >> > library(RODBC)
>> >> Warning message:
>> >> package 'RODBC' was built under R version 2.7.2
>> >> > library(RBloomberg)
>> >> Loading required package: RDCOMClient
>> >> Loading required package: zoo
>> >>
>> >> Attaching package: 'zoo'
>> >>
>> >>
>> >>        The following object(s) are masked from package:base :
>> >>
>> >>         rapply
>> >>
>> >> Loading required package: chron
>> >> Contents of bbfields have been stored in .bbfields in the current
>> >> workspace
>> >> Warning message:
>> >> package 'RBloomberg' was built under R version 2.7.2
>> >>
>> >> > ticker = "G IM Equity"
>> >> > ticker
>> >> [1] "G IM Equity"
>> >> >
>> >> >
>> >>
>> >> Any ideas?
>> >> Maybe is a permission problem but I don't know which file I've to
>> >> autorize.
>> >>
>> >> Thanks a lot,
>> >>
>> >> Matteo
>> >>
>> >> _______________________________________________
>> >> R-SIG-Finance at r-project.org 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.
>> >
>> >
>
>



More information about the R-SIG-Finance mailing list