早上上班打开电脑,发现应用启动出问题了,提示:java.lang.NoClassDefFoundError: javax/transaction/TransactionManager, 于是google了一下,原来是少了jta.jar。奇怪,原来好好的,今天怎么少了呢? 是不是我Eclipse出问题了。
jta.jar 下载地址:
1,http://java.sun.com/products/jta/ 下载类文件 Class Files,然后自己打包成jar文件,或者直接修改后缀名zip为jar
2,CSDN下载 http://download.csdn.net/source/337356
具体出错信息如下:
- Caused by:
- java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
- at java.lang.Class.getDeclaredMethods0(Native Method)
- at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
- at java.lang.Class.getDeclaredMethods(Class.java:1763)
- at java.beans.Introspector$1.run(Introspector.java:1265)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263)
- at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1129)
- at java.beans.Introspector.getBeanInfo(Introspector.java:387)
- at java.beans.Introspector.getBeanInfo(Introspector.java:159)
- at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:142)
- at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:83)
- at org.springframework.beans.BeanWrapperImpl.setIntrospectionClass(BeanWrapperImpl.java:239)
- at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:197)
- at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:180)
- at org.springframework.beans.BeanWrapperImpl.<init>(BeanWrapperImpl.java:133)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:535)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
- at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
- at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
- at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:332)
- at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:97)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:578)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:371)
- at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
- at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:850)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:624)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:411)
- at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
- at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
- at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
- at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:304)
- at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
- at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
- at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
- at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
- at org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:83)
- at javax.servlet.GenericServlet.init(GenericServlet.java:211)
- at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
- at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
- at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
- at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
- at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
- at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
- at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
- at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
- at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
- at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
- at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
- at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
- at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
- at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
- at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
- at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
- at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
- at org.apache.catalina.core.StandardService.start(StandardService.java:450)
- at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
- at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
- at java.lang.reflect.Method.invoke(Method.java:585)
- at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
- at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)