java.lang.NullPointerException

Spring JIRA | Andrew Swan | 6 years ago
  1. 0

    To re-create: # Create a script {{app.roo}} like so: {code}project --topLevelPackage com.foo persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity --class ~.Foo --testAutomatically field string --fieldName name{code} # From the bash prompt, run "roo.sh script app.roo" Roo emits the following output: {code} ____ ____ ____ / __ \/ __ \/ __ \ / /_/ / / / / / / / / _, _/ /_/ / /_/ / /_/ |_|\____/\____/ 1.1.4.RELEASE [rev f787ce7] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. project --topLevelPackage com.foo Created ROOT/pom.xml Created SRC_MAIN_JAVA Please wait - still loading Created SRC_MAIN_RESOURCES Created SRC_TEST_JAVA Please wait - still loading Created SRC_TEST_RESOURCES Created SRC_MAIN_WEBAPP Created SRC_MAIN_RESOURCES/META-INF/spring Created SRC_MAIN_RESOURCES/log4j.properties Created SRC_MAIN_RESOURCES/META-INF/spring/applicationContext.xml persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY Please wait - still loading Created SRC_MAIN_RESOURCES/META-INF/spring/database.properties Updated ROOT/pom.xml [added dependencies org.hsqldb:hsqldb:1.8.0.10, org.hibernate:hibernate-core:3.6.3.Final, org.hibernate:hibernate-entitymanager:3.6.3.Final, org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final, org.hibernate:hibernate-validator:4.1.0.Final, javax.validation:validation-api:1.0.0.GA, cglib:cglib-nodep:2.2, javax.transaction:jta:1.1, o Please wait - still loading${spring.version}, org.springframework:spring-orm:${spring.version}, commons-pool:commons-pool:1.5.4, commons-dbcp:commons-dbcp:1.3; added repository https://repository.ories/releases] Downloaded 0% of roobot.xml.zip Updated SRC_MAIN_RESOURCES/META-INF/spring/applicationContext.xml Created SRC_MAIN_RESOURCES/META-INF/persistence.xml entity --class ~.Foo --testAutomatically Created SRC_MAIN_JAVA/com/foo Created SRC_MAIN_JAVA/com/foo/Foo.java Created SRC_TEST_JAVA/com/foo Created SRC_TEST_JAVA/com/foo/FooDataOnDemand.java Downloaded 0% of roobot.xml.zip Created SRC_TEST_JAVA/com/foo/FooIntegrationTest.java Created SRC_MAIN_JAVA/com/foo/Foo_Roo_Configurable.aj Created SRC_MAIN_JAVA/com/foo/Foo_Roo_Entity.aj Created SRC_MAIN_JAVA/com/foo/Foo_Roo_ToString.aj Created SRC_TEST_JAVA/com/foo/FooDataOnDemand_Roo_Configurable.aj Created SRC_TEST_JAVA/com/foo/FooDataOnDemand_Roo_DataOnDemand.aj Created SRC_TEST_JAVA/com/foo/FooIntegrationTest_Roo_Configurable.aj Created SRC_TEST_JAVA/com/foo/FooIntegrationTest_Roo_IntegrationTest.aj Downloaded 0% of roobot.xml.zip field string --fieldName name Updated SRC_MAIN_JAVA/com/foo/Foo.java Created SRC_MAIN_JAVA/com/foo/Foo_Roo_JavaBean.aj Updated SRC_TEST_JAVA/com/foo/FooDataOnDemand_Roo_DataOnDemand.aj Updated SRC_MAIN_JAVA/com/foo/Foo_Roo_ToString.aj Script required 2 second(s) to execute Exception in thread "Spring Roo RooBot Add-In Index Eager Download" java.lang.NullPointerException at org.apache.felix.scr.impl.manager.ComponentContextImpl.getBundleContext(ComponentContextImpl.java:89) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.getUpgradableBundles(AddOnRooBotOperationsImpl.java:784) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.printAddonStats(AddOnRooBotOperationsImpl.java:675) Downloaded 0% of roobot.xml.zip at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.populateBundleCache(AddOnRooBotOperationsImpl.java:667) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.access$100(AddOnRooBotOperationsImpl.java:59) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl$1.run(AddOnRooBotOperationsImpl.java:110) at java.lang.Thread.run(Thread.java:680){code} After clearing out the project directory and running that command again, the problem failed to recur.

    Spring JIRA | 6 years ago | Andrew Swan
    java.lang.NullPointerException
  2. 0

    To re-create: # Create a script {{app.roo}} like so: {code}project --topLevelPackage com.foo persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity --class ~.Foo --testAutomatically field string --fieldName name{code} # From the bash prompt, run "roo.sh script app.roo" Roo emits the following output: {code} ____ ____ ____ / __ \/ __ \/ __ \ / /_/ / / / / / / / / _, _/ /_/ / /_/ / /_/ |_|\____/\____/ 1.1.4.RELEASE [rev f787ce7] Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER. project --topLevelPackage com.foo Created ROOT/pom.xml Created SRC_MAIN_JAVA Please wait - still loading Created SRC_MAIN_RESOURCES Created SRC_TEST_JAVA Please wait - still loading Created SRC_TEST_RESOURCES Created SRC_MAIN_WEBAPP Created SRC_MAIN_RESOURCES/META-INF/spring Created SRC_MAIN_RESOURCES/log4j.properties Created SRC_MAIN_RESOURCES/META-INF/spring/applicationContext.xml persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY Please wait - still loading Created SRC_MAIN_RESOURCES/META-INF/spring/database.properties Updated ROOT/pom.xml [added dependencies org.hsqldb:hsqldb:1.8.0.10, org.hibernate:hibernate-core:3.6.3.Final, org.hibernate:hibernate-entitymanager:3.6.3.Final, org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final, org.hibernate:hibernate-validator:4.1.0.Final, javax.validation:validation-api:1.0.0.GA, cglib:cglib-nodep:2.2, javax.transaction:jta:1.1, o Please wait - still loading${spring.version}, org.springframework:spring-orm:${spring.version}, commons-pool:commons-pool:1.5.4, commons-dbcp:commons-dbcp:1.3; added repository https://repository.ories/releases] Downloaded 0% of roobot.xml.zip Updated SRC_MAIN_RESOURCES/META-INF/spring/applicationContext.xml Created SRC_MAIN_RESOURCES/META-INF/persistence.xml entity --class ~.Foo --testAutomatically Created SRC_MAIN_JAVA/com/foo Created SRC_MAIN_JAVA/com/foo/Foo.java Created SRC_TEST_JAVA/com/foo Created SRC_TEST_JAVA/com/foo/FooDataOnDemand.java Downloaded 0% of roobot.xml.zip Created SRC_TEST_JAVA/com/foo/FooIntegrationTest.java Created SRC_MAIN_JAVA/com/foo/Foo_Roo_Configurable.aj Created SRC_MAIN_JAVA/com/foo/Foo_Roo_Entity.aj Created SRC_MAIN_JAVA/com/foo/Foo_Roo_ToString.aj Created SRC_TEST_JAVA/com/foo/FooDataOnDemand_Roo_Configurable.aj Created SRC_TEST_JAVA/com/foo/FooDataOnDemand_Roo_DataOnDemand.aj Created SRC_TEST_JAVA/com/foo/FooIntegrationTest_Roo_Configurable.aj Created SRC_TEST_JAVA/com/foo/FooIntegrationTest_Roo_IntegrationTest.aj Downloaded 0% of roobot.xml.zip field string --fieldName name Updated SRC_MAIN_JAVA/com/foo/Foo.java Created SRC_MAIN_JAVA/com/foo/Foo_Roo_JavaBean.aj Updated SRC_TEST_JAVA/com/foo/FooDataOnDemand_Roo_DataOnDemand.aj Updated SRC_MAIN_JAVA/com/foo/Foo_Roo_ToString.aj Script required 2 second(s) to execute Exception in thread "Spring Roo RooBot Add-In Index Eager Download" java.lang.NullPointerException at org.apache.felix.scr.impl.manager.ComponentContextImpl.getBundleContext(ComponentContextImpl.java:89) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.getUpgradableBundles(AddOnRooBotOperationsImpl.java:784) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.printAddonStats(AddOnRooBotOperationsImpl.java:675) Downloaded 0% of roobot.xml.zip at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.populateBundleCache(AddOnRooBotOperationsImpl.java:667) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.access$100(AddOnRooBotOperationsImpl.java:59) at org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl$1.run(AddOnRooBotOperationsImpl.java:110) at java.lang.Thread.run(Thread.java:680){code} After clearing out the project directory and running that command again, the problem failed to recur.

    Spring JIRA | 6 years ago | Andrew Swan
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException

    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 org.apache.felix.scr.impl.manager.ComponentContextImpl.getBundleContext()
    2. Apache Felix Declarative Services
      ComponentContextImpl.getBundleContext
      1. org.apache.felix.scr.impl.manager.ComponentContextImpl.getBundleContext(ComponentContextImpl.java:89)
      1 frame
    3. org.springframework.roo
      AddOnRooBotOperationsImpl.getUpgradableBundles
      1. org.springframework.roo.addon.roobot.client.AddOnRooBotOperationsImpl.getUpgradableBundles(AddOnRooBotOperationsImpl.java:784)
      1 frame