org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [dispatcher] in context with path [/platform] threw exception [Filtered request failed.] with root cause
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at redis.clients.jedis.Connection.connect(Connection.java:184)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:868)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:458)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
at redis.clients.util.Pool.getResource(Pool.java:49)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:16)
at net.oschina.j2cache.redis.RedisPubSubClusterPolicy.publish(RedisPubSubClusterPolicy.java:146)
at net.oschina.j2cache.redis.RedisPubSubClusterPolicy.connect(RedisPubSubClusterPolicy.java:102)
at net.oschina.j2cache.cluster.ClusterPolicyFactory.redis(ClusterPolicyFactory.java:68)
at net.oschina.j2cache.cluster.ClusterPolicyFactory.init(ClusterPolicyFactory.java:43)
2 回答
喵喵时光机
TA贡献1846条经验 获得超7个赞
根据报错,可以判断请求已经被tomcat接受并开始处理,但是在装载类的时候找不到Could not initialize class com.platform.cache.J2CacheUtils,无法初始化这个类,原因基本上有以下几点:
1.在打war包的时候没有将依赖的jar包打进去
2.依赖的jar包没有被成功加载
具体可以去看下项目lib目录底下的jar包,先确认依赖包正常被加载
添加回答
举报
0/150
提交
取消