This looks like a bug, the technical reasons :
 
J2eeDeployer packages up the directory into a zip file using URLWizard.downloadAndPackTemporary. 
 
downloadAndPackTemporary returns the URL to the newly created temp file, which is then checked for each of the possible descriptors, i.e. ejb-jar.xml, application.xml, web.xml. (J2eeDepoyer.installApplication)
 
If it finds a descriptor, it opens it and looks at the root tag, in this case it will be ejb-jar.
 
At this point it notices this is an EJB and thus calls installEJB, however this is where the bug is.  The URL passed to the installEJB method is the original URL, i.e. the actual directory being watched, however installEJB expects to have an archive, and thus the Zip Exceptions.
 
I think the code that calls the installEJB method should read :
 
(line 420 J2eeDeployer)
 
         // its a EJB.jar... just take the package
         installEJB (d, localCopy, null);
Which would make the J2eeDeployer pick up the tempory deployed file, rather than the file in ../Deploy
 
Could be wrong though.....
 
David Maddison
-----Original Message-----
From: Andrew [mailto:[EMAIL PROTECTED]]
Sent: 07 December 2000 09:14
To: jBoss
Subject: [jBoss-User] Auto deploy of deploy

Hi, I've some problem I couldn't deploy my test bean.If i package it all is
ok ,but it's not comfortable to repackage debugging beans every time...Isn't
it?

When I try to deploy following message is appears:
[Auto deploy] Starting
[Auto deploy] Auto deploy of file:/C:/jBoss-2.0_FINAL/deploy/
[J2EE Deployer] Deploy J2EE application: file:/C:/jBoss-2.0_FINAL/deploy/
[J2EE Deployer] Could not delete temporary file:
/C:/jBoss-2.0_FINAL/bin/../tmp/
deploy/copy1001.zip
[J2EE Deployer] Create application deploy
[J2EE Deployer] Installing EJB package: deploy
[J2EE Deployer] Destroying application deploy
[J2EE Deployer] deployment.cfg file deleted.
[J2EE Deployer] File tree file:/C:/jBoss-2.0_FINAL/tmp/deploy/deploy
deleted.
[Auto deploy] Deployment failed:file:/C:/jBoss-2.0_FINAL/deploy/
[Auto deploy] java.util.zip.ZipException: error in opening zip file
[Auto deploy]   at java.util.zip.ZipFile.open(Native Method)
[Auto deploy]   at java.util.zip.ZipFile.<init>(ZipFile.java:110)
[Auto deploy]   at java.util.jar.JarFile.<init>(JarFile.java:115)
[Auto deploy]   at java.util.jar.JarFile.<init>(JarFile.java:57)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.installEJB(J2eeDeployer.jav
a:509)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.installApplication(J2eeDepl
oyer.java:420)
[Auto deploy]   at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:13
6)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1523)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:332)
[Auto deploy]   at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:268)
[Auto deploy]   at
org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:311
)
[Auto deploy]   at
org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
java:92)
[Auto deploy]   at java.lang.reflect.Method.invoke(Native Method)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)
[Auto deploy]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1523)
[Auto deploy]   at
org.jboss.dependencies.DependencyManager.startMBean(Dependenc
yManager.java:284)
[Auto deploy]   at
org.jboss.dependencies.DependencyManager.loadService(Dependen
cyManager.java:261)
[Auto deploy]   at
org.jboss.dependencies.DependencyManager.processService(Depen
dencyManager.java:243)
[Auto deploy]   at
org.jboss.dependencies.DependencyManager.startMBeans(Dependen
cyManager.java:117)
[Auto deploy]   at org.jboss.Main.<init>(Main.java:162)
[Auto deploy]   at org.jboss.Main$1.run(Main.java:87)
[Auto deploy]   at java.security.AccessController.doPrivileged(Native
Method)
[Auto deploy]   at org.jboss.Main.main(Main.java:83)
[Auto deploy] Started

and may I have more one "test" bean?

Regards.

Reply via email to