java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.bits.fbpost/com.example.bits.fbpost.MainActivity}: java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Sharing to social media, specifically Facebook
    via Stack Overflow by x10sion
    ,
  • Add likebutton to android app
    via Stack Overflow by Endi Tóth
    ,
  • Hive bulk load into HBase
    via by Unknown author,
  • *Summary description* We have a product acceptance test suite that uses Thucydides & JUnit; this suite is one module in a maven multi-module project. Building the acceptance test module in isolation works perfectly well. Building the acceptance test module as a part of the aggregator project fails. *Reproduction steps:* * Restore the attached project * For verification: Navigate to the thucydidestests module and run mvn verify - the build should succeed. * In the top-level directory (aggregatorbug), run mvn verify *Expected result:* The project builds and the tests run to completion. *Actual result:* The tests fail after the first (in this example, only) test class, with the folowing exception: {quote} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test (default) on project thucydidestests: Execution default o f goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test failed: java.lang.reflect.InvocationTargetException; nested exception is java.lan g.reflect.InvocationTargetException: null: java.lang.NullPointerException; nested exception is java.lang.NullPointerException: null -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test (default) on project thucydidestests: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test failed: java.lang.reflect.Invocat ionTargetException; nested exception is java.lang.reflect.InvocationTargetException: null at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.12:integration-test f ailed: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.Inv ocationTargetException: null at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:197) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.plugin.surefire.InPluginVMSurefireStarter.runSuitesInProcess(InPluginVMSurefireStarter.java:74) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:194) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAllProviders(AbstractSurefireMojo.java:176) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:135) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:98) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) ... 20 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) ... 28 more Caused by: org.apache.maven.surefire.testset.TestSetFailedException: java.lang.NullPointerException; nested exception is java.lang.NullPointerException: null at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:166) at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:63) at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:139) ... 33 more Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:332) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:987) at org.apache.maven.surefire.junitcore.ConcurrentReporterManager.getTestSet(ConcurrentReporterManager.java:157) at org.apache.maven.surefire.junitcore.ConcurrentReporterManager.getOrCreateTestMethod(ConcurrentReporterManager.java:127) at org.apache.maven.surefire.junitcore.ConcurrentReporterManager.testError(ConcurrentReporterManager.java:83) at org.apache.maven.surefire.common.junit4.JUnit4RunListener.testFailure(JUnit4RunListener.java:110) at org.junit.runner.notification.RunNotifier$4.notifyListener(RunNotifier.java:139) at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:61) at org.junit.runner.notification.RunNotifier.fireTestFailures(RunNotifier.java:134) at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:128) at org.junit.internal.runners.model.EachTestNotifier.addFailure(EachTestNotifier.java:23) at org.junit.runners.ParentRunner.run(ParentRunner.java:315) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at org.junit.runner.JUnitCore.run(JUnitCore.java:138) at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:62) ... 34 more {quote} *Additional information:* When running with a debugger, the problem was tracked down to the following: {quote} null: Failed to generate reports using net.thucydides.core.reports.xml.XMLTestOutcomeReporter@7dc53a1d java.io.IOException: Directory 'target/site/thucydides' could not be created {quote}
    via by gareth.bragg,
  • NullPointerException
    via GitHub by Usnul
    ,
    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.bits.fbpost/com.example.bits.fbpost.MainActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) at android.app.ActivityThread.access$600(ActivityThread.java:130) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:767) at com.facebook.internal.Utility.getDialogFeatureConfig(Utility.java:907) at com.facebook.internal.DialogPresenter.getVersionSpecForFeature(DialogPresenter.java:255) at com.facebook.internal.DialogPresenter.getProtocolVersionForNativeDialog(DialogPresenter.java:241) at com.facebook.internal.DialogPresenter.canPresentNativeDialogWithFeature(DialogPresenter.java:75) at com.facebook.share.widget.ShareDialog.canShowNative(ShareDialog.java:153) at com.facebook.share.widget.ShareDialog.access$300(ShareDialog.java:56) at com.facebook.share.widget.ShareDialog$NativeHandler.canShow(ShareDialog.java:304) at com.facebook.share.widget.ShareDialog$NativeHandler.canShow(ShareDialog.java:275) at com.facebook.internal.FacebookDialogBase.canShowImpl(FacebookDialogBase.java:135) at com.facebook.internal.FacebookDialogBase.canShow(FacebookDialogBase.java:122) at com.facebook.share.widget.ShareButtonBase.canShare(ShareButtonBase.java:160) at com.facebook.share.widget.ShareButtonBase.setShareContent(ShareButtonBase.java:76) at com.example.bits.fbpost.MainActivity.onCreate(MainActivity.java:103) at android.app.Activity.performCreate(Activity.java:5008) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)

    Users with the same issue

    musketyr
    musketyr6 times, last one,
    Hronom
    Hronom201 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    20 more bugmates