9 Replies Latest reply: Feb 25, 2013 7:51 AM by Sivamani RSS

    Failed to load Main-Class manifest attribute from apex.war

    Sivamani
      Hi ,

      I m getting following error when i issue java -jar apex.war help setup

      Failed to load Main-Class manifest attribute from
      apex.war


      Could any one help me on it.

      Thanks
        • 1. Re: Failed to load Main-Class manifest attribute from apex.war
          Tim St. H.
          Try just

          java -jar apex.war help

          Do you get the same error?

          --Tim St.                                                                                                                                                                                   
          • 2. Re: Failed to load Main-Class manifest attribute from apex.war
            Sivamani
            Yes Tim.I m getting same error for java -jar apex.war help
            • 3. Re: Failed to load Main-Class manifest attribute from apex.war
              Tim St. H.
              Download a fresh version and copy it to a reserve directory.
              Run the same command against the new version.

              The reason I recommend that is because every time you run the seutp it will modify the contents fo the apex.war.
              I think it is more likely you have a "damaged" file. apex.war should be very close to a 20MB file.

              --Tim St.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
              • 4. Re: Failed to load Main-Class manifest attribute from apex.war
                Sivamani
                Hi Tim,

                As u said i downloaded a new zip file and extracted the apex listener and the command worked.But i want to change the location of configuration file location in web.xml so i extracted (jar -xvf apex.war)the apex.war and recreated (jar -cvf apex.war) it.After created the new apex.war again i am getting the same error.now apex.war file size is 40M.

                Thanks,
                • 5. Re: Failed to load Main-Class manifest attribute from apex.war
                  Sivamani
                  Is there any other way to change the location of configuration file location.

                  Edited by: Sivamani on Feb 22, 2013 12:46 PM
                  • 6. Re: Failed to load Main-Class manifest attribute from apex.war
                    Tim St. H.
                    I would not recommend "expanding" the .war.
                    Just run the command
                    java -jar apex.war configdir
                    This will modify the apex.war file to now use the new config dir... no expanding needed.

                    Regards,
                    -- Tim St.

                    Edited by: Tim St. H. on Feb 22, 2013 3:57 PM
                    • 7. Re: Failed to load Main-Class manifest attribute from apex.war
                      Sivamani
                      Hi Tim,

                      java -jar apex.war configdir /ebs/TEST/OAE/apexloc/
                      oracle.dbtools.common.config.cmds.ConfigDir execute
                      Set config.dir to /ebs/TEST/OAE/apexloc/ in: /ebs/TEST/OAE/newapex/apex.war
                      null
                      java.lang.reflect.InvocationTargetException
                      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:597)
                      at oracle.dbtools.jarcl.Entrypoint.main(Entrypoint.java:58)
                      Caused by: java.lang.OutOfMemoryError: Java heap space
                      at java.util.Arrays.copyOf(Arrays.java:2786)
                      at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:133)
                      at oracle.dbtools.common.util.ZipBuilder.build(ZipBuilder.java:63)
                      at oracle.dbtools.common.config.cmds.MutatedZip.mutate(MutatedZip.java:42)
                      at oracle.dbtools.common.config.cmds.MutatedZip.<init>(MutatedZip.java:15)
                      at oracle.dbtools.common.config.cmds.ConfigDir.modified(ConfigDir.java:114)
                      at oracle.dbtools.common.config.cmds.ConfigDir.modify(ConfigDir.java:86)
                      at oracle.dbtools.common.config.cmds.ConfigDir.execute(ConfigDir.java:68)
                      at oracle.dbtools.common.cmds.Commands.main(Commands.java:102)
                      ... 5 more

                      This time getting this error

                      Edited by: Sivamani on Feb 22, 2013 1:48 PM
                      • 8. Re: Failed to load Main-Class manifest attribute from apex.war
                        Tim St. H.
                        You have exhausted my knowledge on this subject. Heap space sounds of java versions, memory allocations, operating system and hardware considerations that I can not help you with remotely.

                        I have run the same command in a Linux VM that has 1 GB ram (quite small) and it runs as expected.
                        Only thought I have would be to - check permissions on the files and directories you are working in.

                        --Tim St.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                        • 9. Re: Failed to load Main-Class manifest attribute from apex.war
                          Sivamani
                          Hi Tim,

                          If u know how to increase memory for java heap size please tell me

                          output of

                          free -m
                          total used free shared buffers cached
                          Mem: 4953 4837 116 0 103 517
                          -/+ buffers/cache: 4216 737
                          Swap: 6943 814 6129


                          I tried

                          java -Xms256m -Xmx1024m

                          But its not working for me..

                          Edited by: Sivamani on Feb 25, 2013 5:41 AM

                          Edited by: Sivamani on Feb 25, 2013 5:51 AM