java.lang.NoClassDefFoundError: javax/transaction/TransactionManager 解決 只需一個jta.jar檔案
阿新 • • 發佈:2019-02-07
早上上班開啟電腦,發現應用啟動出問題了,提示:java.lang.NoClassDefFoundError: javax/transaction/TransactionManager, 於是google了一下,原來是少了jta.jar。奇怪,原來好好的,今天怎麼少了呢? 是不是我Eclipse出問題了。
jta.jar 下載地址:
具體出錯資訊如下:
- 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:
- 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:
- 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)