2015-07-20 116 views
0

我添加了這個變量'jboss.server.home.dir'。 現在登錄看起來是這樣的:部署war文件時出錯:無法解析佔位符'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: 
+0

錯誤顯示'could not parseconfiguration',因此請檢查XML語法中的任何錯誤。也嘗試硬編碼jboss路徑,看看它是否有效 – Sridhar

+0

我找到了解決方案。我需要在jboss啓動時設置代理授權。 – user3664421

回答

0

你試過設置JBOSS_HOME環境變量?

+0

我嘗試設置並嘗試取消設置。沒有結果。 – user3664421

+0

您需要先停止JBOSS,如果您在Windows中,則可能必須關閉並重新打開命令提示符。 – JFPicard

+0

我這樣做。我設置了這個變量。關閉cmd。沒有結果。 我沒有設置這個變量。再次關閉cmd。沒有結果。 輸出相同。 – user3664421

相關問題