使用 CXF 插件将 Grails 项目部署到 WAS 8 时遇到问题



我对groovy/grails相当陌生,并试图将一个使用Grails 2.1.1CXF插件1.0.1grails应用程序(WAR文件)部署到WebSphere 8

这是我第一次将Grails 2.1.1应用程序部署到WebSphere 8,使用基于SOAP的Web服务的CXF插件,我遇到了一些问题。相同的应用程序在Tomcat上本地部署并运行良好,我能够访问我的Web服务并访问WSDL文件。

任何人都有这个问题或知道可能是什么问题,请帮助。下面是堆栈跟踪:

Original Exception:
Error Message: javax.servlet.ServletException: Filter [sitemesh]: could not be initialized
Error Code: 500
Target Servlet: CxfServlet
Error Stack: 
com.opensymphony.module.sitemesh.factory.FactoryException: Could not initialize DecoratorMapper : org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'groovyPageLayoutFinder' is defined 
     at com.opensymphony.module.sitemesh.factory.BaseFactory.pushDecoratorMapper(BaseFactory.java:117) 
     at org.codehaus.groovy.grails.web.sitemesh.Grails5535Factory.loadDecoratorMappers(Grails5535Factory.java:231) 
     at org.codehaus.groovy.grails.web.sitemesh.Grails5535Factory.loadConfig(Grails5535Factory.java:98) 
     at org.codehaus.groovy.grails.web.sitemesh.Grails5535Factory.<init>(Grails5535Factory.java:66) 
     at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.init(GrailsPageFilter.java:83) 
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:145) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:568) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:475) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:308) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:380) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:892) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) 
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3704) 
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) 
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962) 
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) 
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659) 
     Root cause: 
     org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'groovyPageLayoutFinder' is defined 
     at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553) 
     at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095) 
     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277) 
     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) 
     at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1102) 
     at org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper.init(GrailsLayoutDecoratorMapper.java:48) 
     at com.opensymphony.module.sitemesh.factory.BaseFactory.pushDecoratorMapper(BaseFactory.java:110) 
     at org.codehaus.groovy.grails.web.sitemesh.Grails5535Factory.loadDecoratorMappers(Grails5535Factory.java:231) 
     at org.codehaus.groovy.grails.web.sitemesh.Grails5535Factory.loadConfig(Grails5535Factory.java:98) 
     at org.codehaus.groovy.grails.web.sitemesh.Grails5535Factory.<init>(Grails5535Factory.java:66) 
     at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.init(GrailsPageFilter.java:83) 
     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init(FilterInstanceWrapper.java:145) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:568) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:475) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:308) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:380) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:892) 
     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025) 
     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3704) 
     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) 
     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962) 
     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) 
     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) 
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 
     at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 
     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 
     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)  a  

尝试将以下内容添加到 BuildConfig.groovy 中,以排除 JAXB 实现和 Apache 序列化程序相关库。

grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
            excludes ("serializer", "jaxb-impl")
    }
...
}

然后重建你的战争,看看它是否有效。

如果Tomcat上一切正常,这听起来像是与IBM Websphere的图书馆冲突。

请务必将类

装入器配置为"父类最后",以便应用程序将覆盖 WAS 库。

相关内容

  • 没有找到相关文章

最新更新