7 Replies Latest reply on Mar 28, 2012 10:05 AM by Udo

    Unable to execute jar -cvf0  war file creation command.

    906223
      I am a beginner in these technologies.
      I am using Weblogic to deploy the APEX Listener.
      The APEX.war file was deployed. But when I try to execute the jar -cvf0 command on Command Prompt, I get an exception saying the format is not corrected. When is CVF0 instead of -CVF0 it creates the i.war file but then when I try to deploy it I get an Error saying the APPMergeFlows failed and further it file path is too long. It fails at 16admin.gif file.

      Can you please throw any lights on this. I have spent a lot of time but could not get it work. Any help would be appreciated.
        • 1. Re: Unable to execute jar -cvf0  war file creation command.
          fatehcis-JavaNet
          Hi user,

          Did you add space and period at the end of the command.
          jar –cvf0 <temp directory>\i.war –C <apex directory>\images .
          It is in the documentation:
          Tip:
          The space and period (.) at the end of the command is required.

          Regards,
          Fateh
          1 person found this helpful
          • 2. Re: Unable to execute jar -cvf0  war file creation command.
            906223
            Yes. I think I had added Space and Period for the command. The System executes cvf0 but rejects -cvf0 calling it as Syntax error. Is there anything that I am missing as in wrong JDK version.
            I usually drill down to directory where my JDK/bin folder is located and then I kick off the Jar command.

            If I use cvf0 command, instead of -cvf0, the deployment on Weblogic of i.war craps out.
            • 3. Re: Unable to execute jar -cvf0  war file creation command.
              Udo
              Hello,
              Is there anything that I am missing as in wrong JDK version.
              Perhaps you actually have a problem with your JDK version. Which one do you use and on which OS are you running it?
              Sun/Oracle JDK should work with -cfv0... Could you provide the error output?
              I usually drill down to directory where my JDK/bin folder is located and then I kick off the Jar command.
              Could you provide the exact call including the current directory for that call?
              Note that the example assumes that your command line is pointing at the APEX images directory when creating the archive.

              -Udo
              • 4. Re: Unable to execute jar -cvf0  war file creation command.
                906223
                I am going to following directory to create the WAR File.
                C:\>cd C:\Middleware\jdk160_29\bin

                Once I execute above command, I use following command to create the WAR File.

                jar –cvf0 C:\apex_listener\i3.war –C C:\apex\images .

                Please let me know if I am missing anything.
                Also., I am using the JDK that came with Weblogic.
                • 5. Re: Unable to execute jar -cvf0  war file creation command.
                  Udo
                  So, it appears you've copied 1:1 from the pdf, which is basically a good idea. Unfortunately, there is a problem with the hyphen: It should be a "minus" but actually is the longer version.
                  You have
                  jar –cvf0 C:\apex_listener\i3.war –C C:\apex\images .
                  Try the following command instead
                  jar -cvf0 C:\apex_listener\i3.war -C C:\apex\images .
                  This will work better. It's a common issue, by the way... I hope this will be fixed in the documentation for the next version.

                  -Udo
                  1 person found this helpful
                  • 6. Re: Unable to execute jar -cvf0  war file creation command.
                    906223
                    What is the difference between hyphen and minus. It is the same key right then how do I make it a minus sign and not a hyphen.
                    • 7. Re: Unable to execute jar -cvf0  war file creation command.
                      Udo
                      What is the difference between hyphen and minus. It is the same key right then how do I make it a minus sign and not a hyphen.
                      It's none if you use a simple text editor. However, as mentioned before, some text processors (like word) tend to make a longer hyphen (or perhaps better "dash") from your input by some autoreplace function, which seemed to have happend with the APEX Listener's documentation. This character also exists in ASCII code, but is not equal to minus and hence the command line parser fails to detect it correctly.
                      Did copy&paste from my example work?

                      -Udo

                      Edited by: Udo on 28.03.2012 12:04