赞
踩
type Exception report
message Request processing failed; nested exception is java.lang.IllegalArgumentException: hostname can't be null
description The server encountered an internal error that prevented it from fulfilling this request.
exception
- org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: hostname can't be null
- org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
- org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
- javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
- org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
- javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
- org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
- org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
- org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
root cause
- java.lang.IllegalArgumentException: hostname can't be null
- java.net.InetSocketAddress.checkHost(InetSocketAddress.java:149)
- java.net.InetSocketAddress.<init>(InetSocketAddress.java:216)
- redis.clients.jedis.Connection.connect(Connection.java:142)
- redis.clients.jedis.BinaryClient.connect(BinaryClient.java:75)
- redis.clients.jedis.Connection.sendCommand(Connection.java:77)
-
-
-
-
-
- 我一开始测试的时候是没问题的但是实际运用这个jedis去自动增长主键时,却报了这个错误,后来查阅资料才发现原来是忘记写数据类型了
-
- 解决办法如下
- <!-- 配置Jedis-->
- <bean id="jedis" class="redis.clients.jedis.Jedis">
- <constructor-arg index="0" value="192.168.200.128" type="java.lang.String"/>
- <constructor-arg index="1" value="6379"/>
- </bean>
-
-
-
-
-
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。