Java client via Scala - StringBinIndex.Name not accessible

Toby Corkindale toby at dryft.net
Wed Dec 16 00:02:06 EST 2015


Hi,
Reading further, it seems it's simply not possible to get Scala to work
with the static protected inner classes of the Index types in the Java
client :(

In the Java client, is there any other way to instantiate indexes? I
suspect not, but figure I could ask just in case.

Cheers
Toby

On Wed, 16 Dec 2015 at 15:34 Toby Corkindale <toby at dryft.net> wrote:

> Hi Luke,
> Thanks for the quick response.. That link does sound like it's describing
> the problem.
> I'll see if I can figure out a way to get around it :(
> The rest of the code works lovely with thin wrappers around the java
> client, and it's only now in the project that I'm trying to get the indexes
> added :(
>
> Toby
>
> On Wed, 16 Dec 2015 at 15:22 Luke Bakken <lbakken at basho.com> wrote:
>
>> Hi Toby,
>>
>> I think you're running into something similar to this:
>> http://www.scala-lang.org/old/node/1381.html
>>
>> which links to this: https://issues.scala-lang.org/browse/SI-1806
>>
>> Not being familar with Java / Scala interop I hope that the discussion
>> and further links there can help you out.
>>
>> --
>> Luke Bakken
>> Engineer
>> lbakken at basho.com
>>
>>
>> On Tue, Dec 15, 2015 at 8:11 PM, Toby Corkindale <toby at dryft.net> wrote:
>> > Hi,
>> > I'm having a lot of trouble getting a particular part of the Riak java
>> > client to work when called from Scala.
>> >
>> > There's a Java class which I'm not allowed to instantiate directly, but
>> must
>> > instead call an embedded subclass's static constructor method.
>> >
>> > ie.
>> > import com.basho.riak.client.core.query.indexes.StringBinIndex
>> > val idx = new StringBinIndex.Name("colours")
>> >
>> > However, in Scala, I get this error reported:
>> > Constructor Name in class Name cannot be accessed in class [myclass]
>> >
>> > Docs for the class:
>> >
>> http://basho.github.io/riak-java-client/2.0.1/index.html?com/basho/riak/client/core/query/indexes/StringBinIndex.html
>> >
>> > I don't suppose anyone can see what I'm doing wrong, or suggest how to
>> make
>> > this work from Scala?
>> >
>> > Cheers,
>> > Toby
>> >
>> >
>> > _______________________________________________
>> > riak-users mailing list
>> > riak-users at lists.basho.com
>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20151216/36e56f9f/attachment-0002.html>


More information about the riak-users mailing list