俗人谷 2016-09-01 01:15 采纳率: 100%
浏览 3674
已采纳

Tomcat部署工程时报错: Exception sending context...

工程师SVN上检出的,按理说应该是没有问题的,怎么会发生如下错误。
Tomcat启动部署工程时报错:

 信息: Deploying web application directory D:\apache-tomcat-7.0.30\webapps\MC
九月 01, 2016 8:43:42 上午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
九月 01, 2016 8:43:42 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
九月 01, 2016 8:43:45 上午 org.apache.catalina.core.StandardContext listenerStart
严重: 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 'mcServiceHsf' defined in file [D:\apache-tomcat-7.0.30\webapps\MC\WEB-INF\classes\com\inspur\gcloud\ext\service\impl\MessageCenterServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1013)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:959)
    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:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
    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:389)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    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:618)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
    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.BeanInstantiationException: Could not instantiate bean class [com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError
    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:1006)
    ... 26 more
Caused by: java.lang.ExceptionInInitializerError
    at com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl.<init>(MessageCenterServiceImpl.java:43)
    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)
    ... 28 more
Caused by: com.inspur.hsf.service.rpc.RpcException: 没有找到可用服务,服务:logCenter.primaryService
    at com.inspur.hsf.service.cluster.impl.AvailableClusterInvoker.doInvoke(AvailableClusterInvoker.java:88)
    at com.inspur.hsf.service.cluster.impl.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:222)
    at com.inspur.hsf.service.rpc.transcation.humanredo.StoreFailureInvoker.invoke(StoreFailureInvoker.java:34)
    at com.inspur.hsf.service.rpc.proxy.jdk.JdkProxyFactory$1.invoke(JdkProxyFactory.java:82)
    at com.sun.proxy.$Proxy8.isModuleExistByCode(Unknown Source)
    at com.inspur.gcloud.logcenter.primary.core.PrimaryManager.init(PrimaryManager.java:29)
    at com.inspur.gcloud.logcenter.util.GCloudLogUtil.<init>(GCloudLogUtil.java:26)
    at com.inspur.gcloud.logcenter.util.GCloudLogUtil.getInstance(GCloudLogUtil.java:62)
    at com.inspur.gcloud.mc.common.util.McLoggerUtil.<init>(McLoggerUtil.java:28)
    at com.inspur.gcloud.mc.common.util.McLoggerUtil.<clinit>(McLoggerUtil.java:30)
    ... 34 more
  • 写回答

1条回答 默认 最新

  • 摇摆Maori 2016-09-01 02:13
    关注

    打包的时候没有编译成功,你看错误,项目里的
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mcServiceHsf' defined in file [D:\apache-tomcat-7.0.30\webapps\MC\WEB-INF\classes\com\inspur\gcloud\ext\service\impl\MessageCenterServiceImpl.class]:Instantiation of bean failed
    错误信息是,项目里spring 实例化异常没有找到,还是让开发的人看看吧

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 (标签-STM32|关键词-智能小车)
  • ¥20 关于#stm32#的问题,请各位专家解答!
  • ¥15 (标签-python)
  • ¥15 第一个已完成,求第二个做法
  • ¥20 搭建awx,试了很多版本都有错
  • ¥15 java corba的客户端该如何指定使用本地某个固定IP去连接服务端?
  • ¥15 activiti工作流问题,求解答
  • ¥15 有人写过RPA后台管理系统么?
  • ¥15 Bioage计算生物学年龄
  • ¥20 如何将FPGA Alveo U50恢复原来出厂设置哇?