Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-504

Windows bug: unable to load jar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.4.2
    • no-release
    • codegen
    • None
    • Windows

    Description

      A piece of code was unix specific for loading a jar.

      The attached file is the a for a generic implementation (works for windows too).

      Edit.
      The issue is: Sqoop generates a jar file containing the generated class corresponding to the DB table to import.
      his code tries to load the jar in order to read the class, but the path "jar:file://" + new File(jarFile).getAbsolutePath() + "!/" seems not to be a valid windows path.
      So I simply replaced the file path
      From this:
      URL url = new URL("jar:file://" + new File(jarFile).getAbsolutePath() + "!/")
      to this:
      URL url = new File(jarFile).toURI().toURL();

      Attachments

        1. SQOOP-504.patch
          3 kB
          Alban Perillat-Merceroz

        Issue Links

          Activity

            People

              alban@perillat.org Alban Perillat-Merceroz
              alban@perillat.org Alban Perillat-Merceroz
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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