“当部署到Tomcat中时,可能需要(重新)编译GWT模块,并且使用maven生成战争

时间:2012-07-18 15:49:01

标签: gwt spring-mvc mojo gwt-2.4 gwt-maven-plugin

我在访问网址时遇到了问题(“GWT模块'SmartWPS'可能需要(重新)编译”)。我通过运行maven-clean-install生成了war文件。我将相同的war文件放在/ webapp文件夹中。

我使用GWT开发了应用程序,客户端GIN作为依赖注入,服务器端作为Spring依赖注入。当我运行maven-clean-install时,war文件正在成功生成。将war文件放在/ webapp 文件夹中后,我在tomcat日志文件夹中看到以下错误

  

2012年7月18日下午8:43:02 org.apache.catalina.core.ApplicationContext   log SEVERE:StandardWrapper.Throwable   org.springframework.beans.factory.BeanCreationException:错误   在ServletContext中定义名为'urlMapping'的bean   resource [/WEB-INF/spring/spring-servlet.xml]:bean的初始化   失败;嵌套异常是   org.springframework.beans.factory.BeanCreationException:错误   创建名为'empDetailsController'的bean   ServletContext资源[/WEB-INF/spring/spring-servlet.xml]:不能   创建内部bean   'com.infor.ion.boddesk.ui.sample.server.EmployeeDetailsS​​erviceImpl#ca56214'   类型   [com.infor.ion.boddesk.ui.sample.server.EmployeeDetailsS​​erviceImpl]   设置bean属性'remoteService';嵌套异常是   org.springframework.beans.factory.BeanCreationException:错误   用名字创建bean   'com.infor.ion.boddesk.ui.sample.server.EmployeeDetailsS​​erviceImpl#ca56214'   在ServletContext资源中定义   [/WEB-INF/spring/spring-servlet.xml]:bean的实例化失败;   嵌套异常是   org.springframework.beans.BeanInstantiationException:不能   实例化bean类   [com.infor.ion.boddesk.ui.sample.server.EmployeeDetailsS​​erviceImpl]:   构造函数抛出异常;嵌套异常是   com.sun.jersey.api.client.ClientHandlerException:   java.net.ConnectException:连接超时:connect at   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)     在   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)     在   org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:291)     在   org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)     在   org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)     在   org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)     在   org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)     在   org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)     在   org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)     在   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)     在   org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)     在   org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)     在   org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)     在   org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)

我的spring-servlet.xml文件与下面粘贴的一样,

  

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd“>

<!-- The application context definition for the DispatcherServlet -->

<!-- Maps the request through to a concrete controller instance -->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
        <value>
        <!-- /**/SampleApp.rpc=sampleAppController -->
        /**/empDetails.rpc=empDetailsController
        </value>
    </property>
</bean>

<!-- GwtRpcController wraps our service in order to decode the incoming -->
<!-- request then delegates processing of the call to the POJO service -->
<!-- and then encodes the return value forwarding the response. -->    <!--<bean id="sampleAppController" class="com.infor.ion.boddesk.server.GwtRpcController">
    <property name="remoteService">
        <bean class="com.infor.ion.boddesk.server.sampleapp.SampleAppService" />
    </property>
</bean>  -->      <bean id="empDetailsController" class="com.infor.ion.boddesk.ui.sample.server.GwtRpcController">
    <property name="remoteService">
        <bean class="com.infor.ion.boddesk.ui.sample.server.EmployeeDetailsServiceImpl"
     

/&GT;                   

使用build.xml启用maven iam面对所有这些问题时,它只是成功,甚至在jetty服务器中运行成功。

谢谢, 萨里萨

1 个答案:

答案 0 :(得分:0)

清理临时文件(运行&gt;%temp%) 清理项目(在IDE中) 清理浏览器的缓存。(使用CCleaner) 再次编译项目。