Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1526

Preferences: java.lang.IllegalArgumentException: Key too long

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1M1
    • 3.1M3
    • Modeler
    • None

    Description

      This affects Cayenne 3.1. When entering a long path for a JDBC driver, e.g.:

      [1] /Users/user/development/tools/mysql-connector-java-5.1.14/mysql-connector-java-5.1.14-bin.jar

      The modeler generates an error:

      1/3/11 2:12:00 PM [0x0-0x15015].CayenneModeler[267] Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Key too long: /Users/user/development/tools/mysql-connector-java-5.1.14/mysql-connector-java-5.1.14-bin.jar
      1/3/11 2:12:05 PM [0x0-0x15015].CayenneModeler[267] at org.apache.cayenne.pref.CayennePreferenceEditor.save(CayennePreferenceEditor.java:125)

      We need to revisit all places where filesystem paths are used as preference keys, and either stop using them as key names somehow (maybe they should be "values", not keys). If they absolutely have to be used as keys, we may hash them to a 32 char-long string

      Attachments

        1. CAY-1526-patch.txt
          5 kB
          Dzmitry Kazimirchyk

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: