Home Migrating Grails (2.2.4) application from JBoss 5.1 to Wildfly 8.2.1
Reply: 0

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

user2965
1#
user2965 Published in May 25, 2018, 6:52 pm

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.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307431 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO