Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2175

DynamicClientFactory.setupClasspath throws a null pointer exception if URI contains undefined path.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4
    • 2.1.5, 2.2.1
    • JAXB Databinding
    • None
    • Glassfish v2.1/v2ur2, Windows Vista x64, Windows Server 2003, JDK 1.6.0_11

    • Novice

    Description

      On Glassfish, DynamicClientFactory.setupClasspath sometimes throws NullPointerExcpetion.
      I catch the exception happened position at line 566:

      565: try

      { 566: file = new File(url.toURI().getPath()); 567: }

      catch (URISyntaxException urise)

      { 568: file = new File(url.getPath()); 569: }

      The url.toURI().getPath() returns null when the path is undefined.

      The url with NPE will appear TWICE, one throws NPE, the other passes.
      Because the reason aboved, I modify code as belowed:

      565: try

      { 566: file = new File(url.toURI().getPath()); 567: }

      catch (URISyntaxException urise)

      { 568: file = new File(url.getPath()); 569: }

      catch (NullPointerException npe)

      { 570: continue; // undefined path. 571: }

      Sincerely,
      Masu
      2009/04/17

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            yosimasu Yosimasu Lin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: