5 Replies Latest reply on May 13, 2003 9:50 AM by 334631

    Problem with class path, WEB-INF/lib, WAR deploy

    241285
      JDev 9.0.3 Preview

      When deploying to WAR, JDeveloper keeps adding all the class files from the JARs in WEB-INF/lib, the JARs are there as well. None are checked off in the deployment settings.

      But also, after every compile, JDeveloper has added all the contents of WEB-INF/lib into the additional classpath of my project settings, including vssver.scc which isn't a JAR just a VSS tracking file. What's up with that?
        • 1. re:Problem with class path, WEB-INF/lib, WAR deploy
          273414
          All archives( zip and jar ) files under the WEB-INF/lib should be added to the additional classpath so a user compile their webapp. However, the addition of non-archive files is a bug and will be fixed for 9.0.3 release. Cheers.
          • 2. re:Problem with class path, WEB-INF/lib, WAR deploy
            241285
            (JDev 9.03 Preview)

            well it doesn't add other libraries into the class path like that, that is, the "additional classpath" property of the project. The reason I mention it, is as a possible explaination of the main (first part) of my issue. Had JDeveloper treated WEB-INF/lib like other libraries, I don't think it would have created redundant copies of class files.

            Let me reiterate.
            When compiling to WAR, it takes classes from the JARs under WEB-INF/lib and puts them into WEB-INF/classes. Let's say I have log4j.jar in WEB-INF/lib, I end up with all it's classes under WEB-INF/classes

            WEB-INF/classes/org/apache/log4j/*

            In addition to keeping the JAR under WEB-INF/lib
            It shouldn't add all those redundant copies of those classes files. It should included the JAR in WEB-INF/lib.

            Is this also a bug that will be fixed in the final 9.0.3 release?
            • 3. re:Problem with class path, WEB-INF/lib, WAR deploy
              273414
              I cannot seem to reproduce your problem during WAR deployment. All archives located under web-inf/lib should remain in web-inf/lib. Did you maybe change the settings of your WAR deployment profile?
              • 4. Re: re:Problem with class path, WEB-INF/lib, WAR deploy
                384224
                I ran into the same problem while creating classes that had dependencies with the Struts framework. When I select a class in the "WARFILE > WEB-INF/classes" section of the "WAR Deployment Profile Settings" dialog, and that class uses Struts classes, the Struts classes are extracted from struts.jar and reinserted in WEB-INF\classes, even though struts.jar is selected for inclusion in WEB-INF\lib!

                If that's a bug, it makes the WAR deployment capability pretty useless in JDev 9.0.3, unless there is a way to prevent the inclusion of dependencies when they exist in WEB-INF\lib. Until that's fixed or a solution is provided, I suggest you use Ant's packaging capabilities.

                Cheers!
                • 5. Re: re:Problem with class path, WEB-INF/lib, WAR deploy
                  334631
                  I ran into the same problem while creating class that extends Struts class.

                  For examples:
                  - create a new project,and add Struts starter application.
                  - create class MyAction extends ActionServlet
                  - create a deployment profiles
                  - deploy to War

                  The war file containt WEB-INF/lib/struts.jar and WEB-INF/classes/org/apache/struts/*.class

                  I have no solution to this problem.