简体   繁体   中英

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. As wildfly takes default class-loader,I commented out class-loading tag in jboss-web.xml. After this, I did following steps.

  1. run command: grails test war.
  2. deploy on 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:

<?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. I used jdk 1.6 as well as 1.7 for appplication, but of no use.

Any other files that need to be changed for configurations to run on wildfly 8.2.1 ? any ides what can be the issue? Thanks.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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