Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-719

Archive Browser does not support jar:file: url protocol

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • Branch_4_2
    • EJB 3.0 RC9 - FD
    • None
    • None
    • Workaround Exists
    • Hide

      For any classes/entities you wish to have mapped, make sure you build them into the WEB-INF/classes directory. This will fix the problem on Web projects. May be able to do something similar to non-web projects.

      Show
      For any classes/entities you wish to have mapped, make sure you build them into the WEB-INF/classes directory. This will fix the problem on Web projects. May be able to do something similar to non-web projects.
    • Low

      We have a seperate jar file that contains all of our model/entity objects. This jar gets put in the WEB-INF/lib directory, since we are only using wars and not ears. Using the hibernate auto-discovery feature causes an exception to occur. In this configuration.

      Caused by: java.lang.RuntimeException: NOT IMPLEMENTED
      at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:42)
      at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:541)
      ... 148 more

      org.jboss.util.file.ArchiveBrowser.getBrowser(URL url, Filter filter) only supports URLS that have a protocol of "file". However, jars have a protocol of "jar:file:" and therefore it will throw a RuntimeException saying "NOT IMPLEMENTED" (at least according to my debugger). There is already a JarArchiveBrowser class, the ArchiveBrowser just needs to recognize the protocol and handle it.

      This also affects Hibernate entity manager, since it gets included in the jboss-archive-browsing.jar in order to handle the auto-discovery of mapped entities feature.

      I've marked this as critical, since it effects entity manager features (though its only advanced hibernate only functionality)

            rhn-engineering-ebernard Emmanuel Bernard
            chris2mercer Chris Mercer (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: