i'm copying my exchange on this with John below.
we don't have a solution yet but John is looking into it and may add an
option to disable logging.




On Wed, Apr 30, 2014 at 5:30 PM, John Laing <john.laing@gmail.com> wrote:

> I wouldn't touch the Windows registry. I'm going to look into this
> "couldn't get the lock" error a little more. Another option is that I could
> add an option to blpConnect to turn logging off. Would that work for you?
>
>
> On Wed, Apr 30, 2014 at 5:17 PM, Aidan Corcoran <
> aidan.corcoran11@gmail.com> wrote:
>
>> thanks John.
>>
>> unfortunately no joy.
>>
>> > require(rJava)
>> > .jinit()
>> [1] 0
>> > fh1 <- .jnew("java/util/logging/FileHandler",
>> "%h/org.findata.blpwrapper.%g.log")
>> Error in .jnew("java/util/logging/FileHandler",
>> "%h/org.findata.blpwrapper.%g.log") :
>>   java.io.IOException: Couldn't get lock for
>> %h/org.findata.blpwrapper.%g.log
>> > fh2 <- .jnew("java/util/logging/FileHandler",
>> "%h/org.findata.blpwrapper.%g.log", 0L, 1L, FALSE)
>> Error in .jnew("java/util/logging/FileHandler",
>> "%h/org.findata.blpwrapper.%g.log",  :
>>   java.io.IOException: Couldn't get lock for
>> %h/org.findata.blpwrapper.%g.log
>>
>> Should I look into changing the HOME variable in the windows registry? If
>> you think that might help I'll just check with IT that it's ok and whether
>> it can be changed permanently.
>>
>>
>> On Wed, Apr 30, 2014 at 4:52 PM, John Laing <john.laing@gmail.com> wrote:
>>
>>> I don't think that changing your HOME will help. My thinking is that
>>> Java's resolution of the pattern wildcard %h is probably the same as your
>>> normal HOME, but changing that in R doesn't necessarily change it for Java.
>>> A little fuzzy on the details.
>>>
>>> Another thought -- try this:
>>>
>>> require(rJava)
>>> .jinit()
>>>
>>> fh1 <- .jnew("java/util/logging/FileHandler",
>>> "%h/org.findata.blpwrapper.%g.log")
>>> fh2 <- .jnew("java/util/logging/FileHandler",
>>> "%h/org.findata.blpwrapper.%g.log", 0L, 1L, FALSE)
>>>
>>> The first is essentially what Rbbg tries to do, which is to open a
>>> writeable log file. The second opens the same file but not writeably. Let
>>> me know which (if either) works.
>>>
>>> -John
>>>
>>>
>>> On Wed, Apr 30, 2014 at 3:49 PM, Aidan Corcoran <
>>> aidan.corcoran11@gmail.com> wrote:
>>>
>>>> Hi John,
>>>>
>>>>  it was set to a folder in D (a network drive), and I think the path
>>>> uses a variable that gets populated with my user name at some point.
>>>> however i tried the below and this didn't fix it.
>>>> i do have write access to that folder as i just created a file in it.
>>>>
>>>> > Sys.setenv(HOME="C:\\rstartfolder")
>>>> > conn <- blpConnect()
>>>> R version 3.0.3 (2014-03-06)
>>>> rJava Version 0.9-6
>>>> Rbbg Version 0.5.0
>>>> Java environment initialized successfully.
>>>> Looking for most recent blpapi3.jar file...
>>>> Adding C:\blp\API\APIv3\JavaAPI\v3.7.1.1\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
>>>> > Sys.getenv("HOME")
>>>> [1] "C:\\rstartfolder"
>>>>
>>>>
>>>>
>>>> On Wed, Apr 30, 2014 at 3:22 PM, John Laing <john.laing@gmail.com>
>>>>  wrote:
>>>>
>>>>> Hi Aidan,
>>>>>
>>>>> C:\ is probably not your home. From R try Sys.getenv("HOME"). That
>>>>> will give you a directory, and in there you should look for files named
>>>>> like org.findata.blpwrapper.*
>>>>>
>>>>> -John
>>>>>
>>>>>
>>>>> On Wed, Apr 30, 2014 at 2:09 PM, Aidan Corcoran <
>>>>> aidan.corcoran11@gmail.com> wrote:
>>>>>
>>>>>> hi John,
>>>>>>
>>>>>> thanks for your reply.
>>>>>>
>>>>>> I generally have write access to the C drive but I'm not sure exactly
>>>>>> where the log file lives. If you could tell me then I will check on access
>>>>>> and post back.
>>>>>>
>>>>>> thanks
>>>>>> Aidan.
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 30, 2014 at 1:55 PM, John Laing <john.laing@gmail.com>
>>>>>>  wrote:
>>>>>>
>>>>>>> Aidan,
>>>>>>>
>>>>>>> The connection is failing as it attempts to open the log file. Can
>>>>>>> you confirm whether you have write access to your home folder? My Windows
>>>>>>> box is virtual as well, so that's not the cause... at least, not directly.
>>>>>>>
>>>>>>> -John
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Apr 30, 2014 at 1:35 PM, Aidan Corcoran <
>>>>>>> aidan.corcoran11@gmail.com> wrote:
>>>>>>>
>>>>>>>> hi all,
>>>>>>>>
>>>>>>>> I'm getting the below error when I try
>>>>>>>> conn <- blpConnect()
>>>>>>>>
>>>>>>>> R version 3.0.3 (2014-03-06)
>>>>>>>> rJava Version 0.9-6
>>>>>>>> Rbbg Version 0.5.0
>>>>>>>> Java environment initialized successfully.
>>>>>>>> Looking for most recent blpapi3.jar file...
>>>>>>>> Adding C:\blp\API\APIv3\JavaAPI\v3.7.1.1\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*
>>>>>>>>
>>>>>>>>
>>>>>>>> Can't seem to find a similar error on the web. My desktop is  a
>>>>>>>> virtual
>>>>>>>> desktop and this is my first time trying to get rbbg to work on
>>>>>>>> this setup,
>>>>>>>> so maybe this has something to do with. It's win7-64bit with R
>>>>>>>> 3.0.3 and
>>>>>>>> latest versions of all packages I believe.  The excel bloomberg API
>>>>>>>> is
>>>>>>>> working fine. If anyone could help me understand this error better
>>>>>>>> or fix
>>>>>>>> it that would be very much appreciated!
>>>>>>>>
>>>>>>>> thanks
>>>>>>>>
>>>>>>>>         [[alternative HTML version deleted]]
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> R-SIG-Finance@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.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>


On Wed, Apr 30, 2014 at 1:55 PM, John Laing <john.laing@gmail.com> wrote:

> Aidan,
>
> The connection is failing as it attempts to open the log file. Can you
> confirm whether you have write access to your home folder? My Windows box
> is virtual as well, so that's not the cause... at least, not directly.
>
> -John
>
>
>
> On Wed, Apr 30, 2014 at 1:35 PM, Aidan Corcoran <
> aidan.corcoran11@gmail.com> wrote:
>
>> hi all,
>>
>> I'm getting the below error when I try
>> conn <- blpConnect()
>>
>> R version 3.0.3 (2014-03-06)
>> rJava Version 0.9-6
>> Rbbg Version 0.5.0
>> Java environment initialized successfully.
>> Looking for most recent blpapi3.jar file...
>> Adding C:\blp\API\APIv3\JavaAPI\v3.7.1.1\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*
>>
>>
>> Can't seem to find a similar error on the web. My desktop is  a virtual
>> desktop and this is my first time trying to get rbbg to work on this
>> setup,
>> so maybe this has something to do with. It's win7-64bit with R 3.0.3 and
>> latest versions of all packages I believe.  The excel bloomberg API is
>> working fine. If anyone could help me understand this error better or fix
>> it that would be very much appreciated!
>>
>> thanks
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance@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.
>>
>
>

	[[alternative HTML version deleted]]

