war包部署到tomcat,配置的映射地址全部404无法访问 40C

spring mvc项目打包成war包部署到tomcat上时,普通的静态页面可以访问,但mvc配置的映射地址全部404无法访问,

以下是tomcat的部分错误日志

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wicrownServiceApi': Cannot resolve reference to bean 'wicrownServiceApiImpl' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wicrownServiceApiImpl' defined in file [C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\rzzxmain\WEB-INF\classes\com\rzzx\api\impl\WicrownServiceApiImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.rzzx.api.impl.WicrownServiceApiImpl]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: C:\Dll\Wicrown\zg_palm_jni.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:637)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:980)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:633)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wicrownServiceApiImpl' defined in file [C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\rzzxmain\WEB-INF\classes\com\rzzx\api\impl\WicrownServiceApiImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.rzzx.api.impl.WicrownServiceApiImpl]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: C:\Dll\Wicrown\zg_palm_jni.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1038)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:984)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 30 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.rzzx.api.impl.WicrownServiceApiImpl]: Constructor threw exception; nested exception is java.lang.UnsatisfiedLinkError: C:\Dll\Wicrown\zg_palm_jni.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
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:1031)
... 38 more
Caused by: java.lang.UnsatisfiedLinkError: C:\Dll\Wicrown\zg_palm_jni.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
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 zg_palmvein_jni.Palm_lib.(Palm_lib.java:5)
at com.rzzx.api.impl.WicrownServiceApiImpl.(WicrownServiceApiImpl.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 40 more

3个回答

异常已经说明的很明确了:
java.lang.UnsatisfiedLinkError: C:\Dll\Wicrown\zg_palm_jni.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

32位的dll文件不能在64位系统的装载。解决 办法:
1.用64位系统的编译器重新编译生成zg_palm_jni.dll,如果这个也是你们开发的,并且有源码
2.jdk换成32位的,用32位版本的jdk运行tomcat
3。如果你现在只能用32位的dll,可以靠率再部署一个32位的JDK装载允许这个dll,然后64位那边用RMI调用方式取回执行结果

应该是开发环境问题。看下JDK,tomcat是不是64位的,另外环境变量配置。
http://jingyan.baidu.com/article/9c69d48f457e6f13c9024eea.html

beijing20110905
微风吹过的夏天2016 另外,可能你生存的dll库是32位的,重新生成一个64位dll就行了。http://blog.csdn.net/l1028386804/article/details/46605003
接近 4 年之前 回复

楼上说的都只正解,弄下估计就好

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐