kstyrc / embedded-redis Goto Github PK
View Code? Open in Web Editor NEWRedis embedded server for Java integration testing
Redis embedded server for Java integration testing
The osArch returns "x86" on 64 bits Windows 7 when running on 32bits JVM.
Beware when detecting 32 and 64 bit OS's in Java
Using JDK 8 definitely has its niceties, but building with JDK 8 sets unnecessary limitations on who can use embedded Redis.
I'd really like to see JDK 6+ supported. If you agree, I'd be glad to put a PR together.
NOTE: Many claim that JDK 6 is EOL, but that isn't really true.
currently in redis.embedded.util.JarUtil#extractExecutableFromJar()
import com.google.common.io.Files;
//skip
public class JarUtil {
public static File extractExecutableFromJar(String executable) throws IOException {
File tmpDir = Files.createTempDir();
Then in redis.embedded.RedisServer
public RedisServer(Integer port) throws IOException {
super(port);
File executable = JarUtil.extractExecutableFromJar(RedisRunScriptEnum.getRedisRunScript());
then in redis.embedded.AbstractRedisInstance
public synchronized void start() throws EmbeddedRedisException {
if (active) {
throw new EmbeddedRedisException("This redis server instance is already running...");
}
try {
redisProcess = createRedisProcessBuilder().start();
and
private ProcessBuilder createRedisProcessBuilder() {
File executable = new File(args.get(0));
ProcessBuilder pb = new ProcessBuilder(args);
pb.directory(executable.getParentFile());
return pb;
}
So, as you can see, there is no way to read "executable" path outside of AbstractRedisInstance.
Is it possible to expose "executable" via getter at AbstractRedisInstance?
Sometimes (at least on windows) redis-server-64.exe is still running. I'm going to at least print the path of the executable to log, to be able to see later whether this subdirectory inside "java.io.tmpdir" was actually removed or not on exit.
Hi,
I think this would be better for people who are still on 32-bit (like my company's old server.)
Best regards,
Trong Dao.
builder creates config file and try to set up it to redis-server, but it is ignored.
RedisServer works beautifully if I specify the redis-server that I have installed locally. However, it does not start when relying on the embedded redis-server.app. If I copy the redis-server.app and try to run it directly, I get an error that the app is for the classic platform which is no longer supported by my version of the OS. Assuming this is the actual problem, is there any way you can bundle a newer version of the redis-server that will run on a modern Mac?
Thanks!
As it was mentioned in other issues here, embedded-redis leaves orphaned child processes when parent is aborted without RedisServer#stop()
. Someone reported such behavior on CI servers, but for me this is happening when I stop debugging from IDE (IntelliJ) in the middle of a test case.
Currently auto-termination of child processes is unsolved problem in Java (stackoverflow). Hopefully that will be fixed once Java 9 is live (JEP-102). Until then I suggest a couple of improvements:
def isLocalPortAvailable(port: Int): Boolean = {
var portAvailable = true
var socket: ServerSocket = null
try {
socket = new ServerSocket(port)
} catch {
case e: BindException => portAvailable = false
} finally {
if (socket != null) {
socket.close()
}
}
portAvailable
}
AbstractRedisInstance
, line 61. Just inherit something custom from runtime. It will be easier for end users to add custom handling logicRuntime.getRuntime().addShutdownHook
logic as suggested in mentioned above stackoverflow, which will cover some cases of process termination, like SIGINTWhen running the packaged windows binary that comes with the latest release, the following message is displayed:
The Windows version of Redis allocates a memory mapped heap for sharing with
the forked process used for persistence operations. In order to share this
memory, Windows allocates from the system paging file a portion equal to the
size of the Redis heap. At this time there is insufficient contiguous free
space available in the system paging file for this operation (Windows error
0x5AF). To work around this you may either increase the size of the system
paging file, or decrease the size of the Redis heap with the --maxheap flag.
Sometimes a reboot will defragment the system paging file sufficiently for
this operation to complete successfully.
Please see the documentation included with the binary distributions for more
details on the --maxheap flag.
Redis can not continue. Exiting.
This can be bypassed by adding the --maxheap
option as suggested.
The config should be extended to be able to specify this argument when starting the server.
will you be so kind to make it available to set the maxheap arg ?
Now logs of embedded server goes to nowhere. It is very inconvenient, when some issues come up you can't check redis logs to figure out what is the cause.
Running the server with command line argument that specifies path to log is not an option because in this case it doesn't send log to system output, but RedisServer expect logs there to check if it has been activated.
Start with advice here #12
Hey Kstyrc,
We are currently testing out you embedded-redis in our tests, and it seems to work great. We would probably like to fork this before starting to use it ourselves however.
I can't find a license in this repo, so is it Ok for you if we fork this? Also, there seems to be a 0.6 version on MavenCental which differs from this version. Do you have the official repo in some other place than Github perhaps?
When starting redis embedded as part of another applicaiton (spring boot in this case) i am getting each time a very very annoying alert message ( see screenshot for more details ).
And this is happening each time.. I do use solr embedded and elastic search embedded and tomcat and hazelcast but only redis shows this bad confirmation, none of the other asks me do I want to allow incoming connection.. this just looks very bad and basically makes redis unusable since it doesn't look very professional.
I was trying to init the embedded redis this way on mac. I am using the unstable version so I am pointing it into the dir which I installed it at:
/Users/idan/servers/redis-unstable/
Now in my test class:
@before
public void init() {
redisServer = new RedisServer(new File("/Users/idan/servers/redis-unstable/"), 6379);
redisServer.start();
}
I am getting this exception:
edis.embedded.exceptions.EmbeddedRedisException: Failed to start Redis instance
at redis.embedded.AbstractRedisInstance.start(AbstractRedisInstance.java:42)
at redis.embedded.RedisServer.start(RedisServer.java:9)
at com.zone.world_map_service_web.LocationServiceTest.init(LocationServiceTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.io.IOException: Cannot run program "/Users/idan/servers/redis-unstable" (in directory "/Users/idan/servers"): error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at redis.embedded.AbstractRedisInstance.start(AbstractRedisInstance.java:37)
... 29 more
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 30 more
I gave all permissions needed by chmod 777 recursive to the dir:
Idans-MBP:redis-unstable idan$ ls -la
total 240
drwxr-xr-x@ 21 idan staff 714 Aug 29 20:31 .
drwxr-xr-x 8 idan staff 272 Sep 11 18:27 ..
-rwxr-xr-x@ 1 idan staff 8196 Sep 12 10:31 .DS_Store
-rwxr-xr-x@ 1 idan staff 363 Aug 21 16:29 .gitignore
-rwxr-xr-x@ 1 idan staff 634 Aug 21 16:29 00-RELEASENOTES
-rwxr-xr-x@ 1 idan staff 53 Aug 21 16:29 BUGS
-rwxr-xr-x@ 1 idan staff 1569 Aug 21 16:29 CONTRIBUTING
-rwxr-xr-x@ 1 idan staff 1487 Aug 21 16:29 COPYING
-rwxr-xr-x@ 1 idan staff 11 Aug 21 16:29 INSTALL
-rwxr-xr-x@ 1 idan staff 4223 Aug 21 16:29 MANIFESTO
-rwxr-xr-x@ 1 idan staff 151 Aug 21 16:29 Makefile
-rwxr-xr-x@ 1 idan staff 6834 Aug 21 16:29 README.md
drwxr-xr-x@ 13 idan staff 442 Sep 12 10:31 deps
-rwxr-xr-x@ 1 idan staff 44471 Aug 21 16:29 redis.conf
-rwxr-xr-x@ 1 idan staff 271 Aug 21 16:29 runtest
-rwxr-xr-x@ 1 idan staff 280 Aug 21 16:29 runtest-cluster
-rwxr-xr-x@ 1 idan staff 281 Aug 21 16:29 runtest-sentinel
-rwxr-xr-x@ 1 idan staff 7109 Aug 21 16:29 sentinel.conf
drwxr-xr-x@ 172 idan staff 5848 Sep 9 16:21 src
drwxr-xr-x@ 12 idan staff 408 Aug 21 16:29 tests
drwxr-xr-x@ 17 idan staff 578 Aug 21 16:29 utils
Any idea?
Thanks.
The repository https://clojars.org/redis.embedded/embedded-redis still on version 0.5
Can't start redis-server on Debian x32, while on x64 systems it's working
We use embedded-redis
for testing and our samples. In one of our projects (https://github.com/spring-projects/spring-session), we also use Redis keyspace notifications, and therefore require Redis 2.8.0+
.
Considering that Redis 2.8
was released in 2013, could you please add the binaries of a more recent Redis version? That would help use a lot!
I am aware that one can provide their own Redis binaries. But for testing and samples, I would need to provide versions for all 3 major platforms. This is a bit cumbersome right now - as it currently involves testing for those 3 platforms in my own code. I cannot even reuse some of the provided utility methods such as RedisRunScriptEnum#getRedisRunScript()
, as it is private.
In some cases, IOException handling can be burdensome, throw it wrapped into RuntimeException?
at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:198)
[info] at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
[info] at redis.clients.jedis.Protocol.process(Protocol.java:128)
[info] at redis.clients.jedis.Protocol.read(Protocol.java:192)
[info] at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:282)
[info] at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:181)
[info] at redis.clients.jedis.Jedis.watch(Jedis.java:1449)
Spark runs on Yarn in EMR, and the default new RedisServer(port) constructor fails there with:
java.lang.IllegalArgumentException: resource redis-server-2.8.19 not found.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)
at com.google.common.io.Resources.getResource(Resources.java:152)
It seems URL url = loader.getResource(resourceName); results in url being null.
It would be very useful to be able to dynamically download the appropriate redis binaries according to a specified version.
This would help with regression tests for instance - in Spring Data Redis - we often have to run tests with different versions of redis.
The latest way of unpacking redis binary fails when one uses the project via an installed jar. Here is the stacktrace:
java.io.FileNotFoundException: file:/Users/anthonyu/.m2/repository/redis/embedded/embedded-redis/1.0-SNAPSHOT/embedded-redis-1.0-SNAPSHOT.jar!/redis-server.app (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at com.google.common.io.Files$1.getInput(Files.java:99)
at com.google.common.io.Files$1.getInput(Files.java:97)
at com.google.common.io.ByteStreams.copy(ByteStreams.java:115)
at com.google.common.io.Files.copy(Files.java:229)
at com.google.common.io.Files.copy(Files.java:275)
at redis.embedded.RedisServer.extractExecutableFromJar(RedisServer.java:69)
at redis.embedded.RedisServer.(RedisServer.java:60)
at redis.clients.jedis.tests.JedisTestBase.setUp(JedisTestBase.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
As far as I figure out, Redis Cluster and "Redis master slave model (made by slaveof replication) with sentinel" are two different things. So we can not enable cluster mode on second one. Two make a real Redis Cluster (which compatible with JedisCluster), we need "create" N nodes and "start"(configure) it.
Suggestion steps:
For each:
../../src/redis-server --port $PORT --cluster-enabled yes --cluster-config-file nodes-${PORT}.conf --cluster-node-timeout $TIMEOUT --appendonly yes --appendfilename appendonly-${PORT}.aof --dbfilename dump-${PORT}.rdb --logfile ${PORT}.log --daemonize yes
Using Jedis cluster functions similar to redis-trib.rb
"Watch" functionality
For each:
../../src/redis-cli -p $PORT cluster nodes | head -30
Hi,
buildMaster()
and buildSlaves()
run serverBuilder.reset()
which absolutely clean any config setting form provided RedisServerBuilder and make it useless.
Hello,
I'm using your project and I think it's awesome, but sometimes (completely unpredictable) I get the following exception:
Stacktrace:] with root cause
redis.clients.jedis.exceptions.JedisDataException: ERR wrong number of arguments for 'hmset' command
at redis.clients.jedis.Protocol.processError(Protocol.java:113)
at redis.clients.jedis.Protocol.process(Protocol.java:138)
at redis.clients.jedis.Protocol.read(Protocol.java:192)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:282)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:181)
at redis.clients.jedis.BinaryJedis.hmset(BinaryJedis.java:722)
at org.springframework.data.redis.connection.jedis.JedisConnection.hMSet(JedisConnection.java:2685)
at org.springframework.data.redis.core.DefaultHashOperations$7.doInRedis(DefaultHashOperations.java:134)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:191)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:153)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:86)
at org.springframework.data.redis.core.DefaultHashOperations.putAll(DefaultHashOperations.java:131)
at org.springframework.data.redis.core.DefaultBoundHashOperations.putAll(DefaultBoundHashOperations.java:85)
at org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.saveDelta(RedisOperationsSessionRepository.java:409)
at org.springframework.session.data.redis.RedisOperationsSessionRepository$RedisSession.access$000(RedisOperationsSessionRepository.java:331)
at org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:211)
at org.springframework.session.data.redis.RedisOperationsSessionRepository.save(RedisOperationsSessionRepository.java:141)
at com.nemesis.platform.core.service.core.impl.SessionServiceImpl.setAttribute(SessionServiceImpl.java:78)
at com.nemesis.platform.facade.url.resolver.impl.AbstractUrlResolver.resolve(AbstractUrlResolver.java:89)
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:497)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:297)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy129.resolve(Unknown Source)
at com.nemesis.platform.module.commerce.facade.category.populator.CategoryUrlPopulator.populate(CategoryUrlPopulator.java:37)
at com.nemesis.platform.module.commerce.facade.category.converter.CategoryUrlConverter.populate(CategoryUrlConverter.java:51)
at com.nemesis.platform.module.commerce.facade.category.converter.CategoryUrlConverter.populate(CategoryUrlConverter.java:26)
at com.nemesis.platform.facade.converters.AbstractPopulatingConverter.convert(AbstractPopulatingConverter.java:60)
at com.nemesis.platform.module.commerce.facade.category.impl.CategoryFacadeImpl.getCategoryForOptions(CategoryFacadeImpl.java:85)
at com.nemesis.platform.module.commerce.facade.category.impl.CategoryFacadeImpl.getCategoryForCodeAndOptions(CategoryFacadeImpl.java:79)
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:497)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:297)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy150.getCategoryForCodeAndOptions(Unknown Source)
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:497)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:297)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201)
at com.sun.proxy.$Proxy150.getCategoryForCodeAndOptions(Unknown Source)
at com.nemesis.platform.module.widget.categorylister.facade.converter.CategoryListerWidgetConverter.populate(CategoryListerWidgetConverter.java:61)
at com.nemesis.platform.module.widget.categorylister.facade.converter.CategoryListerWidgetConverter.populate(CategoryListerWidgetConverter.java:34)
at com.nemesis.platform.facade.converters.AbstractPopulatingConverter.convert(AbstractPopulatingConverter.java:60)
at com.nemesis.platform.module.widget.common.facade.impl.CMSWidgetFacadeImpl.getSimpleCMSWidget(CMSWidgetFacadeImpl.java:91)
at com.nemesis.platform.module.widget.common.facade.impl.CMSWidgetFacadeImpl.getWidgets(CMSWidgetFacadeImpl.java:110)
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:497)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:297)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:320)
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:353)
at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:302)
at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy365.getWidgets(Unknown Source)
at com.nemesis.platform.module.cms.storefront.tags.CMSContentSlotTag.prepare(CMSContentSlotTag.java:113)
at com.nemesis.platform.module.cms.storefront.tags.CMSContentSlotTag.doStartTag(CMSContentSlotTag.java:153)
at org.apache.jsp.WEB_002dINF.views.normal.pages.layout.solar.homepagetemplate_jsp._jspx_meth_cms_005fslot_005f2(homepagetemplate_jsp.java:291)
at org.apache.jsp.WEB_002dINF.views.normal.pages.layout.solar.homepagetemplate_jsp.access$2(homepagetemplate_jsp.java:279)
at org.apache.jsp.WEB_002dINF.views.normal.pages.layout.solar.homepagetemplate_jsp$Helper.invoke0(homepagetemplate_jsp.java:417)
at org.apache.jsp.WEB_002dINF.views.normal.pages.layout.solar.homepagetemplate_jsp$Helper.invoke(homepagetemplate_jsp.java:443)
at org.apache.jsp.tag.webnormal.template.page_tag$Helper.invoke2(page_tag.java:549)
at org.apache.jsp.tag.webnormal.template.page_tag$Helper.invoke(page_tag.java:580)
at org.apache.jsp.tag.webnormal.template.master_tag._jspx_meth_cms_005fbody_005f0(master_tag.java:371)
at org.apache.jsp.tag.webnormal.template.master_tag.doTag(master_tag.java:235)
at org.apache.jsp.tag.webnormal.template.page_tag._jspx_meth_template_005fmaster_005f0(page_tag.java:225)
at org.apache.jsp.tag.webnormal.template.page_tag.doTag(page_tag.java:190)
at org.apache.jsp.WEB_002dINF.views.normal.pages.layout.solar.homepagetemplate_jsp._jspx_meth_template_005fpage_005f0(homepagetemplate_jsp.java:160)
at org.apache.jsp.WEB_002dINF.views.normal.pages.layout.solar.homepagetemplate_jsp._jspService(homepagetemplate_jsp.java:128)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:157)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107)
at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:59)
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.unic.demostore.storefront.filter.HiddenMethodWrapperFilter.doFilter(HiddenMethodWrapperFilter.java:50)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:69)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:157)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:68)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:152)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:184)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:721)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1244)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:860)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:305)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.nemesis.platform.core.filter.CorsFilter.doFilterInternal(CorsFilter.java:41)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:157)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:107)
at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:111)
at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:65)
at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:112)
at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.unic.demostore.storefront.filter.RequestLoggerFilter.doFilterInternal(RequestLoggerFilter.java:80)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:149)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:152)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration$MetricsFilter.doFilterInternal(MetricFilterAutoConfiguration.java:92)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:673)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1517)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1474)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
I'm using java8, ubuntu and 0.6 of the embedded redis.
I'm getting Connection Refused when using it with Spring Session.
If I start Redis myself, it works fine, but embedded does not work.
Code:
@Configuration
public class EmbeddedRedisConfig {
@Bean
public static RedisServerBean redisServer() {
return new RedisServerBean();
}
static class RedisServerBean implements InitializingBean, DisposableBean, BeanDefinitionRegistryPostProcessor {
private RedisServer redisServer;
public void afterPropertiesSet() throws Exception {
redisServer = RedisServer.builder()
.port(Protocol.DEFAULT_PORT)
.setting("notify-keyspace-events Elg")
.build();
redisServer.start();
}
public void destroy() throws Exception {
if(redisServer != null) {
redisServer.stop();
}
}
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {}
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {}
}
For some reason, I have to specify the .setting("notify-keyspace-events Elg"), else I get a:
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR Unsupported CONFIG parameter: notify-keyspace-events
But that's not the problem, when i add that parameter, the next problem is that it wont connect.
I just get this: Caused by: java.net.ConnectException: Connection refused: connect
It's like it doesnt start when I add the setting("notify-keyspace-events Elg"), since usually I get the "Firewall warning" asking me if I want redis to gain access to the network. But that does not come when I specify the setting("notify-keyspace-events Elg").
Hi,
I am trying to port presto on ppc64le platform on Ubuntu 15.04, where getting test case failure on presto-redis module.
facing following errors:
[ERROR] Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectExcep tion: Connection refused
[ERROR] at redis.clients.jedis.Connection.connect(Connection.java:148)
[ERROR] at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)
[ERROR] at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1572)
[ERROR] at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:69)
[ERROR] at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
[ERROR] at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:42 9)
[ERROR] at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:36 0)
[ERROR] at redis.clients.util.Pool.getResource(Pool.java:48)
[ERROR] ... 44 more
[ERROR] Caused by: java.net.ConnectException: Connection refused
[ERROR] at java.net.PlainSocketImpl.socketConnect(Native Method)
[ERROR] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
[ERROR] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
[ERROR] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
[ERROR] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[ERROR] at java.net.Socket.connect(Socket.java:589)
[ERROR] at redis.clients.jedis.Connection.connect(Connection.java:142)
After going through the source code, I identified that redis-server is being installed for the test execution from the jar embedded-redis-0.6.jar.
Since I am using Ubuntu 15.04 OS, it is trying to install redis-server from the location redis/2.8.9/linux/redis-server which is present inside 'embedded-redis-0.6.jar'.
I think this executable is generated for x86 platform and is not compatible for ppc64le.
so, could you please add support for the ppc64le architecture by adding binaries for redis-server of ppc64le platform.
Regards,
Naresh.
Instead of default port or give overloaded constructor. It would be really useful in tests, I am currently assigning a random port so I don't get conflicts on my jenkins box...
Hi
I can run this locally on my mac but once i check it in and run it on Jenkins, I see the following error message.
/tmp/1430170830037-0/redis-server-2.8.19: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/1430170830037-0/redis-server-2.8.19)
We are running with Spring 4.1.5 and Java 8
What are the OS dependencies?
Caused by: java.lang.RuntimeException: Can't start redis server. Check logs for details.
at redis.embedded.AbstractRedisInstance.awaitRedisServerReady(AbstractRedisInstance.java:61)
at redis.embedded.AbstractRedisInstance.start(AbstractRedisInstance.java:39)
at redis.embedded.RedisServer.start(RedisServer.java:9)
at com.nemesis.platform.config.PlatformCoreSessionConfig$RedisServerBean.afterPropertiesSet(PlatformCoreSessionConfig.java:82)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:116)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
In application code we set up cluster using JedisCluster and providing ip and port of one of the masters.
But in unit test when we set up RedisCluster as cluster = RedisCluster.builder().sentinelCount(0)
.serverPorts(group1.asJava).replicationGroup("master1", 1)
.build();
the tests are failing with
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'CLUSTER'
at redis.clients.jedis.Protocol.processError(Protocol.java:127)
at redis.clients.jedis.Protocol.process(Protocol.java:161)
at redis.clients.jedis.Protocol.read(Protocol.java:215)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
at redis.clients.jedis.Connection.getRawObjectMultiBulkReply(Connection.java:285)
at redis.clients.jedis.Connection.getObjectMultiBulkReply(Connection.java:291)
at redis.clients.jedis.Jedis.clusterSlots(Jedis.java:3376)
at redis.clients.jedis.JedisClusterInfoCache.discoverClusterNodesAndSlots(JedisClusterInfoCache.java:54)
at redis.clients.jedis.JedisClusterConnectionHandler.initializeSlotsCache(JedisClusterConnectionHandler.java:39)
at redis.clients.jedis.JedisClusterConnectionHandler.(JedisClusterConnectionHandler.java:17)
at redis.clients.jedis.JedisSlotBasedConnectionHandler.(JedisSlotBasedConnectionHandler.java:20)
at redis.clients.jedis.BinaryJedisCluster.(BinaryJedisCluster.java:48)
at redis.clients.jedis.JedisCluster.(JedisCluster.java:53)
So cluster command is not supported in embedded-redis ? Please let me know how to go abt testing JedisCluster with embedded redis.
It does not seem possible to start and stop the embedded redis database within separate, isolated unit tests that implement redislabs' Spark Redis.
The second unit test below fails with: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream
import com.holdenkarau.spark.testing.SharedSparkContext
import com.redislabs.provider.redis.{RedisConfig, RedisEndpoint}
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.{BeforeAndAfterEach, FlatSpec, Matchers}
import redis.embedded.RedisServer
@RunWith(classOf[JUnitRunner])
class RedisSpec extends FlatSpec with SharedSparkContext with BeforeAndAfterEach with Matchers {
"first test" should "connect and close redis" in {
val redisEmbedded = new RedisServer(6379)
redisEmbedded.start()
val redisConfig = new RedisConfig(new RedisEndpoint("localhost", 6379))
redisEmbedded.stop()
}
"second test" should "also connect and close redis" in {
val redisEmbedded = new RedisServer(6379)
redisEmbedded.start()
// fails here:
val redisConfig = new RedisConfig(new RedisEndpoint("localhost", 6379))
redisEmbedded.stop()
}
}
This issue is also captured here for similar contexts:
#31
http://stackoverflow.com/questions/28737107/redis-clients-jedis-exceptions-jedisconnectionexception-unexpected-end-of-strea
I don't seem to have a locally-installed redis so it should be using the Linux 64-bit one inside the jar.
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 3
>>> 'maxheap 128M'
Bad directive or wrong number of arguments
I have Jenkins installed on Windows Server 2008.
When I run my unit tests on local machine, I have success. But, when I run on Jenkins I have this error:
java.lang.RuntimeException: Can't start redis server. Check logs for details.
at redis.embedded.AbstractRedisInstance.awaitRedisServerReady(AbstractRedisInstance.java:61)
at redis.embedded.AbstractRedisInstance.start(AbstractRedisInstance.java:39)
at redis.embedded.RedisServer.start(RedisServer.java:9)
at teste.Main.main(Main.java:13)
The settings of RedisServer are the same.
What is wrong?
I try to show a complete log error, but I dont get.
The abstract Redis instance contains a single thread pool:
private final ExecutorService executor = Executors.newSingleThreadExecutor();
This creates a non daemon thread and there is no call to executor.shutdown() in the stop method.
As such this causes an appserver with an embedded redis server to hang.
I am trying to use this embedded-redis as a temporary storage for a small device, if I there is no internet connectivity. When the connection is back, the data is uploaded to server. But with this, if the device is rebooted, the data will be lost. Is it possible to save the data to the disk and delete only on demand ?
The builder portion of the RedisServer class seems to have been introduced after you released v0.2 to the clojars repo. I had to build from source to 0.3 snapshot to get those goodies.
Can you release 0.3?
The 0.6 version can't run on win32, how should i do?
the error message
The image file D:\Redis\embedded-redis-master\redis-server-2.8.19.exe is valid, but is for a machine type other than the current machine.
Hi,
would it be possible to release the artifacts to maven central? My build has tons of dependencies and I don't really like adding a new repository.
Today, I'm get stucks when starting application (Spring Boot) when trying to configure logfile
option (I know this project not intent to be run in production system. But I think that it realiable enough to act as a cache store).
When log redirected to file, application will wait forever. So please document that to make easy of use.
Thanks!
Need to run presto-redis on ppc64le server. The tests currently fail connecting to the embedded redis-server.
As mentioned in git issue (prestodb/presto#5548), need to add binary to the embedded-redis for Linux ppc64le.
Any pointer would be helpful.
Hi,
I was trying to connect to the embedded redis 0.1 from a unit test, but I can't connect using spring-data.
Should I see a running process on 6379 port when I start a Redis instance ? Or is it embedded in something else ?
I get ConnectionRefused exception on host:localhost and port:6379
Thank you
We should include in src/test/resources all (most of?) redis versions and create unit tests for each redis version:
http://redis.io/download
TO CONSIDER:
Which version should we package inside the published JAR in maven?
Hi!
I need an embedded redis in one on my projects. I was just wondering if the support will continue for the current repository. If not, it would be good to find new maintainers.
I saw an active fork here https://github.com/fmonniot/embedded-redis
But its a no go for me since it does not provide embedded redis binaries nor spring support.
Thanks!
Any plans to add support for Redis 3.2 and the geolocations support in it ?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.