6 Replies Latest reply on Aug 31, 2010 3:39 PM by swright1

    Where to copy images directory on WLS server?

    439427
      I understand we have to create a war file of the images directory and then deploy it, but is it possible just to copy the images to a path on the WLS? (Similar to what we do in GlassFish, Apache Tomcat and OC4J servers)? That is a better option personally to me. I tried creating the war and then when I try to deploy the war file, I get the following errors

      Message icon - Error Unable to access the selected application.
      Message icon - Error Exception in AppMerge flows' progression
      Message icon - Error Exception in AppMerge flows' progression
      Message icon - Error C:\oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\tmp\.appmergegen_1278488556375_i.war\c:\oracle\apex_4\apex_4.0_en\apex\images\16admin.gif (The filename, directory name, or volume label syntax is incorrect)::Probably the string length of the path of the file being extracted was too long or failed to overwrite the file
      Message icon - Error C:\oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\tmp\.appmergegen_1278488556375_i.war\c:\oracle\apex_4\apex_4.0_en\apex\images\16admin.gif (The filename, directory name, or volume label syntax is incorrect)::Probably the string length of the path of the file being extracted was too long or failed to overwrite the file
        • 1. Re: Where to copy images directory on WLS server?
          Kris Rice-Oracle
          You'll need to check the WLS configuration for a docroot and place it there.
          -kris
          • 2. Re: Where to copy images directory on WLS server?
            user12025489
            I had this problem because I was not familiar with the syntax of the JAR command.

            In the documentation the command is shown as: jar –cvf0 <temp directory>\i.war –C <apex directory>\images .

            I took the period at the end to be punctuation but it is in fact a necessary part of the JAR syntax. If it is not included the .WAR is compiled with absolute paths i.e "C:\APEX\..." which is not valid in a .WAR structure.

            regards,
            David
            • 3. Re: Where to copy images directory on WLS server?
              786262
              Dear David,

              Your reply was not clear to me. Can u post what the exact syntax should be, if the syntax in document is wrong?

              Besr Regards,
              Saravanan S
              • 4. Re: Where to copy images directory on WLS server?
                user12025489
                The syntax in the document is correct. I misinterpreted it.

                The ' . ' at the end of the line is part of the command syntax. Omitting it makes the WAR file unusable.
                • 5. Re: Where to copy images directory on WLS server?
                  JohanndT
                  I still have the problem and cannot load the i.war file in WLS server.
                  • 6. Re: Where to copy images directory on WLS server?
                    swright1
                    This was a bit of a problem for me as well... You might get some useful information from my thread at:

                    Images not showing - Weblogic 10.3.3 - APEX 4.0

                    The key to solving my problem seemed to include using an updated version of Java to create the i.war file and to use short pathnames in my commands for doing so.

                    Try upgrading Java to the latest version of Sun Java and use it to create your i.war file.

                    It looks like you might have an issue with pathnames which could have resulted from how you created the i.war, so the following might help. If you use the one with the periond at the end, I would suggest keeping the pathnames short:

                    As I understand it, if you use the full paths, don't forget the "." at the end of the command since it looks like punctuation but it is actually needed. The final period argument instructs jar to archive all the contents of that directory, but not the directory itself. I used something like this:

                    jar -cvf0 /u01/war/i.war -C /u01/images401 .

                    which in my case corresponds to:

                    jar –cvf0 <temp directory>\i.war –C <apex directory>\images .

                    If you are in the directory where the images are stored, then I think that you could also just run the commands:

                    cd <apex directory>\images
                    or from my example above
                    cd /u01/images401
                    jar -cvf i.war *

                    I had copied my <apex directory>\images to a directory on my WebLogic server where I had installed the latest version of Sun Java. You can determine the version of Java you are using as follows:

                    java -version

                    will produce output like:

                    java version "1.6.0_21"
                    Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
                    Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

                    Hope this helps!

                    - Scott