Announcement Announcement Module
Collapse
No announcement yet.
NoClassDefFoundError: RedisConnectionUtils$RedisConnectionHolder Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoClassDefFoundError: RedisConnectionUtils$RedisConnectionHolder

    It's the first time I try to use 'spring-data-redis', I got an unexcepting exception while I wrote a test application with spring-data-redis, the log messages were listed below. Can anyone help me to figure it out? Thansk first!

    Code:
    java.lang.NoClassDefFoundError: org/springframework/data/redis/core/RedisConnectionUtils$RedisConnectionHolder
    	at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:68)
    	at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:53)
    	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:150)
    	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:133)
    	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)
    	at org.springframework.data.redis.core.DefaultListOperations.leftPush(DefaultListOperations.java:73)
    	at org.springframework.data.redis.core.DefaultBoundListOperations.leftPush(DefaultBoundListOperations.java:67)
    	at org.springframework.data.redis.support.collections.DefaultRedisList.addFirst(DefaultRedisList.java:301)
    	at org.springframework.data.redis.support.collections.DefaultRedisList.offerFirst(DefaultRedisList.java:333)
    	at com.kempsoft.test.FifoTest.enterTheFifo(FifoTest.java:44)
    	at com.kempsoft.test.FifoTest.test(FifoTest.java:59)
    	at com.kempsoft.test.FifoTest.main(FifoTest.java:101)
    java.lang.NoClassDefFoundError: org/springframework/data/redis/core/RedisConnectionUtils$RedisConnectionHolder
    	at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:68)
    	at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:53)
    	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:150)
    	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:133)
    	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)
    	at org.springframework.data.redis.core.DefaultListOperations.leftPush(DefaultListOperations.java:73)
    	at org.springframework.data.redis.core.DefaultBoundListOperations.leftPush(DefaultBoundListOperations.java:67)
    	at org.springframework.data.redis.support.collections.DefaultRedisList.addFirst(DefaultRedisList.java:301)
    	at org.springframework.data.redis.support.collections.DefaultRedisList.offerFirst(DefaultRedisList.java:333)
    	at com.kempsoft.test.FifoTest.enterTheFifo(FifoTest.java:44)
    	at com.kempsoft.test.FifoTest.test(FifoTest.java:59)
    	at com.kempsoft.test.FifoTest.main(FifoTest.java:101)
    and here is the code:

    Code:
    package test;
    
    import java.util.Collection;
    import java.util.List;
    import java.util.regex.Pattern;
    
    import javax.inject.Inject;
    import javax.inject.Named;
    
    import org.springframework.context.support.AbstractApplicationContext;
    import org.springframework.context.support.ClassPathXmlApplicationContext;
    import org.springframework.data.redis.core.StringRedisTemplate;
    import org.springframework.data.redis.support.atomic.RedisAtomicLong;
    import org.springframework.data.redis.support.collections.DefaultRedisList;
    import org.springframework.data.redis.support.collections.RedisList;
    
    
    @Named
    public class FifoTest {
    
    	private final StringRedisTemplate template;
    
    	private RedisList<String> users;
    
    	@Inject
    	public FifoTest(StringRedisTemplate template) {
    		this.template = template;
    
    		users = new DefaultRedisList<String>("users", template);
    	}
    
    	public boolean enterTheFifo(String name) {
    		return users.offerFirst(name);
    	}
    
    	public Collection<String> listTheFifo(Range range) {
    		return users.range(range.being, range.end);
    	}
    
    	public String leaveTheFifo() {
    		return users.pollLast();
    	}
    	
    	public void stressTest() {
    		while (true) {
    			try {
    				System.out.println("insert users...");
    				if (!enterTheFifo("kemp")) break;
    				if (!enterTheFifo("nancy")) break;
    				if (!enterTheFifo("joy")) break;
    				if (!enterTheFifo("jack chen")) break;
    
    				System.out.println("list all users...");
    				List<String> users = (List<String>) listTheFifo(new Range());
    				int count = users.size();
    				for (String user : users) {
    					System.out.println(user);
    				}
    
     				System.out.println("remove users...");
    				while (count-- > 0) {
    					System.out.println(leaveTheFifo());
    				}
    				try {
    					Thread.sleep(50);
    				} catch (InterruptedException e) {
    					// TODO Auto-generated catch block
    					e.printStackTrace();
    					break;
    				}
    			} catch (Throwable t) {
    				t.printStackTrace();
    			}
    		}
    
    	}
    
    	/**
    	 * @param args
    	 */
    	public static void main(String[] args) {
    		AbstractApplicationContext ctx = new ClassPathXmlApplicationContext(
    				"applicationContext-redis.xml");
    		// For the destroy method to work.
    		ctx.registerShutdownHook();
    
    		// FifoTest fifoTest = new FifoTest();
    		FifoTest fifoTest = ctx.getBean(FifoTest.class);
    
    		fifoTest.stressTest();
    
    	}
    
    }

  • #2
    I'm not sure your code matches your stack trace. Stack trace has a method called "test" that I don't see in code. I can't repro this just calling enterTheFifo("kemp") with spring-data-redis 1.0.4. What version are you using? Also, can you share your context file so I can see how you've configured StringRedisTemplate? Thanks.

    Comment


    • #3
      Sorry for my mistake!
      I'm using spring-data-redis 1.0.4, I ran the test program again, here is the log messages:

      Code:
      java.lang.NoClassDefFoundError: org/springframework/data/redis/core/RedisConnectionUtils$RedisConnectionHolder
      	at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:68)
      	at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:53)
      	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:150)
      	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:133)
      	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)
      	at org.springframework.data.redis.core.DefaultListOperations.leftPush(DefaultListOperations.java:73)
      	at org.springframework.data.redis.core.DefaultBoundListOperations.leftPush(DefaultBoundListOperations.java:67)
      	at org.springframework.data.redis.support.collections.DefaultRedisList.addFirst(DefaultRedisList.java:301)
      	at org.springframework.data.redis.support.collections.DefaultRedisList.offerFirst(DefaultRedisList.java:333)
      	at com.kempsoft.test.FifoTest.enterTheFifo(FifoTest.java:42)
      	at com.kempsoft.test.FifoTest.test(FifoTest.java:57)
      	at com.kempsoft.test.FifoTest.main(FifoTest.java:99)
      the spring configuration:

      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
      	xmlns:context="http://www.springframework.org/schema/context"
      	xmlns:redis="http://www.springframework.org/schema/redis"
      	xsi:schemaLocation="
      			http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      			http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
      			http://www.springframework.org/schema/redis http://www.springframework.org/schema/redis/spring-redis.xsd">
      
      	<bean id="redisConnectionFactory"
      		class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
      		p:host-name="${redis.host}" p:port="${redis.port}" p:password="${redis.pass}" />
      	<!-- Configurer that replaces ${...} placeholders with values from a properties 
      		file -->
      	<context:property-placeholder location="classpath:redis.properties" />
      
      	<context:annotation-config />
      
      	<context:component-scan base-package="com.kempsoft.test" />
      
      	<bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate"
      		p:connection-factory-ref="redisConnectionFactory" />
      
      </beans>
      the source code of test program:
      Code:
      package com.kempsoft.test;
      
      import java.util.Collection;
      import java.util.List;
      import java.util.regex.Pattern;
      
      import javax.inject.Inject;
      import javax.inject.Named;
      
      import org.springframework.context.support.AbstractApplicationContext;
      import org.springframework.context.support.ClassPathXmlApplicationContext;
      import org.springframework.data.redis.core.StringRedisTemplate;
      import org.springframework.data.redis.support.collections.DefaultRedisList;
      import org.springframework.data.redis.support.collections.RedisList;
      
      /**
       * @author Kemp [email protected]
       * @version 2013-6-27 PM 03:10:10
       */
      @Named
      public class FifoTest {
      
      	private final StringRedisTemplate template;
      
      	private RedisList<String> users;
      	//private final RedisAtomicLong userIdCounter;
      
      	@Inject
      	public FifoTest(StringRedisTemplate template) {
      		this.template = template;
      
      		users = new DefaultRedisList<String>("users", template);
      		//userIdCounter = new RedisAtomicLong("global:uid",
      		//		template.getConnectionFactory());
      
      	}
      
      	public boolean enterTheFifo(String name) {
      		//String uid = String.valueOf(userIdCounter.incrementAndGet());
      
      		return users.offerFirst(name);
      	}
      
      	public Collection<String> listTheFifo(Range range) {
      		return users.range(range.being, range.end);
      	}
      
      	public String leaveTheFifo() {
      		return users.pollLast();
      	}
      	
      	public void test() {
      		while (true) {
      			try {
      				System.out.println("insert users...");
      				if (!enterTheFifo("kemp")) break;
      				if (!enterTheFifo("nancy")) break;
      				if (!enterTheFifo("joy")) break;
      				if (!enterTheFifo("jack chen")) break;
      
      				System.out.println("list all users...");
      				List<String> users = (List<String>) listTheFifo(new Range());
      				int count = users.size();
      				for (String user : users) {
      					System.out.println(user);
      				}
      
      				System.out.println("remove users...");
      				while (count-- > 0) {
      					System.out.println(leaveTheFifo());
      				}
      				try {
      					Thread.sleep(50);
      				} catch (InterruptedException e) {
      					// TODO Auto-generated catch block
      					e.printStackTrace();
      					break;
      				}
      			} catch (Throwable t) {
      				t.printStackTrace();
      			}
      		}
      
      	}
      
      	/**
      	 * @param args
      	 */
      	public static void main(String[] args) {
      		AbstractApplicationContext ctx = new ClassPathXmlApplicationContext(
      				"applicationContext-redis.xml");
      		// For the destroy method to work.
      		ctx.registerShutdownHook();
      
      		// FifoTest fifoTest = new FifoTest();
      		FifoTest fifoTest = ctx.getBean(FifoTest.class);
      
      		fifoTest.test();
      
      	}
      
      }
      
      
      /*
       * Copyright 2011 the original author or authors.
       * 
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       * 
       *      http://www.apache.org/licenses/LICENSE-2.0
       * 
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      package com.kempsoft.test;
      
      /**
       * Basic object indicating a range of objects to retrieve. Default is 10 objects (starting at zero).
       * 
       * @author Costin Leau
       */
      public class Range {
      
      	private static final int SIZE = 9;
      	public int being = 0;
      	public int end = SIZE;
      
      	public Range() {
      	};
      
      	public Range(int begin, int end) {
      		this.being = begin;
      		this.end = end;
      	}
      
      	public Range(int pageNumber) {
      		this.being = 0;
      		this.end = pageNumber * SIZE;
      	}
      
      	public int getPages() {
      		return (int) Math.round(Math.ceil(end / SIZE));
      	}
      }
      redis.properties:
      Code:
      # Redis settings
      
      redis.host=localhost
      redis.port=6379
      redis.pass=
      Last edited by john.bigz; Jun 28th, 2013, 08:33 PM.

      Comment


      • #4
        Test ran OK for me. Is it possible that you have multiple versions of spring-data-redis on your classpath?

        Comment


        • #5
          Hi, jencompgeek,
          Thank you for your help! I'm certain that I have only one spring-data-redis in my classpath, which is 1.04. It will throw the NoClassDefFoundError exception after running 5-10 seconds in my environment. To be make it clear, I package the test code with all the jars into a zip file and upload it to here, hoping to find what makes the errors. I'm really appreciating you guys helping!

          As the zip file (4mb) is too large to upload here, I share it within the google driver, here is the link:
          https://docs.google.com/file/d/0B_6o...it?usp=sharing

          Comment


          • #6
            I still can't reproduce this using just your zip file. Strange that this is able to run successfully for a little while before throwing the error. Does it always stop at the exact same spot or does it vary?

            Do you have any other information from the Exception stack trace (i.e. a "cause" or any other Exception message?) I would have thought maybe something was going on with ThreadContextClassLoaders, but there are no other Threads involved here. My next guess would have been a problem with static initializers but I'm not seeing where that might happen, and if you are able to execute enterTheFifo more than once, I don't think that would be the problem anyway.

            What Java version and OS are you on?

            Also, any chance something is going on with the file system where the jars are located? Nothing intermittently deleting the jar files or changing permissions?

            Comment


            • #7
              Hi Jencompgeek,
              After got you reply, I did the test again in two different PCs, the one is JDK 1.6.0_29 and windows 2003 server (32bit), and the other is JDK 1.7.0_25 and windows xp professional (32bit). On the both of PCs, the exactly same exception will be throwed just after 'working right' for a little while.
              I put all the jars in an individual directory (which is d:\tmp\redis-spring-data in my case), and also, it shouldn't have permission problems as I ran test within administrator in windows OS.
              Maybe I should test it in a linux machine, I will give a try later.

              here are the output log messages:
              Code:
              D:\tmp\redis-spring-data>run_test.bat
              
              D:\tmp\redis-spring-data>set CLASSPATH=./;./aopalliance-1.0.jar;./com.springsource.javax.inject-1.0.0.jar;./commons-logging-1.1.1.jar;./commons-pool-1.5.5.jar;./jackson-c
              ore-asl-1.8.3.jar;./jackson-mapper-asl-1.8.3.jar;./jcl-over-slf4j-1.6.6.jar;./jedis-2.1.0.jar;./log4j-1.2.17.jar;./redis-springdata-test.jar;./slf4j-api-1.6.6.jar;./slf4j
              -log4j12-1.6.6.jar;./spring-aop-3.1.4.RELEASE.jar;./spring-asm-3.1.4.RELEASE.jar;./spring-beans-3.1.4.RELEASE.jar;./spring-context-3.1.4.RELEASE.jar;./spring-context-supp
              ort-3.1.4.RELEASE.jar;./spring-core-3.1.4.RELEASE.jar;./spring-dao-2.0.8.jar;./spring-data-redis-1.0.4.RELEASE.jar;./spring-expression-3.1.4.RELEASE.jar
              
              D:\tmp\redis-spring-data>java com.kempsoft.test.FifoTest
              2013-07-02 09:59:15,487 INFO [org.springframework.context.support.ClassPathXmlApplicationContext] - <Refreshing org.springframework.context.support.ClassPathXmlApplicatio
              nContext@1858610: startup date [Tue Jul 02 09:59:15 CST 2013]; root of context hierarchy>
              2013-07-02 09:59:15,565 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from class path resource [applicationContext-
              redis.xml]>
              2013-07-02 09:59:15,690 INFO [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] - <JSR-330 'javax.inject.Named' annotation found and supported for co
              mponent scanning>
              2013-07-02 09:59:15,783 INFO [org.springframework.context.support.PropertySourcesPlaceholderConfigurer] - <Loading properties file from class path resource [redis.propert
              ies]>
              2013-07-02 09:59:15,799 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] - <JSR-330 'javax.inject.Inject' annotation found and sup
              ported for autowiring>
              2013-07-02 09:59:15,799 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.s
              upport.DefaultListableBeanFactory@b8deef: defining beans [redisConnectionFactory,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,org.springfram
              ework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.
              annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,fifoTest,pubsubTest,redisTemplate,org.springframew
              ork.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy>
              insert users...
              list all users...
              jack chen
              joy
              nancy
              kemp
              jack chen
              ........
              ........
              remove users...
              kemp
              nancy
              joy
              jack chen
              insert users...
              list all users...
              jack chen
              joy
              nancy
              kemp
              remove users...
              kemp
              nancy
              joy
              jack chen
              insert users...
              list all users...
              jack chen
              joy
              nancy
              kemp
              remove users...
              java.lang.NoClassDefFoundError: org/springframework/transaction/support/ResourceHolder
                      at java.lang.ClassLoader.defineClass1(Native Method)
                      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
                      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
                      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
                      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
                      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
                      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
                      at java.security.AccessController.doPrivileged(Native Method)
                      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
                      at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:68)
                      at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:53)
                      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:157)
                      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:137)
                      at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)
                      at org.springframework.data.redis.core.DefaultListOperations.rightPop(DefaultListOperations.java:141)
                      at org.springframework.data.redis.core.DefaultBoundListOperations.rightPop(DefaultBoundListOperations.java:97)
                      at org.springframework.data.redis.support.collections.DefaultRedisList.pollLast(DefaultRedisList.java:360)
                      at com.kempsoft.test.FifoTest.leaveTheFifo(FifoTest.java:50)
                      at com.kempsoft.test.FifoTest.test(FifoTest.java:71)
                      at com.kempsoft.test.FifoTest.main(FifoTest.java:99)
              Caused by: java.lang.ClassNotFoundException: org.springframework.transaction.support.ResourceHolder
                      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
                      at java.security.AccessController.doPrivileged(Native Method)
                      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
                      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
                      ... 23 more
              insert users...
              java.lang.NoClassDefFoundError: org/springframework/data/redis/core/RedisConnectionUtils$RedisConnectionHolder
                      at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:68)
                      at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:53)
                      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:157)
                      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:137)
                      at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)
                      at org.springframework.data.redis.core.DefaultListOperations.leftPush(DefaultListOperations.java:73)
                      at org.springframework.data.redis.core.DefaultBoundListOperations.leftPush(DefaultBoundListOperations.java:67)
                      at org.springframework.data.redis.support.collections.DefaultRedisList.addFirst(DefaultRedisList.java:301)
                      at org.springframework.data.redis.support.collections.DefaultRedisList.offerFirst(DefaultRedisList.java:333)
                      at com.kempsoft.test.FifoTest.enterTheFifo(FifoTest.java:42)
                      at com.kempsoft.test.FifoTest.test(FifoTest.java:57)
                      at com.kempsoft.test.FifoTest.main(FifoTest.java:99)
              insert users...
              java.lang.NoClassDefFoundError: org/springframework/data/redis/core/RedisConnectionUtils$RedisConnectionHolder
                      at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:68)
                      at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:53)
                      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:157)
                      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:137)
                      at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)
                      at org.springframework.data.redis.core.DefaultListOperations.leftPush(DefaultListOperations.java:73)
                      at org.springframework.data.redis.core.DefaultBoundListOperations.leftPush(DefaultBoundListOperations.java:67)
                      at org.springframework.data.redis.support.collections.DefaultRedisList.addFirst(DefaultRedisList.java:301)
                      at org.springframework.data.redis.support.collections.DefaultRedisList.offerFirst(DefaultRedisList.java:333)
                      at com.kempsoft.test.FifoTest.enterTheFifo(FifoTest.java:42)
                      at com.kempsoft.test.FifoTest.test(FifoTest.java:57)
                      at com.kempsoft.test.FifoTest.main(FifoTest.java:99)
              insert users...
              .....
              .....

              The 'run_test.bat':
              Code:
              set CLASSPATH=./;./aopalliance-1.0.jar;./com.springsource.javax.inject-1.0.0.jar;./commons-logging-1.1.1.jar;./commons-pool-1.5.5.jar;./jackson-core-asl-1.8.3.jar;./jackson-mapper-asl-1.8.3.jar;./jcl-over-slf4j-1.6.6.jar;./jedis-2.1.0.jar;./log4j-1.2.17.jar;./redis-springdata-test.jar;./slf4j-api-1.6.6.jar;./slf4j-log4j12-1.6.6.jar;./spring-aop-3.1.4.RELEASE.jar;./spring-asm-3.1.4.RELEASE.jar;./spring-beans-3.1.4.RELEASE.jar;./spring-context-3.1.4.RELEASE.jar;./spring-context-support-3.1.4.RELEASE.jar;./spring-core-3.1.4.RELEASE.jar;./spring-dao-2.0.8.jar;./spring-data-redis-1.0.4.RELEASE.jar;./spring-expression-3.1.4.RELEASE.jar
              
              java com.kempsoft.test.FifoTest

              Comment


              • #8
                The stack trace complaining about ResourceHolder does give me an idea. I noticed you had an old jar, spring-dao-2.0.8, in your lib dir. That jar contains ResourceHolder. Try replacing that jar with spring-tx-3.1.4.RELEASE.jar and see if that helps.

                Comment


                • #9
                  Hi jencompgeek,
                  You are right! spring-dao-2.0.8.jar causes the exception. I replace it with spring-tx-3.1.4.RELEASE.jar and it didn't go wrong anymore. Thank you!

                  BTW, I did the same test in an ubuntu 12.04 64bit machine a little while ago. it's still depend on the spring-dao-2.0.8.jar. Strange that it's working no problem too. All I did was just copying the 'redis-spring-data' fold from the windows machine to the ubuntu one, make a little modifies to the startup test script.

                  Here is the linux startup test script:

                  root@E520:/opt/dev/redis-spring-data# java -classpath $LIB_JARS com.kempsoft.test.FifoTest ^C
                  root@E520:/opt/dev/redis-spring-data# echo $LIB_JARS
                  ./aopalliance-1.0.jar:./commons-logging-1.1.1.jar:./commons-pool-1.5.5.jar:./com.springsource.javax.inject-1.0.0.jar:./jackson-core-asl-1.8.3.jar:./jackson-mapper-asl-1.8.3.jar:./jcl-over-slf4j-1.6.6.jar:./jedis-2.1.0.jar:./log4j-1.2.17.jar:./redis-springdata-test.jar:./slf4j-api-1.6.6.jar:./slf4j-log4j12-1.6.6.jar:./spring-aop-3.1.4.RELEASE.jar:./spring-asm-3.1.4.RELEASE.jar:./spring-beans-3.1.4.RELEASE.jar:./spring-context-3.1.4.RELEASE.jar:./spring-context-support-3.1.4.RELEASE.jar:./spring-core-3.1.4.RELEASE.jar:./spring-dao-2.0.8.jar:./spring-data-redis-1.0.4.RELEASE.jar:./spring-expression-3.1.4.RELEASE.jar:
                  root@E520:/opt/dev/redis-spring-data#

                  Comment

                  Working...
                  X