-
-
Notifications
You must be signed in to change notification settings - Fork 202
Description
Hi,
- today i tried to extend the application with hazlecast Caching System.
in app.java i extended:
use(new Hcast());
session(HcastSessionStore.class);
in the conf Directory i created hcast.conf
logging
hazelcast.logging.type = slf4j
session store, key prefix and timeout in seconds
hazelcast.session.name = sessions
hazelcast.session.timeout = ${session.timeout}
But when I start the application i get the following error
[2017-01-15 20:42:50,265]-[HotSwap] ERROR com.mycompany.App - An error occurred while starting the application:
com.google.inject.CreationException: Unable to create injector, see the following errors:
- null returned by binding at org.jooby.hazelcast.Hcast.configure(Hcast.java:116)
but the 1st parameter of org.jooby.hazelcast.HcastSessionStore.(HcastSessionStore.java:102) is not @nullable
while locating com.hazelcast.core.HazelcastInstance
for the 1st parameter of org.jooby.hazelcast.HcastSessionStore.(HcastSessionStore.java:102)
while locating org.jooby.hazelcast.HcastSessionStore
at org.jooby.Jooby.lambda$bootstrap$46(Jooby.java:2706)
while locating org.jooby.Session$Store
for the 3rd parameter of org.jooby.internal.ServerSessionManager.(ServerSessionManager.java:70)
at org.jooby.internal.ServerSessionManager.class(ServerSessionManager.java:54)
while locating org.jooby.internal.ServerSessionManager
at org.jooby.Jooby.lambda$bootstrap$46(Jooby.java:2704)
while locating org.jooby.internal.SessionManager - null returned by binding at org.jooby.hazelcast.Hcast.configure(Hcast.java:116)
but the 1st parameter of org.jooby.hazelcast.HcastSessionStore.(HcastSessionStore.java:102) is not @nullable
while locating com.hazelcast.core.HazelcastInstance
for the 1st parameter of org.jooby.hazelcast.HcastSessionStore.(HcastSessionStore.java:102)
while locating org.jooby.hazelcast.HcastSessionStore
at org.jooby.Jooby.lambda$bootstrap$46(Jooby.java:2706)
while locating org.jooby.Session$Store
2 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:99)
at com.google.inject.Guice.createInjector(Guice.java:84)
at org.jooby.Jooby.lambda$new$0(Jooby.java:704)
at org.jooby.Jooby.bootstrap(Jooby.java:2731)
at org.jooby.Jooby.start(Jooby.java:1958)
at org.jooby.Jooby.start(Jooby.java:1940)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jooby.run.Main.lambda$startApp$1(Main.java:237)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
The Error relies on the "session" Statement but i have no clue what i made wrong.
2.) even when i remove the session command i noticed that every time i Change a bit of the Code a complete new instance of the hazlecast Server gets spinned and the old ones are still alive:
mvn jooby:run
[2017-01-15 21:07:18,980]-[HotSwap] INFO com.hazelcast.system - [192.168.77.9]:5701 [dev] [3.6.1] Hazelcast 3.6.1 (20160228 - d0d2a77) starting at Address[192.168.77.9]:5701
[2017-01-15 21:07:18,980]-[HotSwap] INFO com.hazelcast.system - [192.168.77.9]:5701 [dev] [3.6.1] Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
[2017-01-15 21:07:18,980]-[HotSwap] INFO com.hazelcast.system - [192.168.77.9]:5701 [dev] [3.6.1] Configured Hazelcast Serialization version : 1
[2017-01-15 21:07:18,991]-[HotSwap] INFO com.hazelcast.instance.Node - [192.168.77.9]:5701 [dev] [3.6.1] Creating MulticastJoiner
[2017-01-15 21:07:18,996]-[HotSwap] INFO com.hazelcast.core.LifecycleService - [192.168.77.9]:5701 [dev] [3.6.1] Address[192.168.77.9]:5701 is STARTING
[2017-01-15 21:07:19,072]-[HotSwap] INFO com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThreadingModel - [192.168.77.9]:5701 [dev] [3.6.1] TcpIpConnectionManager configured with Non Blocking IO-threading model: 3 input threads and 3 output threads
[2017-01-15 21:07:22,099]-[HotSwap] INFO com.hazelcast.cluster.impl.MulticastJoiner - [192.168.77.9]:5701 [dev] [3.6.1]
Members [1] {
Member [192.168.77.9]:5701 this
}
--> Code Change in eclipse; automatic restart ob jooby, but now two instances of hazlecast seem to run
[2017-01-15 21:11:00,467]-[hz._hzInstance_1_dev.IO.thread-Acceptor] INFO com.hazelcast.nio.tcp.SocketAcceptorThread - [192.168.77.9]:5701 [dev] [3.6.1] Accepting socket connection from /192.168.77.9:44620
[2017-01-15 21:11:00,477]-[cached2] INFO com.hazelcast.nio.tcp.TcpIpConnectionManager - [192.168.77.9]:5701 [dev] [3.6.1] Established socket connection between /192.168.77.9:5701 and /192.168.77.9:44620
[2017-01-15 21:11:00,481]-[cached2] INFO com.hazelcast.nio.tcp.TcpIpConnectionManager - [192.168.77.9]:5702 [dev] [3.6.1] Established socket connection between /192.168.77.9:44620 and /192.168.77.9:5701
[2017-01-15 21:11:06,478]-[hz._hzInstance_1_dev.generic-operation.thread-1] INFO com.hazelcast.cluster.ClusterService - [192.168.77.9]:5701 [dev] [3.6.1]
Members [2] {
Member [192.168.77.9]:5701 this
Member [192.168.77.9]:5702
}
[2017-01-15 21:11:06,480]-[hz._hzInstance_1_dev.generic-operation.thread-1] INFO com.hazelcast.cluster.ClusterService - [192.168.77.9]:5702 [dev] [3.6.1]
Members [2] {
Member [192.168.77.9]:5701
Member [192.168.77.9]:5702 this
}
nice evening
martin