users@glassfish.java.net

Re: "Cannot write to an JAR archive open for reading" Exception?

From: <glassfish_at_javadesktop.org>
Date: Mon, 26 Mar 2007 15:04:55 PST

Hi, Hong,

currently I am trying to deploy my EAR (which composes of 2 wars and 4 ejb jars plus a few libs) module by module to find out which one is causing trouble. So far I have a different problem with JNDI and MDBs. When it pin the topic problem down I may be able to write a test for it, now I do not
know where to start writing the test.
The application is not large, beginning of development. BTW, I'm migrating from JBoss,
to make sure it is portable from the beginning (actually, some of the code has not been deployed on JBoss yet)

While I like solving problems on my own, I write here to get help, so I'll either compile a test
that causes the problem or share the file.
Is there no hint where to look judging from the call stack? To me it seems it opens a JAR
(extracted from EAR and copied somewhere, I imagine) and ... ?
The problem is consistent, and also appears on 9.0_01 (build b02-p01)
Silly question: what I should I look for in the logs (what level?)?

Thanks, Edek

> Hi, Edek
> It's hard to tell from the stack trace. Is there
> anything more in the
> erver.log which is related to this?
> Do you see this problem consistently when you
> tried to deploy your
> rchive or only intermittently? Is it possible you
> could share your
> application or provide a small test case for us to
> look into this?
>
> Thanks,
> Hong
> glassfish_at_javadesktop.org wrote:
>
> >Hello,
> >
> >my EAR passed all verifier tests, but during
> deployment I get this exception.
> >Does anyone have a clue what is wrong?
> >
> >This is AS 9.1 b33e-beta, on Linux, jdk 1.6.0
> >
> >[#|2007-03-26T22:25:17.146+0200|SEVERE|sun-appserver9
> .1|javax.enterprise.system.tools.deployment|_ThreadID=
> 33;_ThreadName=Thread-121;_RequestID=e5e13cb4-9b3f-4bc
> 3-808b-c6b5b877ce65;|Exception occured in J2EEC Phase
> >com.sun.enterprise.deployment.backend.IASDeploymentEx
> ception: Fatal Error from EJB Compiler -- Failed to
> save deployment descriptor for: XXXX
> >cause: Cannot write to an JAR archive open for
> reading
> > at
> com.sun.enterprise.instance.BaseManager.saveAppDescrip
> tor(BaseManager.java:737)
> > at
> com.sun.enterprise.deployment.backend.EJBCompiler.preD
> eployApp(EJBCompiler.java:285)
> > at
> com.sun.enterprise.deployment.backend.EJBCompiler.comp
> ile(EJBCompiler.java:214)
> > at
> com.sun.enterprise.deployment.backend.AppDeployer.runE
> JBC(AppDeployer.java:299)
> > at
> com.sun.enterprise.deployment.backend.AppDeployer.depl
> oy(AppDeployer.java:220)
> > at
> com.sun.enterprise.deployment.backend.AppDeployer.doRe
> questFinish(AppDeployer.java:132)
> > at
> com.sun.enterprise.deployment.phasing.J2EECPhase.runPh
> ase(J2EECPhase.java:174)
> > at
> com.sun.enterprise.deployment.phasing.DeploymentPhase.
> executePhase(DeploymentPhase.java:95)
> > at
> com.sun.enterprise.deployment.phasing.PEDeploymentServ
> ice.executePhases(PEDeploymentService.java:892)
> > at
> com.sun.enterprise.deployment.phasing.PEDeploymentServ
> ice.deploy(PEDeploymentService.java:266)
> > at
> com.sun.enterprise.deployment.phasing.PEDeploymentServ
> ice.deploy(PEDeploymentService.java:761)
> > at
> com.sun.enterprise.management.deploy.DeployThread.depl
> oy(DeployThread.java:174)
> > at
> com.sun.enterprise.management.deploy.DeployThread.run(
> DeployThread.java:210)
> >|#]
> >
> >Thanks,
> >Edek
> >[Message sent by forum member 'edek234' (edek234)]
> >
> >http://forums.java.net/jive/thread.jspa?messageID=209
> 937
> >
> >-----------------------------------------------------
[Message sent by forum member 'edek234' (edek234)]

http://forums.java.net/jive/thread.jspa?messageID=209970