Randahl,

I've had some problems with unpacking .ear and .war files in the past.
These are really JAR (Java Archive) files, which are really ZIP format files.

I think the problem I had was because of the tool that I used to create the
.ear/.war.  The problem could also be somewhat related to the operating
system, which manage file permissions differently.

For example, I have created .ear files from the command line with the "jar"
command, with PowerArchiver, with WinZip, with the deployment tool that
come with the J2EE SDK, and with the ANT build utility's java command with
args="-enterpriseArchive" and args="-webArchive" (which uses the
com.sun.enterprise.tools.packager.Main or whatever packaging class you
choose).

So, there are many ways that an EAR file can come to be.  

The first thing I would do is make sure that the the .ear file has read
permissions (if you're on a Unix-based system, the directory may also need
to have read permissions).  Note that Orion also may actually replace stuff
in a .ear or .war file (so it may need write permissions, as well)!  

As a convenience for development, Orion let's you choose between deploying
the application from a directory (instead of a .ear or .war).  If you've
defined your application's location to be in a directory, then Orion will
not deploy from the .ear and/or .war.  

The error you are getting indicates that you have configured the
application as an EAR (as opposed to a directory).  Note that Orion MAY TRY
TO OVERWRITE SETTINGS IN CONFIG FILES IN THE EAR AND/OR WAR FILE, so it may
need write permissions.  It looks like the error you are getting is a read
error.

After ensuring that your .ear has appropriate read/write permissions, I
would try different ways of creating it (PowerArchiver, WinZip, ANT, etc)
and see if any of them work.

Hope this helps.  Anyone else?

Jay Armstrong
[EMAIL PROTECTED]

At 04:07 PM 3/9/01 +0100, you wrote:
>I am wondering if I am the the only one getting an error when deploying a
>new .ear (this happens often but not always):
>
>Auto-unpacking C:\(...)\project.ear... Error unpacking: IO Error: error in
>opening
>zip file
>
>Does anybody know why this happens, and is there a work-around apart from
>restarting Orion?
>
>
>R.
>
>
>


Reply via email to