Axis2
  1. Axis2
  2. AXIS2-4871

Null Pointer Exception in AxisService.printXSD

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.5.4, 1.6.0
    • Component/s: kernel
    • Labels:
      None
    • Environment:
      Test run on Websphere 6.1 application server

      Description

      For the generic unqualified schema request (for example: http://<host name>/axis2/services/Version?xsd the following exception is thrown:

      java.lang.NullPointerException
      at org.apache.axis2.description.AxisService.printXSD(AxisService.java:1235)
      at org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:277)
      at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:249)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

      The problem seems to be related to the fact that for the unqualified case the argument for the schema name is null, not an empty string. Changing the name test in line 1232 of modules/kernel/src/org/apache/axis2/description/AxisService.java to include a null pointer check seems to resolve this issue. Sample change:

      < revision
      > original

      1232,1233c1232
      < // Unqualified schema request can be a null string
      < if ( (xsd Unable to render embedded object: File (= null) && () not found."".equals(xsd)) ) {

      > if (!"".equals(xsd)) {

        Issue Links

          Activity

          Hide
          Andreas Veithen added a comment -

          Fixed by the changes doen for AXIS2-4674.

          Show
          Andreas Veithen added a comment - Fixed by the changes doen for AXIS2-4674 .
          Hide
          Andreas Veithen added a comment -

          Targeting this for 1.5.4.

          Show
          Andreas Veithen added a comment - Targeting this for 1.5.4.
          Hide
          Andreas Veithen added a comment -

          OK, now I understand. It looks like this is the same (type of) issue as AXIS2-4674.

          Show
          Andreas Veithen added a comment - OK, now I understand. It looks like this is the same (type of) issue as AXIS2-4674 .
          Hide
          John Kroll added a comment -

          By unqualified schema I mean by requesting the schema without a name.

          For example: Version?xsd as opposed to Version?xsd=SomeName

          Show
          John Kroll added a comment - By unqualified schema I mean by requesting the schema without a name. For example: Version?xsd as opposed to Version?xsd=SomeName
          Hide
          Andreas Veithen added a comment -

          What do you mean exactly by "retrieving an unqualified schema"?

          Show
          Andreas Veithen added a comment - What do you mean exactly by "retrieving an unqualified schema"?
          Hide
          John Kroll added a comment -

          Test environment: Websphere 6.1 Network Deployment, Fix Pack 23 (6.1.0.23) on Windows Server 2003, using the standard Axis2 1.5.2 distribution. HTTP requests are forwarded to the application server by an IBM HTTP Server 6.1.0.31.

          Attempting to retrieve an unqualified schema for the Version service (originally found while testing a custom web service, but replicated using the Version web service on the standard Axis2.war) results in the above listed null pointer exception 100% of the time.

          Show
          John Kroll added a comment - Test environment: Websphere 6.1 Network Deployment, Fix Pack 23 (6.1.0.23) on Windows Server 2003, using the standard Axis2 1.5.2 distribution. HTTP requests are forwarded to the application server by an IBM HTTP Server 6.1.0.31. Attempting to retrieve an unqualified schema for the Version service (originally found while testing a custom web service, but replicated using the Version web service on the standard Axis2.war) results in the above listed null pointer exception 100% of the time.
          Hide
          Andreas Veithen added a comment -

          Can you please explain the steps to reproduce the issue? With a standard Axis2 1.5.2 distribution, http://localhost:8080/axis2/services/Version?xsd doesn't trigger any exception.

          Show
          Andreas Veithen added a comment - Can you please explain the steps to reproduce the issue? With a standard Axis2 1.5.2 distribution, http://localhost:8080/axis2/services/Version?xsd doesn't trigger any exception.

            People

            • Assignee:
              Unassigned
              Reporter:
              John Kroll
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development