现象: 一段代码: ClassLoader loader = XXXUtil.class.getClassLoader(); String jsFileName = loader.getResource("") + "/resources/" + fileName; logger.info("文件路径为"+jsFileName); 在本地开发测试,完全ok(windows下): 上测试环境,报错/opt/jar_code/xxx/xxxx.jar…
spring boot启动STS 运行报错 java.lang.NoClassDefFoundError: ch/qos/logback/classic/LoggerContext 学习了: http://ask.csdn.net/questions/381580 http://blog.csdn.net/liuxiangke0210/article/details/77893560?locationNum=2&fps=1 增加了: <dependency> <groupId&g…
https://blog.csdn.net/quqiaoluo5620/article/details/80608474 在Pycharm中安装Yellowfin时一直报错"no such file or directory: '/temp/pip-build-jykvuD/YellowFin/README.md ",但是项目中需要"from yellowfin import YFOptimizer",尝试了很多方法,也怀疑过是不是python版本的问题,最后在gi…
1.前言 工程做好了,总不能放在idea运行吧?不然怎么把项目放到云服务器呢?[这一篇随笔不讲解发布的云服务器的操作,在其他随笔有详细记载.] 解决的方案是把springboot 工程 打包成war文件 ,然后部署到外部tomcat服务器的webapps文件夹里面, 然后修改配置文件service.xml 用于修改访问端口与去除请求路径的工程名. [一般用一个tomcat可以设置多个节点,也就是说一个tomcat服务器可以同时开启多个工程,地址一样,用端口来区分, 但是 Tomcat 默认配置的…
报错内容:class path resource [client.p12] cannot be resolved to absolute file path because it does not reside in the file system 问题所在: 代码使用了 ResourceUtils.getFile("classpath:client.p12")访问文件 ,这个方法只能从类路径下获取文件,无法从jar包中获取,所以打成jar包后发布到windows系统,就报错找不到文件…
spring boot用layout ZIP打出来的包能够支持外部classpath,但是当用rar/7zip替换其中的jar后,报下列错误: Unable to open nested entry 'BOOT-INF/lib/cache-api-0.4.jar'. It has been compressed and nested jar files must be stored without compression. 解决方法: jar包可以替换的,过程如下:jar -xvf ta-bas…
在使用Spring Boot JPA分页 PageRequest分页时,出现如下错误: 本来以为是包导入出现了问题,结果发现并不是.导入包如下: 后来在网上查找相关资料,发现这样的用法,好像也可以用,但他们提示的都是此方法已过期.我的不知道为什么报错了. 后来去源码里找了一下这个方法,发现源码中方法如下: 于是把上面报错的代码修改为: Pageable pageable1 = PageRequest.of(0, 11, Sort.Direction.ASC, "orderNo"); 错…
在spring boot jpa 中自定义sql,执行update操作报错解决办法: 在@Query(...)上添加 @Modifying@Transactional注解…
使用Spring boot整合Hive,在启动Spring boot项目时,报出异常: java.lang.NoSuchMethodError: org.eclipse.jetty.servlet.ServletMapping.setDefault(Z)V 经过排查,是maven的包冲突引起的,具体做法,排除:jetty-all.hive-shims依赖包.对应的pom配置如下: <dependency> <groupId>org.apache.hive</groupId&g…
解决参考文章:https://blog.csdn.net/hengyunabc/article/details/78762097 spring boot启动报错如下: Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. -- :: --- [ main] o.s.b.d.LoggingFailureAnal…