请稍候...

Liberty发布会 WAS v8.5.5产品安装配置系列视频教程
返回列表 收藏 关注 分享

求助:项目部署到WebSphere6.1下报错![已解决]

项目在tomcat下可以正常启动,部署到WebSphere6.1下启动报错。

    项目使用了Spring进行远程访问与Web服务功能中的HTTP调用器暴露进行接口发布.

------------------------------------------------异常---------------------------------------
06 七月 2010 17:07:21,437 tainer : 1 INFO  factory.support.DefaultListableBeanFactory         Pre-instantiating singletons in [url=mailtorg.springframework.beans.factory.support.DefaultListableBeanFactory@236a236a]org.springframework.beans.factory.support.DefaultListableBeanFactory@236a236a[/url]: defining beans []; root of factory hierarchy
06 七月 2010 17:07:21,437 tainer : 1 INFO  web.context.ContextLoader                          Root WebApplicationContext: initialization completed in 328 ms
06 七月 2010 17:07:21,531 tainer : 1 INFO  web.servlet.DispatcherServlet                      FrameworkServlet 'remoting': initialization started
06 七月 2010 17:07:21,531 tainer : 1 INFO  context.support.XmlWebApplicationContext           Refreshing [url=mailtorg.springframework.web.context.support.XmlWebApplicationContext@55c455c4]org.springframework.web.context.support.XmlWebApplicationContext@55c455c4[/url]: display name [WebApplicationContext for namespace 'remoting-servlet']; startup date [Tue Jul 06 17:07:21 CST 2010]; parent: [url=mailtorg.springframework.web.context.support.XmlWebApplicationContext@777a777a]org.springframework.web.context.support.XmlWebApplicationContext@777a777a[/url]
06 七月 2010 17:07:21,531 tainer : 1 INFO  factory.xml.XmlBeanDefinitionReader                Loading XML bean definitions from ServletContext resource [/WEB-INF/remoting-servlet.xml]
06 七月 2010 17:07:21,625 tainer : 1 INFO  context.support.XmlWebApplicationContext           Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@55c455c4]: org.springframework.beans.factory.support.DefaultListableBeanFactory@79327932
06 七月 2010 17:07:21,640 tainer : 1 INFO  factory.support.DefaultListableBeanFactory         Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@79327932: defining beans [/tradeService,/bondTradeService,/slTradeService,/organizationService,/crepoTradeService,/repoTradeService,/issueService,/groupService,/productParamService,/traderService,/normQuoteService,/quoteService,/issueCflService,/eventService,/currencyService,/organizationAccountService,/holidayService,/holidayDateService,/locationService,/loggerService,/announceMentService,/quoteHisService,/tradeDetailsService,/tradeTotalService,/runStatusService,/nfaqsIfaceDomainService]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@236a236a
06 七月 2010 17:07:21,671 tainer : 1 INFO  factory.support.DefaultListableBeanFactory         Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@79327932: defining beans [/tradeService,/bondTradeService,/slTradeService,/organizationService,/crepoTradeService,/repoTradeService,/issueService,/groupService,/productParamService,/traderService,/normQuoteService,/quoteService,/issueCflService,/eventService,/currencyService,/organizationAccountService,/holidayService,/holidayDateService,/locationService,/loggerService,/announceMentService,/quoteHisService,/tradeDetailsService,/tradeTotalService,/runStatusService,/nfaqsIfaceDomainService]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@236a236a
06 七月 2010 17:07:21,671 tainer : 1 ERROR web.servlet.DispatcherServlet                      Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/tradeService' defined in ServletContext resource [/WEB-INF/remoting-servlet.xml]: Cannot resolve reference to bean 'tradeService' while setting bean property 'service'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'tradeService' is defined
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:354)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:292)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:262)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:316)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1119)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:149)
at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:99)
at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:741)
at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:421)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:274)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271)
at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:606)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:333)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:549)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1295)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(D


            -----web.xml------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>nfaqs</display-name>
    <context-param>
  <param-name>log4jConfigLocation</param-name>
  <param-value>classpath:/log4j.properties</param-value>
</context-param>
<listener>
   <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>
  <context-param>
      <param-name>contextConfigLocation</param-name>
     <param-value>classpath:/*Context.xml</param-value>
</context-param>
<listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
  </listener-class>
   </listener>
   <servlet>
  <servlet-name>remoting</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <!--
  <init-param>
   <param-name>contextConfigLocation</param-name>
   <param-value>
    <param-value>classpath:/*Context.xml</param-value>
   </param-value>
  </init-param>  -->
  <load-on-startup>1</load-on-startup>  
</servlet>

    <servlet-mapping>
  <servlet-name>remoting</servlet-name>
  <url-pattern>/remoting/*</url-pattern>
</servlet-mapping>
   
</web-app>

0

application-context.xml文件了?
可能与这个文件的头部声明有关。
1

评分人数

    • aixclub: 感谢对问题解答 社区金钱 + 3 W币

0

本帖最后由 zlongyue 于 2010-7-7 15:41 编辑

解决了,是加载配置文件引起的
-----web.xml------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>nfaqs</display-name>
    <context-param>
  <param-name>log4jConfigLocation</param-name>
  <param-value>classpath:/log4j.properties</param-value>
</context-param>
<listener>
   <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>
  <context-param>
      <param-name>contextConfigLocation</param-name>
<!--这种在WebSphere的时候加载出错
     <param-value>classpath:/*Context.xml</param-value>
-->
<param-value>/WEB-INF/classes/DefaultContext.xml,/WEB-INF/classes/NFAQSContext.xml</param-value></context-param>
<listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
  </listener-class>
   </listener>
   <servlet>
  <servlet-name>remoting</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <load-on-startup>1</load-on-startup>  
</servlet>

    <servlet-mapping>
  <servlet-name>remoting</servlet-name>
  <url-pattern>/remoting/*</url-pattern>
</servlet-mapping>
   
</web-app>
1

评分人数

    • aixclub: 感谢分享解决问题的方法! 社区金钱 + 5 W币

0

<param-value>classpath:/*Context.xml</param-value>
==>
<param-value>classpath*:**/*Context.xml</param-value>
试试
1

评分人数

    • aixclub: 感谢提出另一种解决方法 社区金钱 + 5 W币

0

返回列表
高级模式 | 发布话题
B Color Image Link Quote Code Smilies

返回顶部
微信扫描二维码
关注社区最新动态