Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apache tomcat: error in startup grails application

I've deployed a Grails war into a server in which I've installed Apache Tomcat 7, but it does not start. Here is the stacktrace, given in catalina.out:

2014-07-05 12:07:55,875 [http-bio-8080-exec-53] ERROR context.ContextLoader  - Context initialization failed 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invo
cation of init method failed; nested exception is java.lang.NullPointerException: Cannot invoke method getAt() on null object
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    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.NullPointerException: Cannot invoke method getAt() on null object
    ... 5 more
2014-07-05 12:07:55,883 [http-bio-8080-exec-53] ERROR context.GrailsContextLoader  - 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.NullPointerException: Cannot invoke method getAt() on
null object
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invo
cation of init method failed; nested exception is java.lang.NullPointerException: Cannot       invoke method getAt() on null object
    at    com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    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.NullPointerException: Cannot invoke method getAt() on null object
    ... 5 more
2014-07-05 12:07:55,886 [http-bio-8080-exec-53] ERROR context.GrailsContextLoader  -     Error initializing Grails: Error creating bean with name 'pluginManager' defined in ServletC
 ontext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed;  nested exception is java.lang.NullPointerException: Cannot invoke method getAt() on null obj 
 ect
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invo
cation of init method failed; nested exception is java.lang.NullPointerException: Cannot    invoke method getAt() on null object
     at      com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.j ava:819)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
     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.NullPointerException: Cannot invoke method getAt() on null object
     ... 5 more

Any suggestion about it?

EDIT: the tomcat version in which war does not work is 7.0.54. I've previously used, in another machine, an earlier version (7.0.26) and war starts.

like image 610
FrancescoDS Avatar asked Jul 05 '14 10:07

FrancescoDS


1 Answers

I had the same problem trying to run my Grails 2.2.4 project on Ubuntu 16.04 beta and as Tomasz mentioned in the comment, it seems to be a combination of an old Grails version, Java 8 and newer versions of tomcat. Both tomcat 7 and tomcat 8 have the same issue. I solved the problem by upgrading my Grails project to Grails 2.3.11, which was as far as I could go without massive refactoring of the code. Switching to older tomcat or Java 7 was not an option for me.

like image 95
stenix Avatar answered Sep 29 '22 00:09

stenix