当前位置:   article > 正文

Caused by: java.lang.IllegalArgumentException: hostname can't be null

hostname can't be null

错误信息:

  1. Caused by: java.lang.IllegalArgumentException: hostname can't be null
  2. at java.net.InetSocketAddress.checkHost(InetSocketAddress.java:149)
  3. at java.net.InetSocketAddress.<init>(InetSocketAddress.java:216)
  4. at com.orange.config.FoticConfig.foticFTPService(FoticConfig.java:27)
  5. at com.orange.config.FoticConfig$$EnhancerBySpringCGLIB$$97899c8f.CGLIB$foticFTPService$2(<generated>)
  6. at com.orange.config.FoticConfig$$EnhancerBySpringCGLIB$$97899c8f$$FastClassBySpringCGLIB$$428e4182.invoke(<generated>)
  7. at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
  8. at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
  9. at com.orange.config.FoticConfig$$EnhancerBySpringCGLIB$$97899c8f.foticFTPService(<generated>)
  10. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  11. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  12. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  13. at java.lang.reflect.Method.invoke(Method.java:498)
  14. at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
  15. ... 48 common frames omitted

其中一种原因:

配置文件内的IP没配置上或ip为null,导致第三方连接失败,可以看看控制台报错的上方应该有具体的报错类说明

 

解决方式:

查阅下自己的配置文件是否都已配置,是否为null,是的话修改下即可

 

注:我的问题在于spring boot2.0的yml文件没配置ftp的ip连接地址

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/282298
推荐阅读
相关标签
  

闽ICP备14008679号