简体   繁体   English

将Grails(2.2.4)应用程序从JBoss 5.1迁移到Wildfly 8.2.1

[英]Migrating Grails (2.2.4) application from JBoss 5.1 to Wildfly 8.2.1

I am new to grails and trying to migrate a Grails (2.2.4) application (on jdk 1.6) from JBOSS 5.1 to Wildfly 8.2.1 server. 我是grails的新手,并尝试将Grails(2.2.4)应用程序(在jdk 1.6上)从JBOSS 5.1迁移到Wildfly 8.2.1服务器。 As wildfly takes default class-loader,I commented out class-loading tag in jboss-web.xml. 由于wildfly需要默认的class-loader,我在jboss-web.xml中注释掉了class-loading标签。 After this, I did following steps. 此后,我做了以下步骤。

  1. run command: grails test war. 运行命令:grails测试战争。
  2. deploy on wildfly 8.2.1 部署在wildfly 8.2.1上

The deployment failed with error: 部署失败,并出现以下错误:

 ERROR [StackTrace] (MSC service thread 1-5) Full Stack Trace:: org.springframework.beans.factory.BeanCreationException: **Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: ** Invocation of init method failed; nested exception is java.lang.NullPointerException: Cannot invoke method getAt() on null object

ApplicationContext.xml looks like this: ApplicationContext.xml看起来像这样:

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 <bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
        <description>Grails application factory bean</description>
        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
        <property name="grailsResourceLoader" ref="grailsResourceLoader" />
    </bean>

    <bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
        <description>A bean that manages Grails plugins</description>
        <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
        <property name="application" ref="grailsApplication" />
    </bean>

    <bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
        <constructor-arg>
            <ref bean="grailsApplication" />
        </constructor-arg>
        <property name="pluginManager" ref="pluginManager" />
    </bean>

    <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean" />

    <bean id="characterEncodingFilter" class="org.springframework.web.filter.CharacterEncodingFilter">
        <property name="encoding">
            <value>utf-8</value>
        </property>
    </bean>
</beans>

As per suggestions given in other posts, I tried to deploy after removing "grailsResourceLoader" bean (as it is deprecated) and its ref, but still same issue occurs. 根据其他帖子中给出的建议,我尝试在删除“ grailsResourceLoader” bean(已弃用)及其引用之后进行部署,但仍然会发生同样的问题。 I used jdk 1.6 as well as 1.7 for appplication, but of no use. 我将jdk 1.6和1.7用于应用程序,但没有用。

Any other files that need to be changed for configurations to run on wildfly 8.2.1 ? 是否需要更改其他任何文件才能在Wildfly 8.2.1上运行配置? any ides what can be the issue? 任何想法可能是什么问题? Thanks. 谢谢。

能够通过将项目和Wildfly 8.2.1的jdk版本更改为1.7来部署战争

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM