So I was playing around with voldemort and tried to embed it using the
code on the site as a basis, and when I do:
val config =
VoldemortConfig.loadFromVoldemortHome(where.getAbsolutePath)
val server = new VoldemortServer(config)
server.start()
The following occurs when trying to startup:
[2012-09-16 12:32:56,238 voldemort.store.metadata.MetadataStore] INFO
metadata init().
[2012-09-16 12:32:56,408 voldemort.store.metadata.MetadataStore] INFO
Updating routing strategy for all stores
[2012-09-16 12:32:56,526 voldemort.server.VoldemortServer] INFO Using
NIO Connector.
[2012-09-16 12:32:56,544 voldemort.server.VoldemortServer] INFO Using
NIO Connector for Admin Service.
[2012-09-16 12:32:56,545 voldemort.server.VoldemortService] INFO
Starting voldemort-server
java.lang.NoSuchMethodError:
com.sun.jna.LastErrorException.getErrorCode()I
at voldemort.utils.JNAUtils.tryMlockall(JNAUtils.java:58)
at voldemort.server.VoldemortServer.startInner(VoldemortServer.java:
253)
at voldemort.server.AbstractService.start(AbstractService.java:62)
I'm running on OSX with the following JRE:
ë java -version
java version "1.6.0_35"
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
On Sunday, September 16, 2012 1:50:21 PM UTC+2, Timothy Perrett wrote:
> Hey guys,
> So I was playing around with voldemort and tried to embed it using the > code on the site as a basis, and when I do:
> val config = > VoldemortConfig.loadFromVoldemortHome(where.getAbsolutePath) > val server = new VoldemortServer(config) > server.start()
> The following occurs when trying to startup:
> [2012-09-16 12:32:56,238 voldemort.store.metadata.MetadataStore] INFO > metadata init(). > [2012-09-16 12:32:56,408 voldemort.store.metadata.MetadataStore] INFO > Updating routing strategy for all stores > [2012-09-16 12:32:56,526 voldemort.server.VoldemortServer] INFO Using > NIO Connector. > [2012-09-16 12:32:56,544 voldemort.server.VoldemortServer] INFO Using > NIO Connector for Admin Service. > [2012-09-16 12:32:56,545 voldemort.server.VoldemortService] INFO > Starting voldemort-server > java.lang.NoSuchMethodError: > com.sun.jna.LastErrorException.getErrorCode()I > at voldemort.utils.JNAUtils.tryMlockall(JNAUtils.java:58) > at > voldemort.server.VoldemortServer.startInner(VoldemortServer.java: > 253) > at voldemort.server.AbstractService.start(AbstractService.java:62)
> I'm running on OSX with the following JRE:
> λ java -version > java version "1.6.0_35" > Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811) > Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
Thanks for the welcome :-) Apologies for the late reply, I didn't have my group settings to send me replies so I thought not one got back! Sorry.
Anyway, I've been using voldemort in non-embedded mode locally for development so far, and it worked out alright except one really odd issue... In my app as voldemort is not packaged into released binaries and its just a huge lib directory, I didn't know what jars i needed for just the client and what I could ditch, so I just included them all to start with. This resulted in a very odd occurrence where when trying to exit the app would stall and had a blocked thread. I fired up YourKit to take a closer look and could see that there was a really strange thing occurring where a thread was not exiting... anyway, long story short, this *only*occurs when jna.jar was on the classpath. This is my classpath *without* the jna.jar:
However, i'd still like to embed it, but im not sure what dependencies I need for that? How far away is maven'izing the project? Manual dependency management is a frustration :-(
I use sbt and simply put the voldemort jar, libs+contrib in the sbt project
lib directory (so non-managed) for the client usage.
Then sbt assembly ... does the trick. Given that V doesn't update that
frequently it's a pretty managable way. Sbt can still manage other
dependencies. Note that I did this for both Lift and mixed "plain"
scala/jave sbt projects.
On Wednesday, September 19, 2012, Timothy Perrett wrote:
> Hey!
> Thanks for the welcome :-) Apologies for the late reply, I didn't have my
> group settings to send me replies so I thought not one got back! Sorry.
> Anyway, I've been using voldemort in non-embedded mode locally for
> development so far, and it worked out alright except one really odd
> issue... In my app as voldemort is not packaged into released binaries and
> its just a huge lib directory, I didn't know what jars i needed for just
> the client and what I could ditch, so I just included them all to start
> with. This resulted in a very odd occurrence where when trying to exit the
> app would stall and had a blocked thread. I fired up YourKit to take a
> closer look and could see that there was a really strange thing occurring
> where a thread was not exiting... anyway, long story short, this *only*occurs when jna.jar was on the classpath. This is my classpath *without*
> the jna.jar:
> However, i'd still like to embed it, but im not sure what dependencies I
> need for that? How far away is maven'izing the project? Manual dependency
> management is a frustration :-(
> Thanks, Tim
> On Sunday, 16 September 2012 17:10:49 UTC+1, ctasada wrote:
>> Hi Timothy,
>> Welcome to the Voldemort community!
>> I imagine you're trying Voldermot 0.96. Do you have the jna.jar library
>> in your classpath?
>> Regards,
>> On Sunday, September 16, 2012 1:50:21 PM UTC+2, Timothy Perrett wrote:
>>> Hey guys,
>>> So I was playing around with voldemort and tried to embed it using the
>>> code on the site as a basis, and when I do:
>>> val config =
>>> VoldemortConfig.**loadFromVoldemortHome(where.**getAbsolutePath)
>>> val server = new VoldemortServer(config)
>>> server.start()
>>> The following occurs when trying to startup:
>>> [2012-09-16 12:32:56,238 voldemort.store.metadata.**MetadataStore] INFO
>>> metadata init().
>>> [2012-09-16 12:32:56,408 voldemort.store.metadata.**MetadataStore] INFO
>>> Updating routing strategy for all stores
>>> [2012-09-16 12:32:56,526 voldemort.server.**VoldemortServer] INFO Using
>>> NIO Connector.
>>> [2012-09-16 12:32:56,544 voldemort.server.**VoldemortServer] INFO Using
>>> NIO Connector for Admin Service.
>>> [2012-09-16 12:32:56,545 voldemort.server.**VoldemortService] INFO
>>> Starting voldemort-server
>>> java.lang.NoSuchMethodError:
>>> com.sun.jna.**LastErrorException.**getErrorCode()I
>>> at voldemort.utils.JNAUtils.**tryMlockall(JNAUtils.java:58)
>>> at voldemort.server.**VoldemortServer.startInner(**VoldemortServer.java:
>>> 253)
>>> at voldemort.server.**AbstractService.start(**AbstractService.java:62)
>>> I'm running on OSX with the following JRE:
>>> λ java -version
>>> java version "1.6.0_35"
>>> Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
>>> Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)