org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NullPointerException

SpringSource Issue Tracker | John Haren | 4 years ago
  1. 0

    I can't launch any grails 2.1.1 apps via the built-in vFabric server: SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NullPointerException at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:118) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.NullPointerException at java.lang.String.contains(String.java:2103) at java_lang_String$contains.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at grails.plugin.databasemigration.MigrationUtils.canAutoMigrate(MigrationUtils.groovy:149) The problem seems to be that MigrationUtils.canAutoMigrate() method hits line 149: // in run-app if (autoMigrateScripts.contains(scriptName)) {... but the .contains call throws an NPE because scriptName isn't set, because it wasn't launched with a grails run-app command, as per the comment on line 46: /** Set from _Events.groovy in eventPackageAppEnd. */ static String scriptName My understanding is that everything should be configured to run the app as a war. Any configurations I can check? I'm using Groovy/Grails Tool Suite Version: 3.0.0.RELEASE Build Id: 201208091018

    SpringSource Issue Tracker | 4 years ago | John Haren
    org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NullPointerException
  2. 0

    I can't launch any grails 2.1.1 apps via the built-in vFabric server: SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NullPointerException at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:118) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.NullPointerException at java.lang.String.contains(String.java:2103) at java_lang_String$contains.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at grails.plugin.databasemigration.MigrationUtils.canAutoMigrate(MigrationUtils.groovy:149) The problem seems to be that MigrationUtils.canAutoMigrate() method hits line 149: // in run-app if (autoMigrateScripts.contains(scriptName)) {... but the .contains call throws an NPE because scriptName isn't set, because it wasn't launched with a grails run-app command, as per the comment on line 46: /** Set from _Events.groovy in eventPackageAppEnd. */ static String scriptName My understanding is that everything should be configured to run the app as a war. Any configurations I can check? I'm using Groovy/Grails Tool Suite Version: 3.0.0.RELEASE Build Id: 201208091018

    SpringSource Issue Tracker | 4 years ago | John Haren
    org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NullPointerException
  3. 0

    [jira] Created: (MNG-5157) NPE stemming from DefaultModelBuilder.containsCoordinates - Grokbase

    grokbase.com | 1 year ago
    org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    jboss forge cannot setup plugins

    Stack Overflow | 4 years ago
    java.lang.NullPointerException
  6. 0

    Camel - Users - @PropertyInject throws exception

    nabble.com | 6 months ago
    java.lang.NullPointerException

  1. Mihail Melnic 2 times, last 7 months ago
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.lang.String.contains()
  2. Java RT
    String.contains
    1. java.lang.String.contains(String.java:2103)
    1 frame
  3. Unknown
    java_lang_String$contains.call
    1. java_lang_String$contains.call(Unknown Source)
    1 frame
  4. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    3 frames
  5. grails.plugin.databasemigration
    MigrationUtils.canAutoMigrate
    1. grails.plugin.databasemigration.MigrationUtils.canAutoMigrate(MigrationUtils.groovy:149)
    1 frame