服务器部署项目-linux上启动tomcat出错,java项目是编译后的,在本地测试没问题

问题描述

linux上启动tomcat出错,java项目是编译后的,在本地测试没问题 2C
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'returnedMoneyAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contractService' defined in file [/tomcat/apache-tomcat-7.0.62/webapps/ROOT/WEB-INF/classes/com/cddgg/p2p/cfbao/spring/service/ContractService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cddgg.p2p.cfbao.spring.service.ContractService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /java/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1120)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5266)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5554)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contractService' defined in file [/tomcat/apache-tomcat-7.0.62/webapps/ROOT/WEB-INF/classes/com/cddgg/p2p/cfbao/spring/service/ContractService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cddgg.p2p.cfbao.spring.service.ContractService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /java/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1011)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:957)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:550)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303)
... 33 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cddgg.p2p.cfbao.spring.service.ContractService]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: /java/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1004)
... 46 more
Caused by: java.lang.UnsatisfiedLinkError: /java/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.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(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerNativeLibrary.(FontManagerNativeLibrary.java:32)
at sun.font.SunFontManager$1.run(SunFontManager.java:339)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.(SunFontManager.java:335)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at sun.java2d.SunGraphicsEnvironment.getFontManagerForSGE(SunGraphicsEnvironment.java:185)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:219)
at sun.java2d.SunGraphicsEnvironment.getAvailableFontFamilyNames(SunGraphicsEnvironment.java:247)
at sun.java2d.HeadlessGraphicsEnvironment.getAvailableFontFamilyNames(HeadlessGraphicsEnvironment.java:94)
at org.xhtmlrenderer.context.AWTFontResolver.init(AWTFontResolver.java:58)
at org.xhtmlrenderer.context.AWTFontResolver.(AWTFontResolver.java:53)
at org.xhtmlrenderer.layout.SharedContext.(SharedContext.java:102)
at org.xhtmlrenderer.pdf.ITextRenderer.(ITextRenderer.java:111)
at org.xhtmlrenderer.pdf.ITextRenderer.(ITextRenderer.java:102)
at com.cddgg.p2p.cfbao.spring.service.ContractService.(ContractService.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 48 more

解决方案

可能是com/cddgg/p2p/cfbao/spring/service/ContractService.class中部分代码linux中的32位jdk不支持

解决方案二:
就只有这一段错误,其它都是ok的。各位大神赶紧显灵,小弟感激不尽

解决方案三:
报错信息很清晰啊:

 nested exception is java.lang.UnsatisfiedLinkError: /java/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: cannot open shared object file: No such file or directory

gcc的动态库找不到了/java/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.so.1
要不就是gcc没有安装正确的版本,要不就是32位,64位的问题。
重新装一下gcc。

时间: 2024-10-31 04:51:10

服务器部署项目-linux上启动tomcat出错,java项目是编译后的,在本地测试没问题的相关文章

服务器-为什么要把web项目部署在linux上,如果要完成它,需要学哪些知识

问题描述 为什么要把web项目部署在linux上,如果要完成它,需要学哪些知识 本人小白,只知道在windows上用tomcat部署项目,也只知道用端口号去访问,怎么样才能让所有人都可以访问自己做的网站,经常听说把项目部署到linux服务器,但一直不明白,求指点! 解决方案 让所与人都可以访问,前提是你要有,在公网的服务器和公网的IP.这样你的服务器才算是对大众可见.当然现在只能使用IP的方式访问.如果要是使用XXXX.com的形式,那么你就要有域名了..这个就要设计域名申请,要是服务器在国内的

y clipse-MyEclipse2014部署tomcat项目无法手动启动tomcat运行项目

问题描述 MyEclipse2014部署tomcat项目无法手动启动tomcat运行项目 我在本地写了一个项目,然后用MyEclipse2014部署在tomcat上面正常运行,但是我在MyEclipse里面关闭tomcat之后把tomcat安装目录下面的webapps对应的项目整体上传到了远程服务器上面,发现无法找到项目.而且在本地计算机服务中手动启动tomcat发现本地项目也是无法找到,但是webapps文件夹里面的确存在!问一下这个是什么原因,如何才能部署成功? 解决方案 是不是你的tomc

javaee-java项目的部署在linux上,项目的有些功能会失效

问题描述 java项目的部署在linux上,项目的有些功能会失效 java项目部署到linux服务器上, 在本地(windows7)下 ,正常运行 可是部署到linux上 项目中有些功能会失效 比如 我做的定时器定时备份数据就没执行 失效的功能前几天还可以,就今天突然不行了 ,,,我想是不是linux被修改了一些配置导致的吧 这是为什么呢????? 来个大神指教指教哇 小弟多谢!!!! 解决方案 查查环境,jdk的版本是否匹配,如果你的项目编译的jdk版本高于linux的版本,那当然是有问题的.

maven项目部署在linux上的jar包问题

问题描述 maven项目部署在linux上的jar包问题 昨天吧写好的程序部署在linux上准备测试.发现找不到hibernate3.0.6.jar 看后发现, 这个jar包是引用在本地磁盘上的一个jar包.如:G:xxxx/xxxx/xx/hibernateXX.jar ,但是maven的jar包也已经打包到lib下放到程序包的同级目录下.可能linux上没有盘符, 而maven里找jar包的是通过pom文件找jar包的.pom文件里面写的是G:xxxxxxx.hibernateXX.jar

求助: 布署项目到远程linux上的tomcat上.布署成功后,访问不到jsp,静态资源文件也访问不到. 报404错误.

问题描述 求助:布署项目到远程linux上的tomcat上.布署成功后,访问不到jsp,静态资源文件也访问不到.报404错误.20分钟前匿名|分类:JAVA相关|浏览3次求助:布署项目到远程linux上的tomcat上.布署成功后,访问不到jsp,静态资源文件也访问不到.报404错误.项目MVC层用的是struts2,在web.xml中配置的Struts2的.如果我将web.xml文件中的struts2的配置删除掉.这时就可以访问到静态的资源文件,也可以直接访问JSP文件了.但是这样STRUTS

web服务部署到linux上后,文件上传路径如何修改呢?

问题描述 web服务部署到linux上后,文件上传路径如何修改呢? 在windows下开发的时候,我的文件上传保存路径为 d:/www/xx/,项目部署到linux上后,应该如何修改上传路径呢?如果不修改,我发现也可以上传,但是文件会上传到tomcat7/bin/目录中,给人感觉非常混乱.我希望能放在指定的文件夹中.谢谢! 解决方案 参考:http://www.enkj.com/help/newscontent/70983 你的路径用 /upload/xxx 就会根据你定义的目录相对路径找到 解

在eclipse中启动tomcat出错,单独启动tomcat能正常启动,

问题描述 在eclipse中启动tomcat出错,单独启动tomcat能正常启动,程序也能跑起来,错误信息如下,有人遇到过这种错误嘛? java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav

java-jasperreports-5.5.部署在linux上

问题描述 jasperreports-5.5.部署在linux上 Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser at net.sf.jasperreports.engine.fill.JRBaseFiller.(JRBaseFiller.java:123) at net.sf.jasperreport

eclipse-Eclipse中启动tomcat出错

问题描述 Eclipse中启动tomcat出错 tomcat在外部可以自行启动,但是加入web程序到tomcat后无法启动tomcat,并且提示下列信息,究竟是什么原因呢,又有什么解决方法,求大神指教 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[loc