部署war文件时出错:无法解析占位符' jboss.server.home.dir'

时间:2015-07-20 13:35:55

标签: java maven jboss jboss7.x

我添加了这个变量' jboss.server.home.dir'。 现在日志看起来像这样:

12:13:37,849 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-2) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'monitorController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.ifree.mticketing.server.core.CoreService com.ifree.mticketing.server.proxy.controller.monitor.MonitorController.core; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'coreServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.springframework.jmx.export.MBeanExporter com.ifree.mticketing.server.core.impl.CoreServiceImpl.exporter; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exporter' defined in "/C:/jboss-as-7.1.1.Final/bin/content/server-proxy.war/WEB-INF/classes/META-INF/spring/applicationContext.xml": Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.ifree.mticketing.server.dao.BookOrderDAO com.ifree.mticketing.server.core.impl.ContentServiceImpl.bookOrderDAO; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookOrderDAOImpl' defined in "/C:/jboss-as-7.1.1.Final/bin/content/server-proxy.war/WEB-INF/lib/server-dao-1.0.1-UFS-SNAPSHOT.jar/com/ifree/mticketing/server/dao/impl/BookOrderDAOImpl.class": Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in "/C:/jboss-as-7.1.1.Final/bin/content/server-proxy.war/WEB-INF/classes/META-INF/spring/applicationContext.xml": Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not parse configuration: vfs:/C:/jboss-as-7.1.1.Final/bin/content/server-proxy.war/WEB-INF/lib/server-dao-1.0.1-UFS-SNAPSHOT.jar/META-INF/hibernate.cfg.xml
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [org.springframework.beans-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) [org.springframework.context-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) [org.springframework.context-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384) [org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) [org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [org.springframework.web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by:

1 个答案:

答案 0 :(得分:0)

您是否尝试过设置JBOSS_HOME环境变量?