Failed to deploy applications in server console

When deploying an application (such as the Appeon Web application or Appeon file service) in the server console (such as WebLogic, WebSphere, JEUS etc.), sometimes you receive an error message, similar to the message below thrown by WebSphere 7 console:

Messages
The EAR file could be corrupt and/or incomplete. Make sure that the application is 
at a compatible Java(TM) 
Platform, Enterprise Edition (Java EE) level for the current version of WebSphere(R) 
Application Server.
com.ibm.websphere.management.application.client.AppDeploymentException: 
[Root exception 
is org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: 
application.htm]

Cause: the WAR/EAR/JAR file compressed via one tool cannot be successfully de-compressed by the other tool during deployment process in the server console.

Solution A: Use Winzip or WinRAR to compress the files again if Winzip or WinRAR is installed. Detailed steps are below:

Step 1: Go to the Web root path that you specified in Web Server Profile Configuration windows in PowerServer Toolkit Config tool.

Step 2: Find the WAR file of the Web application, for example, appeondemo.war.

Step 3: Extract the WAR file to any folder, for example, to C:\appeondemo.

Step 4: Compress all the files in the folder to a WAR file again with the same WAR name (appeondemo.war). Compression tools such as Winzip and WinRAR are recommended, please use the tool and zip the files with default settings. Tools such as 7-Zip are not supported, please do not use the tool.

Step 5: Manually deploy the WAR file in the server console again.

Solution B: Use JDK to compress the files again if JDK is installed. Detailed steps are below:

Step 1: Go to the Web root path that you specified in Web Server Profile Configuration windows in PowerServer Toolkit Config tool.

Step 2: Find the WAR file of the Web application, for example, appeondemo.war.

Step 3: Extract the WAR file to any folder, for example, to C:\appeondemo.

Step 4: Compress all the files in the folder to a WAR file again with the same name (appeondemo.war) by using the following commands:

cd C:\appeondemo
C:\Program Files\Java\jdk1.5.0_15\java.exe  jar –cvf appeondemo.war *.*

Step 5: Manually deploy the WAR file in the server console again.

Solution C:

If you are deploying the Appeon Web application (not the Appeon file service), then you could also use a PowerServer Toolkit feature to compress files via JDK (prerequisite is that JDK is installed on the PowerServer Toolkit machine):

Step 1: Open the Web Server Profile Configuration window from the PowerServer Toolkit Config tool, in the File Compression Settings for War/Jar group box, select "JDK Compression" and specify the JDK path. This will enable Appeon Deploy tool to compress files by using JDK on the PowerServer Toolkit machine.

Step 2: Deploy the application via the Appeon Deploy tool. The WAR/EAR/JAR file compressed via JDK on the developer machine should be successfully de-compressed by JDK on the server machine.