Spring Framework
  1. Spring Framework
  2. SPR-5705

Doc: Namespace handlers cannot be located in classpath with INDEX.LIST is used in jar

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.5.6
    • Fix Version/s: General Backlog
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      Namespace handlers cannot be located in classpath with INDEX.LIST is used in jar and running with "java -jar". If you build a jar file and index the classpath for it as recommended in the JAR file specification, the namespace handlers are only located from the first jar file in the list.

      Removing the INDEX.LIST from the jar file and using a Classpath: entry in the manifest instead works fine, as does running with "java -cp ..." (not using -jar).

        Activity

        Hide
        David Roussel added a comment -

        This is the most related bug I could find: http://bugs.sun.com/view_bug.do?bug_id=6887710

        Show
        David Roussel added a comment - This is the most related bug I could find: http://bugs.sun.com/view_bug.do?bug_id=6887710
        Hide
        Julien HENRY added a comment -

        Same problem for me. I have a webstart application and I tried to add the INDEX.LIST to improve resource loading time. But as soon as I add the INDEX.LIST, Spring fails to start.

        Show
        Julien HENRY added a comment - Same problem for me. I have a webstart application and I tried to add the INDEX.LIST to improve resource loading time. But as soon as I add the INDEX.LIST, Spring fails to start.
        Hide
        Julien HENRY added a comment -

        In fact, the solution woul be to NOT put any resource in META-INF because only some default files are supported. See:
        http://forums.java.net/jive/thread.jspa?messageID=292293#289192
        http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#The%20META-INF%20directory

        Show
        Julien HENRY added a comment - In fact, the solution woul be to NOT put any resource in META-INF because only some default files are supported. See: http://forums.java.net/jive/thread.jspa?messageID=292293#289192 http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#The%20META-INF%20directory
        Hide
        Julien HENRY added a comment -

        See http://bugs.sun.com/view_bug.do?bug_id=2183678 for a workaround when using SUN jar command. Currently there is no way when using Maven to package.

        Show
        Julien HENRY added a comment - See http://bugs.sun.com/view_bug.do?bug_id=2183678 for a workaround when using SUN jar command. Currently there is no way when using Maven to package.
        Hide
        Julien HENRY added a comment -

        Sorry for the spam but after more investagation it is definitley a bug in java as explained by Max. When using jar indexing, getRessources() will only return the first instance found and not all instances. I have opened a bug on SUN database but it is still not visible (I think Oracle transition is in progress). Anyway here is the link I received by email in case it became public some day: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6957241

        So for now the only workaround is to NOT use JAR indexing with webstart.

        Show
        Julien HENRY added a comment - Sorry for the spam but after more investagation it is definitley a bug in java as explained by Max. When using jar indexing, getRessources() will only return the first instance found and not all instances. I have opened a bug on SUN database but it is still not visible (I think Oracle transition is in progress). Anyway here is the link I received by email in case it became public some day: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6957241 So for now the only workaround is to NOT use JAR indexing with webstart.

          People

          • Assignee:
            Unassigned
            Reporter:
            Dave Syer
            Last updater:
            Trevor Marshall
          • Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Days since last comment:
              3 years, 46 weeks, 2 days ago