Petals SE SCA

Cannot undeploy a SCA SU

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    After having stopped a SCA SU, the undeployment fails.

    INFO 2010-08-30 13:26:56,296 [Petals.Container.Components.petals-se-sca]
        Service unit 'su-SCA-TestProxy-provide-1.0-SNAPSHOT' undeploy
    SEVERE 2010-08-30 13:26:56,593 [Petals.JBI-Management.DeploymentServiceImpl]
        The service assembly 'petals-sca-test-sa' can not be removed from repository
    java.io.IOException: Unable to delete file: E:\WebinarTalend\petals-platform-3.1\repository\service-assemblies\petals-sca-test-sa-08-30-2010-012600625\install\su-SCA-TestProxy-provide-1.0-SNAPSHOT\su-SCA-TestProxy-provide-1.0-SNAPSHOT.jar
    	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1390)
    	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
    	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
    	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
    	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
    	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
    	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
    	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
    	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
    	at org.ow2.petals.system.repository.RepositoryServiceImpl.removePackage(RepositoryServiceImpl.java:627)
    	at org.ow2.petals.system.repository.RepositoryServiceImpl.removeServiceAssembly(RepositoryServiceImpl.java:382)
    	at org.objectweb.fractal.julia.generated.C36dc48a8_0.removeServiceAssembly(INTERCEPTOR[RepositoryService])
    	at org.objectweb.fractal.julia.generated.Cd51ee9d3_0.removeServiceAssembly(INTERFACE[RepositoryService])
    	at org.ow2.petals.jbi.management.task.deployment.undeploy.RemoveSADirectoryTask.execute(RemoveSADirectoryTask.java:53)
    	at org.ow2.petals.jbi.management.TaskProcessor.process(TaskProcessor.java:78)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.undeploy(DeploymentServiceImpl.java:649)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.forceUndeploy(DeploymentServiceImpl.java:243)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.undeployAllServiceAssemblies(DeploymentServiceImpl.java:685)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.shutdown(DeploymentServiceImpl.java:474)
    	at org.objectweb.fractal.julia.generated.C9ae71627_0.shutdown(INTERCEPTOR[DeploymentService])
    	at org.objectweb.fractal.julia.generated.C59d5ff32_0.shutdown(INTERFACE[DeploymentService])
    	at org.ow2.petals.kernel.admin.PetalsAdminServiceImpl.shutdownContainer(PetalsAdminServiceImpl.java:151)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:244)
    	at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1074)
    	at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:955)
    	at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:221)
    	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
    	at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:84)
    	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
    	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
    	at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:203)
    	at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1043)
    	at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:447)
    	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
    	at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
    	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
    	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
    	at sun.rmi.transport.Transport$1.run(Transport.java:159)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:619)
    INFO 2010-08-30 13:26:56,593 [Petals.JBI-Management.DeploymentServiceImpl]
        Service Assembly 'petals-sca-test-sa' undeployed

    This is due to a URL class loader that locks the JAR.
    In fact, each SU has two class loaders and only one of them is closed correctly.
    The second one should be either closed correctly, or merged with the first one.

    Show
    After having stopped a SCA SU, the undeployment fails.
    INFO 2010-08-30 13:26:56,296 [Petals.Container.Components.petals-se-sca]
        Service unit 'su-SCA-TestProxy-provide-1.0-SNAPSHOT' undeploy
    SEVERE 2010-08-30 13:26:56,593 [Petals.JBI-Management.DeploymentServiceImpl]
        The service assembly 'petals-sca-test-sa' can not be removed from repository
    java.io.IOException: Unable to delete file: E:\WebinarTalend\petals-platform-3.1\repository\service-assemblies\petals-sca-test-sa-08-30-2010-012600625\install\su-SCA-TestProxy-provide-1.0-SNAPSHOT\su-SCA-TestProxy-provide-1.0-SNAPSHOT.jar
    	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1390)
    	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
    	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
    	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
    	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
    	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
    	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
    	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
    	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
    	at org.ow2.petals.system.repository.RepositoryServiceImpl.removePackage(RepositoryServiceImpl.java:627)
    	at org.ow2.petals.system.repository.RepositoryServiceImpl.removeServiceAssembly(RepositoryServiceImpl.java:382)
    	at org.objectweb.fractal.julia.generated.C36dc48a8_0.removeServiceAssembly(INTERCEPTOR[RepositoryService])
    	at org.objectweb.fractal.julia.generated.Cd51ee9d3_0.removeServiceAssembly(INTERFACE[RepositoryService])
    	at org.ow2.petals.jbi.management.task.deployment.undeploy.RemoveSADirectoryTask.execute(RemoveSADirectoryTask.java:53)
    	at org.ow2.petals.jbi.management.TaskProcessor.process(TaskProcessor.java:78)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.undeploy(DeploymentServiceImpl.java:649)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.forceUndeploy(DeploymentServiceImpl.java:243)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.undeployAllServiceAssemblies(DeploymentServiceImpl.java:685)
    	at org.ow2.petals.jbi.management.deployment.DeploymentServiceImpl.shutdown(DeploymentServiceImpl.java:474)
    	at org.objectweb.fractal.julia.generated.C9ae71627_0.shutdown(INTERCEPTOR[DeploymentService])
    	at org.objectweb.fractal.julia.generated.C59d5ff32_0.shutdown(INTERFACE[DeploymentService])
    	at org.ow2.petals.kernel.admin.PetalsAdminServiceImpl.shutdownContainer(PetalsAdminServiceImpl.java:151)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:244)
    	at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1074)
    	at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:955)
    	at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:221)
    	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
    	at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:84)
    	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
    	at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120)
    	at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:203)
    	at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1043)
    	at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:447)
    	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
    	at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
    	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
    	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
    	at sun.rmi.transport.Transport$1.run(Transport.java:159)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:619)
    INFO 2010-08-30 13:26:56,593 [Petals.JBI-Management.DeploymentServiceImpl]
        Service Assembly 'petals-sca-test-sa' undeployed
    This is due to a URL class loader that locks the JAR. In fact, each SU has two class loaders and only one of them is closed correctly. The second one should be either closed correctly, or merged with the first one.
  • Environment:
    Windows XP.

Activity

Vincent Zurczak made changes - Wed, 3 Nov 2010 - 16:15:15 +0100
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Blocker [ 1 ]
Vincent Zurczak made changes - Wed, 3 Nov 2010 - 16:15:16 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Vincent Zurczak added a comment - Wed, 3 Nov 2010 - 16:19:50 +0100

Commit # 16270
Simplification with the class loaders (so that we know which one is used).
Tentative to prevent the use of FraSCAti's class loader (by dynamically adding URLs to an existing class loader).

By taking a look at a dump, I can still see an AFClassLoader (created by FraSCAti).
I suspect it of locking the SCA JAR (the one that contains the Java artifacts of the SCA application).
This class loader should be released (add a close() method) in the method Factory#close(Component).
I need to discuss it with the FraSCAti team.

Show
Vincent Zurczak added a comment - Wed, 3 Nov 2010 - 16:19:50 +0100 Commit # 16270 Simplification with the class loaders (so that we know which one is used). Tentative to prevent the use of FraSCAti's class loader (by dynamically adding URLs to an existing class loader). By taking a look at a dump, I can still see an AFClassLoader (created by FraSCAti). I suspect it of locking the SCA JAR (the one that contains the Java artifacts of the SCA application). This class loader should be released (add a close() method) in the method Factory#close(Component). I need to discuss it with the FraSCAti team.
Vincent Zurczak made changes - Wed, 3 Nov 2010 - 16:19:50 +0100
Status In Progress [ 10003 ] Open [ 10002 ]
Vincent Zurczak made changes - Wed, 3 Nov 2010 - 18:19:44 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Vincent Zurczak added a comment - Wed, 3 Nov 2010 - 18:20:32 +0100

Commit # 16271
Several fixes in the life cycle of a SU.
It solves the undeployment problem.

Forget my previous comment about the AFClassLoader.

Show
Vincent Zurczak added a comment - Wed, 3 Nov 2010 - 18:20:32 +0100 Commit # 16271 Several fixes in the life cycle of a SU. It solves the undeployment problem. Forget my previous comment about the AFClassLoader.
Vincent Zurczak made changes - Wed, 3 Nov 2010 - 18:20:32 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 1.1 [ 10110 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
64d 5h 20m
1
Vincent Zurczak
Wed, 3 Nov 2010 - 16:15:15 +0100
Open Open In Progress In Progress
1s
1
Vincent Zurczak
Wed, 3 Nov 2010 - 16:15:16 +0100
In Progress In Progress Open Open
4m 34s
1
Vincent Zurczak
Wed, 3 Nov 2010 - 16:19:50 +0100
Open Open In Progress In Progress
1h 59m
1
Vincent Zurczak
Wed, 3 Nov 2010 - 18:19:44 +0100
In Progress In Progress Resolved Resolved
48s
1
Vincent Zurczak
Wed, 3 Nov 2010 - 18:20:32 +0100



People

Dates

  • Created:
    Tue, 31 Aug 2010 - 11:54:42 +0200
    Updated:
    Wed, 3 Nov 2010 - 18:20:32 +0100
    Resolved:
    Wed, 3 Nov 2010 - 18:20:32 +0100