Home Issue while upgrading Grails to 2.4.0 from 2.1.4 & JDK to 1.8 from 1.7
Reply: 0

Issue while upgrading Grails to 2.4.0 from 2.1.4 & JDK to 1.8 from 1.7

user4071
1#
user4071 Published in June 21, 2018, 8:42 am

We have an application which was implemented by grails 2.1.4 & JDK 1.7 which we need to migrate to grails 2.4.0 and JDK 1.8.

While updating to grails 2.4.0, below are the changes done from our end.

  1. Updated all plugins in BuildConfig.groovy and application.properties files.
  2. Many classes are deprecated, so I have used grails.util.Holders class instead of below deprecated classes.

    org.codehaus.groovy.grails.commons.ApplicationHolder org.codehaus.groovy.grails.commons.ConfigurationHolder org.codehaus.groovy.grails.plugins.PluginManagerHolder

  3. For few classes, I have changed the import packages as per grails 2.4.0

  4. Latest richUI plugin is not available, so I have updated Holders class instead of ConfigurationHolder in richUI plugin groovy classes.

Built the war successfully and deployed war in tomcat.

Issue is unable to redirect the link from urlmappings.groovy to home controller and appropriate gsp.

  1. Tried to redirect to another gsp within project(index.gsp) but it couldn’t.
  2. Created new gsp(hello.gsp) and redirect to hello.gsp from urlmappings.groovy but it did not work.

When trying to load the application URL http://localhost:8080/abc, it will redirect to http://localhost:8080/abc/login/auth showing page cannot be displayed

While debugging, control goes from urlmappings.groovy to bootstrap.groovy and further it is not navigating anywhere.

Any help appreciated. Thanks in advance

Adding Urlmappings.groovy

static mappings = {
"/$controller/$action?/$id?"{ constraints {
// apply constraints here
} }

// Home
"/"(controller:"home",action:"index")

// Reports service urls
"/services/report"(controller: "BirtReport"){
action=[GET:"list"]
}

"500"(view:'/error')
}

While running the application I am receiving the below error in the stacktrace.log

ERROR context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass 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.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
... 4 more
Caused by: java.lang.NoClassDefFoundError: org/pentaho/di/core/logging/LogLevel
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
at java.lang.Class.getDeclaredMethods(Class.java:1967)
... 4 more
Caused by: java.lang.ClassNotFoundException: org.pentaho.di.core.logging.LogLevel
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO