java.lang.NullPointerException

Atlassian JIRA | TeckEn Yew | 4 years ago
  1. 0

    h4. Problem Description: LDAP connector or (Crowd application with LDAP connector) has been one of customer favourite configuration. However, there are times that the user would be leave the company and some administrator would remove that inactive user from LDAP directory. Thus, it caused that the user to be removed the directory within crowd or JIRA. However, the removed user would still be remain as the assignee of some issues although the user and the associated membership were completely removed from related directory. We can still update a ticket which the assignee was the removed user through the GUI edit operation or inline edit. However, when trying to update or transition through REST API or REST client, the update operation failed. h5. Step to Reproduce: # Create a user(eg. testuser) in LDAP server # Setup a read only LDAP directory in JIRA (it can be achieve through crowd connected to Read Only LDAP connector) then synchronize the directory to allow the user added into JIRA # Ensure the user has the assignable permission. For easier replication, grant user all the groups permission. # Create a test issue and assign to the testuser # Remove the user from LDAP server # Perform the any update cURL command or update an issue through REST client and the error will be show up. h5. cURL command triggered: {code} curl -D- -u admin:admin -X POST --data @"Desktop\data.json" -H "Content-Type: application/json" http://localhost:8527/rest/api/2/issue/DEMO-15/transitions?expand=transitions.fields {code} h5. Error thrown in the command prompt: {code} HTTP/1.1 400 Bad Request Server: Apache-Coyote/1.1 X-AREQUESTID: 1330x1630x1 Set-Cookie: JSESSIONID=DBB357E7C30BC89A15A1944475C59D13; Path=/; HttpOnly X-Seraph-LoginReason: OK Set-Cookie: atlassian.xsrf.token=BQ3E-463Q-AVK1-5MLS|0c3a3da6067e31a4881f77b6ac2c58dbe39f9a37|lin; Path=/ X-ASESSIONID: 30rkz X-AUSERNAME: admin Cache-Control: no-cache, no-store, no-transform Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 27 Mar 2013 14:10:00 GMT Connection: close {"errorMessages":[],"errors":{"assignee":"User 'testuser' does not exist."}} {code} h5. Error thrown in the REST Client through IDE when run the project: {code} Exception in thread "main" java.lang.NullPointerException at RestTry.main(RestTry.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) {code} h5. Workaround Create the user back into the LDAP server without any group membership and synchronize the user back to JIRA. However, make sure the username still remain the same as the name it was removed earlier.

    Atlassian JIRA | 4 years ago | TeckEn Yew
    java.lang.NullPointerException
  2. 0

    h4. Problem Description: LDAP connector or (Crowd application with LDAP connector) has been one of customer favourite configuration. However, there are times that the user would be leave the company and some administrator would remove that inactive user from LDAP directory. Thus, it caused that the user to be removed the directory within crowd or JIRA. However, the removed user would still be remain as the assignee of some issues although the user and the associated membership were completely removed from related directory. We can still update a ticket which the assignee was the removed user through the GUI edit operation or inline edit. However, when trying to update or transition through REST API or REST client, the update operation failed. h5. Step to Reproduce: # Create a user(eg. testuser) in LDAP server # Setup a read only LDAP directory in JIRA (it can be achieve through crowd connected to Read Only LDAP connector) then synchronize the directory to allow the user added into JIRA # Ensure the user has the assignable permission. For easier replication, grant user all the groups permission. # Create a test issue and assign to the testuser # Remove the user from LDAP server # Perform the any update cURL command or update an issue through REST client and the error will be show up. h5. cURL command triggered: {code} curl -D- -u admin:admin -X POST --data @"Desktop\data.json" -H "Content-Type: application/json" http://localhost:8527/rest/api/2/issue/DEMO-15/transitions?expand=transitions.fields {code} h5. Error thrown in the command prompt: {code} HTTP/1.1 400 Bad Request Server: Apache-Coyote/1.1 X-AREQUESTID: 1330x1630x1 Set-Cookie: JSESSIONID=DBB357E7C30BC89A15A1944475C59D13; Path=/; HttpOnly X-Seraph-LoginReason: OK Set-Cookie: atlassian.xsrf.token=BQ3E-463Q-AVK1-5MLS|0c3a3da6067e31a4881f77b6ac2c58dbe39f9a37|lin; Path=/ X-ASESSIONID: 30rkz X-AUSERNAME: admin Cache-Control: no-cache, no-store, no-transform Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 27 Mar 2013 14:10:00 GMT Connection: close {"errorMessages":[],"errors":{"assignee":"User 'testuser' does not exist."}} {code} h5. Error thrown in the REST Client through IDE when run the project: {code} Exception in thread "main" java.lang.NullPointerException at RestTry.main(RestTry.java:40) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) {code} h5. Workaround Create the user back into the LDAP server without any group membership and synchronize the user back to JIRA. However, make sure the username still remain the same as the name it was removed earlier.

    Atlassian JIRA | 4 years ago | TeckEn Yew
    java.lang.NullPointerException
  3. 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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 RestTry.main()
    2. Unknown
      RestTry.main
      1. RestTry.main(RestTry.java:40)
      1 frame
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      1 frame