1

我有一个战争档案。

在部署到 tc 服务器之前,我成功部署到了 tomcat 上:

  1. 在 webapps 文件夹中复制 war,在 libs 文件夹中复制 mysql 连接器。

2.配置server.xml

现在,在关键的 tc 服务器开发人员版本 3.0.0 上,我创建了一个洞察类型的实例(用于 Spring Insight)。

我已经在该实例的 webapps 文件夹中复制了我的战争。在 libs 文件夹中复制 mysql 连接器,配置 server.xml

当我运行 tc 服务器实例时,war 正常启动,然后由于嵌套依赖异常,出现了很多异常,一切都失败了。

一些日志:

战争开始时记录(修剪):

17:35:13.510 [localhost-startStop-1] INFO  o.s.b.f.s.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@19ed05c9:

在许多这样的日志之后,有一个破坏性的单例 bean 日志(修剪):

17:35:15.408 [localhost-startStop-1] INFO  o.s.b.f.s.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@19ed05c9:

在上述大量日志之后:

17:35:15.519 [localhost-startStop-1] ERROR o.s.web.context.ContextLoader - Context initialization failed

在这之后 :

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'SomeBean' defined in file.....(trimmed)... Unsatisfied dependency expressed through constructor argument with index 0 of type [packagename.someRepository: : Error creating bean with name 'someRepository': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/transaction/interceptor/TransactionAspectSupport$InvocationCallback; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'someRepository': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/transaction/interceptor/TransactionAspectSupport$InvocationCallback
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:738) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1075) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:979) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) ~[spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) ~[spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) [spring-web-3.2.5.RELEASE.jar:3.2.5.RELEASE]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992) [catalina.jar:7.0.55.A]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490) [catalina.jar:7.0.55.A]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.55.A]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.55.A]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.55.A]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649) [catalina.jar:7.0.55.A]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) [catalina.jar:7.0.55.A]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) [catalina.jar:7.0.55.A]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]

在您看到的日志中,它无法创建“someRepository”,其中 someRepository 只是域对象的 JPA 存储库,没什么复杂的。

还有嵌套的异常,这也存在:

nested exception is java.lang.NoClassDefFoundError: org/springframework/transaction/interceptor/TransactionAspectSupport$InvocationCallback

如果需要任何其他信息,请告诉我。

非常感谢您提前提供的所有帮助。

4

1 回答 1

1
于 2014-10-30T15:41:39.683 回答