案例——运行异常

6 篇文章 0 订阅
  1. UnsatisfiedLinkError: no xxx in java.library.path

     在启动程序时,或者运行过程中输出:

     “UnsatisfiedLinkError: no xxx in java.library.path”

 

定位方法:

“java.library.path”是 Java 用来寻找 JNI(Native)库的路径(.dll,.so等);

输入该异常一般是因为找不到对应运行时版本的dll或者so文件;

(没有该文件,或者“java.library.path”设置不正确)

问题解决:

 

 

 2.UnsatisfiedLinkError: Cant load IA 32-bit .dll on 64-bit

问题描述:

  1. 看看“java.library.path”中是否有该 dll/so 文件;
  2. 在代码中可通过 System.getProperty(..) 来输出该路径,可以通过System.setProperty(..) 来设置该路径;
  3. 在Eclipse中调试时,可以在项目右键->属性->Java Buld Path ->Libraries -> 对应的jar包 -> Native library location -> Edit 来设置)

在启动程序时,或者运行过程中输出:

“UnsatisfiedLinkError: /path/to/xxx.dll Can't load IA 32-bit .dll on a AMD 64-bit platform”

定位方法:这个是因为使用的dll/so JNI动态库文件与当前虚拟机(32/64位)版本不匹配。

问题解决:

 

在Eclipse中调试时,可以在项目右键->属性->Java Buld Path ->Libraries -> JRE System Library -> Edit 中选择32位版本的JDK。

3.Unable to add the resource at [xxx] to the cache

 

  1. 看看对应的dll/so文件与当前的JVM运行时是否匹配(32/64位);
  2. 可以尝试更换与当前JVM向匹配的dll/so;或者更换32/64位的JVM;

问题描述:

在tomcat 启动/运行时出现:

警告: Unable to add the resource at [/WEB-INF/lib/xmlgraphics-commons-1.2.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

五月 09, 2018 5:33:32 下午 org.apache.catalina.webresources.Cache getResource

警告: Unable to add the resource at [/WEB-INF/lib/woodstox-core-asl-4.2.0.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

五月 09, 2018 5:33:32 下午 org.apache.catalina.webresources.Cache getResource

警告: Unable to add the resource at [/WEB-INF/lib/thumbnailator-0.4.8.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

五月 09, 2018 5:33:32 下午 org.apache.catalina.webresources.Cache getResource

警告: Unable to add the resource at [/WEB-INF/lib/spring-aop-3.2.10.RELEASE.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

五月 09, 2018 5:33:32 下午 org.apache.catalina.webresources.Cache getResource

警告: Unable to add the resource at [/WEB-INF/lib/spring-jdbc-3.1.1.RELEASE.jar] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

五月 09, 2018 5:33:32 下午 org.apache.catalina.webresources.Cache getResource

定位方法:

在 tomcat 8+ 增加了资源缓存机制,上面的告警信息是因为缓存空间设置不足导致;

参考:

 

https://stackoverflow.com/questions/26893297/tomcat-8-throwing-org-apache-catalina-webresources-cache-getresource-unable-to

http://tomcat.apache.org/tomcat-8.0-doc/config/resources.html

问题解决:

修改配置文件 {tomcat}/conf/context.xml 增加资源缓存的大小。

注:需要消耗更多的内存空间;

  详细 X
  没有英汉互译结果
   请尝试网页搜索
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值