当前位置: 技术问答>linux和unix
linux下启动tomcat异常 libXrender.so.1
来源: 互联网 发布时间:2017-05-14
本文导语: 我就有个jre没有jdk 环境变量也都有为什么还报错 [color=#FFFF00]运行./startup.sh[/color] Using CATALINA_BASE: /opt/Tomcat/manager Using CATALINA_HOME: /opt/Tomcat/manager Using CATALINA_TMPDIR: /opt/Tomcat/manager/temp Using JRE_HOME: /opt/Tomcat/thi...
我就有个jre没有jdk
环境变量也都有为什么还报错
[color=#FFFF00]运行./startup.sh[/color]
Using CATALINA_BASE: /opt/Tomcat/manager
Using CATALINA_HOME: /opt/Tomcat/manager
Using CATALINA_TMPDIR: /opt/Tomcat/manager/temp
Using JRE_HOME: /opt/Tomcat/thirdpart/jre
Using CLASSPATH: /opt/Tomcat/manager/bin/bootstrap.jar:/opt/NEU20/manager/bin/tomcat-juli.jar
这是catalina.out文件报错信息
Mar 25, 2014 4:42:42 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
java.lang.UnsatisfiedLinkError: /opt/Tomcat/thirdpart/jre/lib/i386/xawt/libmawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Unknown Source)
at java.awt.Toolkit.(Unknown Source)
at sun.awt.AppContext$2.run(Unknown Source)
at sun.awt.AppContext$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.AppContext.initMainAppContext(Unknown Source)
at sun.awt.AppContext.access$200(Unknown Source)
at sun.awt.AppContext$3.run(Unknown Source)
at sun.awt.AppContext$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.AppContext.getAppContext(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at javax.imageio.ImageIO.(Unknown Source)
at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListener.java:259)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:99)
at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
环境变量也都有为什么还报错
[color=#FFFF00]运行./startup.sh[/color]
Using CATALINA_BASE: /opt/Tomcat/manager
Using CATALINA_HOME: /opt/Tomcat/manager
Using CATALINA_TMPDIR: /opt/Tomcat/manager/temp
Using JRE_HOME: /opt/Tomcat/thirdpart/jre
Using CLASSPATH: /opt/Tomcat/manager/bin/bootstrap.jar:/opt/NEU20/manager/bin/tomcat-juli.jar
这是catalina.out文件报错信息
Mar 25, 2014 4:42:42 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
java.lang.UnsatisfiedLinkError: /opt/Tomcat/thirdpart/jre/lib/i386/xawt/libmawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Unknown Source)
at java.awt.Toolkit.(Unknown Source)
at sun.awt.AppContext$2.run(Unknown Source)
at sun.awt.AppContext$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.AppContext.initMainAppContext(Unknown Source)
at sun.awt.AppContext.access$200(Unknown Source)
at sun.awt.AppContext$3.run(Unknown Source)
at sun.awt.AppContext$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.AppContext.getAppContext(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at javax.imageio.ImageIO.(Unknown Source)
at org.apache.catalina.core.JreMemoryLeakPreventionListener.lifecycleEvent(JreMemoryLeakPreventionListener.java:259)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:99)
at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
|
应该可以的 将JAVA_HOME 设置为jre的目录
将 jre/bin 添加到path中
将 jre/bin 添加到path中
|
下载libxrender安装一下吧。然后找到libxrender.so放到/opt/Tomcat/thirdpart/jre/lib/i386/xawt/目录下,再看看你是否有权限,如果没有权限,修改一下。
|
设置 JAVA_HOME 环境变量