java.lang.Exception: Unexpected exception, expected<java.lang.IllegalArgumentException> but was<java.lang.NullPointerException>

GitHub | Mikemosca | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    [R&R]uploadSolrClusterConfigurationZip()

    GitHub | 9 months ago | Mikemosca
    java.lang.Exception: Unexpected exception, expected<java.lang.IllegalArgumentException> but was<java.lang.NullPointerException>
  2. 0

    在很多手机上运行都不会报错,但是在台电平板上面运行会报错的方法。

    GitHub | 9 months ago | 395193253
    java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] java.lang.String.getBytes(java.nio.charset.Charset)' on a null object reference
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. Indri Yunita 2 times, last 1 month ago
1 unregistered visitors

Root Cause Analysis

  1. java.lang.NullPointerException

    content == null

    at okhttp3.RequestBody.create()
  2. okhttp3
    RequestBody.create
    1. okhttp3.RequestBody.create(RequestBody.java:103)
    1 frame
  3. com.ibm.watson
    RetrieveAndRankTest.testUploadClusterConfigZipNg1
    1. com.ibm.watson.developer_cloud.retrieve_and_rank.v1.RetrieveAndRank.createUploadSolrConfigurationRequest(RetrieveAndRank.java:439)
    2. com.ibm.watson.developer_cloud.retrieve_and_rank.v1.RetrieveAndRank.uploadSolrClusterConfigurationZip(RetrieveAndRank.java:431)
    3. com.ibm.watson.developer_cloud.retrieve_and_rank.v1.RetrieveAndRankTest.testUploadClusterConfigZipNg1(RetrieveAndRankTest.java:783)
    3 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
    4. java.lang.reflect.Method.invoke(Method.java:620)
    4 frames
  5. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:19)
    6. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    7. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    8. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    9. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    10. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    11. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    12. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    13. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    14. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    15. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    16. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    16 frames
  6. JUnit4 Runner
    JUnit4TestReference.run
    1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    1 frame
  7. JUnit3 Runner
    RemoteTestRunner.main
    1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    5 frames