加载/读取资源JBOSS为7

时间:2015-11-16 03:12:56

标签: spring jsf deployment resources

我最近正在努力将jsf 1.2项目从Jboss 5迁移到JBoss 7.1.1 Final。当我第一次部署应用程序时,一切都像魅力一样,但它不稳定,作为一个例子10次,应用程序部署成功8并且失败了两次。

仅当应用程序尝试将外部资源加载为在classPath中注入的.xml conf或.proprieties时,部署才会失败。我认为这不是文件系统访问权限的问题,但我不知道为什么我可以解决这个问题,即使我在这里试图打印日志错误说明它带我重启服务器九次以追踪问题

当应用程序尝试加载XML配置文件并且您在附加的链接error1-log中找到该日志时出现第一个错误,它与第二个错误相同,但我试图读取一个.proprieties error2-log,

我已经搜索谷歌数天并尝试了几种不同的迭代配置,因为定义了一个单独的模块来加载资源,更改目录权限,实现Jboss策略安全性。我终于崩溃并寻求帮助。

我绝对乐于接受,谢谢。

error1-log:

00:44:47,387 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-7) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionInterceptor#0': Cannot resolve reference to bean 'hibernateTransactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTransactionManager' defined in class path resource [br/com/murah/audixpress/core/config/context/applicationContext-DB.xml]: Cannot resolve reference to bean 'hibernateSessionFactory' while setting bean property 'sessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in class path resource [br/com/murah/audixpress/core/config/context/applicationContext-DB.xml]: Cannot create inner bean 'br.com.murah.audixpress.web.utils.MurahMappingResources#2cc29ba3' of type [br.com.murah.audixpress.web.utils.MurahMappingResources] while setting bean property 'mappingLocations';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'br.com.murah.audixpress.web.utils.MurahMappingResources#2cc29ba3' defined in class path resource [br/com/murah/audixpress/core/config/context/applicationContext-DB.xml]: Instantiation of bean failed;
nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static java.lang.String[] br.com.murah.audixpress.web.utils.MurahMappingResources.extrair()] threw exception; 
nested exception is java.lang.IllegalArgumentException: InputStream cannot be null
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [spring-2.5.6.jar:2.5.6]
    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.6.0_45]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [spring-2.5.6.jar:2.5.6]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [spring-2.5.6.jar:2.5.6]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) [spring-2.5.6.jar:2.5.6]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) [spring-2.5.6.jar:2.5.6]
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) [spring-2.5.6.jar:2.5.6]
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93) [spring-2.5.6.jar:2.5.6]
    at br.com.murah.audixpress.web.inicializacao.ContextLoaderAudi.loadParentContext(ContextLoaderAudi.java:26) [classes:]
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:195) [spring-2.5.6.jar:2.5.6]
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) [spring-2.5.6.jar:2.5.6]
    at br.com.murah.audixpress.web.inicializacao.InicializadorListener.contextInitialized(InicializadorListener.java:134) [classes:]
    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$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

error2-log:

00:51:55,006 ERROR [br.com.murah.audixpress.web.utils.MurahMessage] (http--127.0.0.1-8080-1) Erro no key: Idioma_Portugues, Resource: GERAL: java.util.MissingResourceException: Can't find bundle for base name br.com.murah.audixpress.core.messageResourcesTemp.MessageResources_geral, locale en_US
    at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427) [rt.jar:1.6.0_45]
    at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250) [rt.jar:1.6.0_45]
    at java.util.ResourceBundle.getBundle(ResourceBundle.java:952) [rt.jar:1.6.0_45]
    at com.sun.faces.application.ApplicationResourceBundle.getResourceBundle(ApplicationResourceBundle.java:124) [jsf-impl.jar:1.2_12-b01-FCS]
    at com.sun.faces.application.ApplicationAssociate.getResourceBundle(ApplicationAssociate.java:490) [jsf-impl.jar:1.2_12-b01-FCS]
    at com.sun.faces.application.ApplicationImpl.getResourceBundle(ApplicationImpl.java:414) [jsf-impl.jar:1.2_12-b01-FCS]
    at br.com.murah.audixpress.web.utils.MurahMessage.getMessage(MurahMessage.java:512) [classes:]
    at br.com.murah.audixpress.web.utils.MurahMessage.access$0(MurahMessage.java:500) [classes:]
    at br.com.murah.audixpress.web.utils.MurahMessage$Geral.getMessage(MurahMessage.java:419) [classes:]
    at br.com.murah.audixpress.core.utils.view.LocaleUtils.<clinit>(LocaleUtils.java:34) [classes:]
    at br.com.murah.audixpress.core.utils.view.LocaleExterno.getListaLocale(LocaleExterno.java:66) [classes:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_45]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_45]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_45]
    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_45]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:302) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
    at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) [jsf-impl.jar:1.2_12-b01-FCS]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:169) [jbossweb-7.0.13.Final.jar:]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) [jbossweb-7.0.13.Final.jar:]
    at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.jstl.core.ForEachHandler.apply(ForEachHandler.java:121) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.ui.DefineHandler.applyDefinition(DefineHandler.java:64) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:131) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:337) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:307) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:109) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567) [jsf-facelets-1.1.15.B1.jar:1.1.15.B1]
    at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100) [richfaces-api-3.3.3.Final.jar:3.3.3.Final]
    at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) [jsf-impl.jar:1.2_12-b01-FCS]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) [jsf-impl.jar:1.2_12-b01-FCS]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl.jar:1.2_12-b01-FCS]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) [jsf-api-1.2_15-jbossorg-2.jar:1.2_15.jbossorg-1-20111019-SNAPSHOT]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515) [richfaces-impl-3.3.3.Final.jar:3.3.3.Final]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at br.com.murah.audixpress.core.servlets.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:58) [classes:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at br.com.murah.audixpress.web.springSecurity.PrazoExpiracaoSenhaFilter.doFilter(PrazoExpiracaoSenhaFilter.java:48) [classes:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:169) [spring-security-core-2.0.4.jar:2.0.4]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) [spring-2.5.6.jar:2.5.6]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [spring-2.5.6.jar:2.5.6]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at br.com.murah.audixpress.web.view.MurahExceptionFilter.doFilter(MurahExceptionFilter.java:51) [classes:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83) [spring-2.5.6.jar:2.5.6]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [spring-2.5.6.jar:2.5.6]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) [spring-2.5.6.jar:2.5.6]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [spring-2.5.6.jar:2.5.6]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at br.com.murah.audixpress.web.view.MurahControlFilter.doFilter(MurahControlFilter.java:100) [classes:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

0 个答案:

没有答案