Indeed, the key is: java.lang.ClassNotFoundException: net.handle.server.MongoDBHandle
You can add the dependencies for your custom storage to the "lib" directory of the
Handle.net software distribution, which should allow the software to find them.
Robert
> On Nov 23, 2016, at 9:05 AM, Ruiz-Zafra, Angel <
a.ruiz-zafra@ucl.ac.uk> wrote:
>
> Testing now start the server:
>
> Error: net.handle.server.MongoDBHandle
> (see the error log for details.)
>
> Shutting down...
>
> In the error log:
>
> "2016-11-23 14:03:23.769+0100" 25 Started new run.
> "2016-11-23 14:03:23.769+0100" 25
Handle.net Server Software version 8.1.1
> Error refreshing root info: HandleException (CANNOT_CONNECT_TO_SERVER) 127.0.0.1: java.net.ConnectException: Conexión rehusada
> HandleException (CANNOT_CONNECT_TO_SERVER) 127.0.0.1: java.net.ConnectException: Conexión rehusada
> at net.handle.hdllib.HandleResolver.sendHttpOrHttpsRequest(HandleResolver.java:2989)
> at net.handle.hdllib.HandleResolver.sendHttpRequest(HandleResolver.java:2901)
> at net.handle.hdllib.HandleResolver.sendRequestToInterface(HandleResolver.java:2293)
> at net.handle.hdllib.HandleResolver.sendRequestToServerByProtocol(HandleResolver.java:1950)
> at net.handle.hdllib.HandleResolver.sendRequestToServerByProtocol(HandleResolver.java:1810)
> at net.handle.hdllib.HandleResolver.sendRequestToServerInSiteByProtocol(HandleResolver.java:1641)
> at net.handle.hdllib.HandleResolver.sendRequestToSite(HandleResolver.java:1619)
> at net.handle.hdllib.HappyEyeballsResolver.sendRequestToSiteViaProtocol(HappyEyeballsResolver.java:211)
> at net.handle.hdllib.HappyEyeballsResolver.sendRequestToSites(HappyEyeballsResolver.java:178)
> at net.handle.hdllib.HappyEyeballsResolver.sendRequestAndSetResponseOrPublicException(HappyEyeballsResolver.java:153)
> at net.handle.hdllib.HappyEyeballsResolver.run(HappyEyeballsResolver.java:93)
> at net.handle.hdllib.HandleResolver.sendRequestToService(HandleResolver.java:1193)
> at net.handle.hdllib.HandleResolver.processRequest(HandleResolver.java:719)
> at net.handle.hdllib.HandleResolver.processRequest(HandleResolver.java:736)
> at net.handle.hdllib.Configuration.resolveHandleCertified(Configuration.java:267)
> at net.handle.hdllib.Configuration.resolveVerifyUpdateAndPersistBootstrapHandles(Configuration.java:186)
> at net.handle.hdllib.Configuration.refreshRootInfoFromNet(Configuration.java:178)
> at net.handle.hdllib.Configuration.access$000(Configuration.java:29)
> at net.handle.hdllib.Configuration$2.run(Configuration.java:308)
> Caused by: java.net.ConnectException: Conexión rehusada
> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
> at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:117)
> at net.handle.hdllib.HandleResolver.sendHttpOrHttpsRequest(HandleResolver.java:2982)
> ... 18 more
> java.lang.ClassNotFoundException: net.handle.server.MongoDBHandle
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:195)
> at net.handle.server.HandleStorageFactory.getStorage(HandleStorageFactory.java:77)
> at net.handle.server.HandleStorageFactory.getStorage(HandleStorageFactory.java:36)
> at net.handle.server.HandleServer.<init>(HandleServer.java:452)
> at net.handle.server.AbstractServer.getInstance(AbstractServer.java:123)
> at net.handle.server.Main.initialize(Main.java:269)
> at net.handle.server.Main.main(Main.java:125)
> Shutting down...
>
>
> I assume the error is related with the dependencies..isn't it?
>
> Thanks.
> De: Robert R Tupelo-Schneck <
schneck@cnri.reston.va.us>
> Enviado: miércoles, 23 de noviembre de 2016 14:59:49
> Para: Ruiz-Zafra, Angel
> Cc:
handle-info@cnri.reston.va.us> Asunto: Re: [Handle-info] Guide to user other DBMS
>
> Does anything get printed in the error.log file?
>
> Robert
>
>> On Nov 23, 2016, at 6:57 AM, Ruiz-Zafra, Angel <
a.ruiz-zafra@ucl.ac.uk> wrote:
>>
>> Hi there!
>>
>> I'm trying to set up a local instance of Handle server supported by MongoDB (instead Berkeley), but trying to set up the server (hdl-server <dir>) and entering the passphrase the process just stop without any error or exception.
>>
>> The steps that I follow are:
>>
>> 1) Create a custom source code/class ("MongoDBHandle.java") which implements HandleStorage (the package structure is net.handle.server.MongoDBHandle)
>>
>> 2) Compile and create a Jar file with this class (mongodb.jar) and with the dependencies.
>>
>> 3) Copy this file, mongodb.jar, alongside with mongodb dependencies (mongodb-driver, mongo core, etc) into hsj-8.1.1/lib and svr_1/lib (I just created this folder, just in case)
>>
>> 4) Modify svr_1/config.dct and add at the end of the server_config block:
>>
>> (--others parameters here - server_type, hdl_tcp_config, etc--)
>> "storage_class" = "net.handle.server.MongoDBHandle"
>> "storage_type" = "custom"
>> "storage_config" = {
>> "database_name" = "handlesystem"
>> "collection_nas" = "nas"
>> "collection_handles" = "handles"
>> "connections_per_host" = "20"
>> "write_concern" = "1"
>> "indices" = (
>> "handle"
>> "handles.type"
>> "_lookup" )
>> }
>>
>> 5) Set up server (hsj-8.1.1/bin/hdl-server svr_1/)
>> 6) Enter the passphrase
>>
>> As I mentioned before, at this point, there are no errors, crashs of exception, just give the focus to the bash instead of "start http server", "http request listener", etc etc.
>>
>> Any suggestion? Could be something wrong related with the source code (MongoDBHandle) or with the configuration?.
>>
>> Thanks in advance!
>>
>> _______________________________________________
>> Handle-Info mailing list
>>
Handle-Info@cnri.reston.va.us>>
http://www.handle.net/mailman/listinfo/handle-info