WAMPSERVER软件中设置session存放位置

展开阅读全文

tomcat redis 存放session

08-12

tomcat7.055、redis2.8、jedis.jar、common-pool2.2.jar、tomcat-redis-session-manager-1.2-tomcat-7.jarrnrn将上面的3个jar包放入tomcat下的lib目录rnrn修改content.xmlrn添加:[code=html]rn [/code]rn启动tomcat时,报错,无法成功启动tomcat。rn以下是错误日志:[code=text]八月 12, 2014 12:43:16 下午 org.apache.tomcat.util.digester.Digester startElementrn严重: Begin event threw errorrnjava.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool$Configrn at java.lang.Class.getDeclaredConstructors0(Native Method)rn at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)rn at java.lang.Class.getConstructor0(Class.java:2842)rn at java.lang.Class.newInstance(Class.java:345)rn at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:145)rn at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1288)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)rn at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)rn at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)rn at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)rn at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:637)rn at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:580)rn at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:837)rn at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:385)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)rn at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: java.lang.ClassNotFoundException: org.apache.commons.pool.impl.GenericObjectPool$Configrn at java.net.URLClassLoader$1.run(URLClassLoader.java:366)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:355)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:354)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:425)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:358)rn ... 37 morernrn八月 12, 2014 12:43:16 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn严重: Error deploying web application directory C:\Apache Software Foundation\tomcat7\tomcat3\apache-tomcat-7.0.55\webapps\docsrnjava.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool$Configrn at java.lang.Class.getDeclaredConstructors0(Native Method)rn at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)rn at java.lang.Class.getConstructor0(Class.java:2842)rn at java.lang.Class.newInstance(Class.java:345)rn at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:145)rn at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1288)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)rn at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)rn at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)rn at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)rn at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)rn at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)rn at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)rn at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)rn at org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:637)rn at org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:580)rn at org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:837)rn at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:385)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)rn at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)rn at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: java.lang.ClassNotFoundException: org.apache.commons.pool.impl.GenericObjectPool$Configrn at java.net.URLClassLoader$1.run(URLClassLoader.java:366)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:355)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:354)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:425)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:358)rn ... 37 more[/code]rn在新加入的3个jar包中,均没有需要用到org.apache.commons.pool.impl.GenericObjectPool$Config的地方,redis引用的是rnorg.apache.commons.pool2.impl.GenericObjectPool$Config,不知道怎么会出现这个错。rnrn在tomcat-redis-session-manager-1.2-tomcat-7.jar的源码中有一个类RedisSessionManager在Eclipse中发现有问题。rn这个类中有处代码for (Valve valve : getContext().getPipeline().getValves()) 这里的getContext() 方法报错,提示没有该方法,并且在该类的父类ManagerBase中也没有找到该方法。 论坛

没有更多推荐了,返回首页