Petals ESB Container

Error when installing a component that was just uninstalled

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.1.3, 4.0.0
  • Fix Version/s: 4.1.0
  • Security Level: Public
  • Description:
    Hide

    Using the JMX API:

    1. load a new installer of a component,
    2. install the component,
    3. uninstall the component,
    4. install the component,
      the following error occurs:
      
      

      0 2012/03/29 10:49:04,262 GMT+0200 INFO [Petals.Container.Components.petals-bc-soap.bootstrap.petals-bc-soap] : Install component [Name : petals-bc-soap, Version : 4.1.0]
      0 2012/03/29 10:49:04,360 GMT+0200 INFO [Petals.Container.Lifecycle.Installer] : Component 'petals-bc-soap' installed
      0 2012/03/29 10:49:11,196 GMT+0200 INFO [Petals.Container.Lifecycle.Installer] : Component 'petals-bc-soap' uninstalled
      0 2012/03/29 10:49:20,563 GMT+0200 INFO [Petals.Container.Components.petals-bc-soap.bootstrap.petals-bc-soap] : Install component [Name : petals-bc-soap, Version : 4.1.0]
      java.lang.IllegalStateException: zip file closed
      at java.util.zip.ZipFile.ensureOpen(ZipFile.java:416)
      at java.util.zip.ZipFile.getEntry(ZipFile.java:161)
      at java.util.jar.JarFile.getEntry(JarFile.java:208)
      at java.util.jar.JarFile.getJarEntry(JarFile.java:191)
      at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757)
      at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:735)
      at sun.misc.URLClassPath.findResource(URLClassPath.java:146)
      at java.net.URLClassLoader$2.run(URLClassLoader.java:385)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findResource(URLClassLoader.java:382)
      at org.ow2.petals.system.classloader.PetalsClassLoader.getResource(PetalsClassLoader.java:219)
      at org.ow2.petals.system.classloader.ComponentClassLoader.getResource(ComponentClassLoader.java:66)
      at org.ow2.petals.component.framework.DefaultBootstrap.processNativeWSDLResource(DefaultBootstrap.java:222)
      at org.ow2.petals.component.framework.DefaultBootstrap.onInstall(DefaultBootstrap.java:122)
      at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:100)
      at org.ow2.petals.container.thread.AbstractThread.run(AbstractThread.java:110)
      0 2012/03/29 10:49:20,602 GMT+0200 SEVERE [Petals.Container.Lifecycle.Installer] : Bootstrap failure on INSTALL
      javax.jbi.JBIException: Bootstrap failure on INSTALL
      at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:115)
      at org.ow2.petals.container.thread.AbstractThread.run(AbstractThread.java:110)
      Caused by: java.lang.IllegalStateException: zip file closed
      at java.util.zip.ZipFile.ensureOpen(ZipFile.java:416)
      at java.util.zip.ZipFile.getEntry(ZipFile.java:161)
      at java.util.jar.JarFile.getEntry(JarFile.java:208)
      at java.util.jar.JarFile.getJarEntry(JarFile.java:191)
      at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757)
      at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:735)
      at sun.misc.URLClassPath.findResource(URLClassPath.java:146)
      at java.net.URLClassLoader$2.run(URLClassLoader.java:385)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findResource(URLClassLoader.java:382)
      at org.ow2.petals.system.classloader.PetalsClassLoader.getResource(PetalsClassLoader.java:219)
      at org.ow2.petals.system.classloader.ComponentClassLoader.getResource(ComponentClassLoader.java:66)
      at org.ow2.petals.component.framework.DefaultBootstrap.processNativeWSDLResource(DefaultBootstrap.java:222)
      at org.ow2.petals.component.framework.DefaultBootstrap.onInstall(DefaultBootstrap.java:122)
      at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:100)
      ... 1 more
      {code]

    Show
    Using the JMX API:
    1. load a new installer of a component,
    2. install the component,
    3. uninstall the component,
    4. install the component, the following error occurs:
      
      
      0 2012/03/29 10:49:04,262 GMT+0200 INFO [Petals.Container.Components.petals-bc-soap.bootstrap.petals-bc-soap] : Install component [Name : petals-bc-soap, Version : 4.1.0] 0 2012/03/29 10:49:04,360 GMT+0200 INFO [Petals.Container.Lifecycle.Installer] : Component 'petals-bc-soap' installed 0 2012/03/29 10:49:11,196 GMT+0200 INFO [Petals.Container.Lifecycle.Installer] : Component 'petals-bc-soap' uninstalled 0 2012/03/29 10:49:20,563 GMT+0200 INFO [Petals.Container.Components.petals-bc-soap.bootstrap.petals-bc-soap] : Install component [Name : petals-bc-soap, Version : 4.1.0] java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:416) at java.util.zip.ZipFile.getEntry(ZipFile.java:161) at java.util.jar.JarFile.getEntry(JarFile.java:208) at java.util.jar.JarFile.getJarEntry(JarFile.java:191) at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757) at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:735) at sun.misc.URLClassPath.findResource(URLClassPath.java:146) at java.net.URLClassLoader$2.run(URLClassLoader.java:385) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:382) at org.ow2.petals.system.classloader.PetalsClassLoader.getResource(PetalsClassLoader.java:219) at org.ow2.petals.system.classloader.ComponentClassLoader.getResource(ComponentClassLoader.java:66) at org.ow2.petals.component.framework.DefaultBootstrap.processNativeWSDLResource(DefaultBootstrap.java:222) at org.ow2.petals.component.framework.DefaultBootstrap.onInstall(DefaultBootstrap.java:122) at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:100) at org.ow2.petals.container.thread.AbstractThread.run(AbstractThread.java:110) 0 2012/03/29 10:49:20,602 GMT+0200 SEVERE [Petals.Container.Lifecycle.Installer] : Bootstrap failure on INSTALL javax.jbi.JBIException: Bootstrap failure on INSTALL at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:115) at org.ow2.petals.container.thread.AbstractThread.run(AbstractThread.java:110) Caused by: java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:416) at java.util.zip.ZipFile.getEntry(ZipFile.java:161) at java.util.jar.JarFile.getEntry(JarFile.java:208) at java.util.jar.JarFile.getJarEntry(JarFile.java:191) at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:757) at sun.misc.URLClassPath$JarLoader.findResource(URLClassPath.java:735) at sun.misc.URLClassPath.findResource(URLClassPath.java:146) at java.net.URLClassLoader$2.run(URLClassLoader.java:385) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:382) at org.ow2.petals.system.classloader.PetalsClassLoader.getResource(PetalsClassLoader.java:219) at org.ow2.petals.system.classloader.ComponentClassLoader.getResource(ComponentClassLoader.java:66) at org.ow2.petals.component.framework.DefaultBootstrap.processNativeWSDLResource(DefaultBootstrap.java:222) at org.ow2.petals.component.framework.DefaultBootstrap.onInstall(DefaultBootstrap.java:122) at org.ow2.petals.container.thread.BootstrapThread.doTask(BootstrapThread.java:100) ... 1 more {code]
  • Environment:
    -

Activity

Hide
Christophe DENEUX added a comment - Wed, 18 Apr 2012 - 13:14:24 +0200

In fact several problems exists:

  • to prevent lock on filesystem because of memory leak, a method 'close' has been introduced in PetalsClassLoader to force to close the JAR files of classloader. I think that this tricky method should be removed (PETALSESBCONT-189).
  • The bootstrap classloader is created on initialization of the installer. The component classloader is created when installing the component and freed on component uninstallation. It's right, but the bootstrap classloader is also deleted on component uninstallation.

I think that to fix the problem, the boostrap classloader should be freed on finalization of the installer.

Show
Christophe DENEUX added a comment - Wed, 18 Apr 2012 - 13:14:24 +0200 In fact several problems exists:
  • to prevent lock on filesystem because of memory leak, a method 'close' has been introduced in PetalsClassLoader to force to close the JAR files of classloader. I think that this tricky method should be removed (PETALSESBCONT-189).
  • The bootstrap classloader is created on initialization of the installer. The component classloader is created when installing the component and freed on component uninstallation. It's right, but the bootstrap classloader is also deleted on component uninstallation.
I think that to fix the problem, the boostrap classloader should be freed on finalization of the installer.
Hide
Christophe DENEUX added a comment - Wed, 18 Apr 2012 - 16:21:10 +0200

Fixed in trunk

Show
Christophe DENEUX added a comment - Wed, 18 Apr 2012 - 16:21:10 +0200 Fixed in trunk

People

Dates

  • Created:
    Thu, 29 Mar 2012 - 10:53:11 +0200
    Updated:
    Wed, 18 Apr 2012 - 16:21:10 +0200
    Resolved:
    Wed, 18 Apr 2012 - 16:21:10 +0200