Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4871

Null Pointer Exception in AxisService.printXSD

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.2
    • 1.5.4, 1.6.0
    • kernel
    • None
    • 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 != null) && (!"".equals(xsd)) ) {

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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jkroll 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