[ 
https://issues.apache.org/jira/browse/FELIX-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771976#action_12771976
 ] 

Patrick Huber commented on FELIX-1078:
--------------------------------------

I get this error all the time and as soon as it has happened once, every access 
to the configuration fails with the same exception and felix has to be 
restarted...

The system looks about like this:
- 1 bundle that exposes a custom configuration, wrapping the osgi configuration
- several bundles with spring contexts with multiple beans each that create 
several new properties in their afterPropertiesSet() method (these properties 
are later editable trough the shell thanks to a bunch of custom commands we 
made)

I suspect the problem is that the config is actually deleted and replaced with 
a new config object when a modification is made to the config. I have no clue 
of the inner workings of felix but my guess is that there should be some 
synchronization at some point, preventing reads while the config is replaced. 
Better yet, the config should be updated because some object may have and keep 
a reference to that config object for a longer period of time and changes 
should be visible...



> The config/list command fails if a configuration has been deleted
> -----------------------------------------------------------------
>
>                 Key: FELIX-1078
>                 URL: https://issues.apache.org/jira/browse/FELIX-1078
>             Project: Felix
>          Issue Type: Bug
>          Components: Karaf
>            Reporter: Guillaume Nodet
>
> {code}
> org.apache.geronimo.gshell.commandline.CommandLineExecutionFailed: 
> org.apache.geronimo.gshell.command.CommandException: 
> java.lang.IllegalStateException: Configuration org.ops4j.pax.logging deleted
>       at 
> org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.executePiped(ExecutingVisitor.java:246)
>       at 
> org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.visit(ExecutingVisitor.java:107)
>       at 
> org.apache.geronimo.gshell.parser.ASTExpression.jjtAccept(ASTExpression.java:17)
>       at 
> org.apache.geronimo.gshell.parser.SimpleNode.childrenAccept(SimpleNode.java:61)
>       at 
> org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.visit(ExecutingVisitor.java:90)
>       at 
> org.apache.geronimo.gshell.parser.ASTCommandLine.jjtAccept(ASTCommandLine.java:17)
>       at 
> org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl$1.execute(CommandLineBuilderImpl.java:96)
>       at 
> org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.execute(CommandLineExecutorImpl.java:71)
>       at 
> org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl$ShellImpl.execute(ShellFactoryImpl.java:183)
>       at 
> org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl$ShellImpl$1.execute(ShellFactoryImpl.java:214)
>       at org.apache.geronimo.gshell.console.Console.work(Console.java:187)
>       at org.apache.geronimo.gshell.console.Console.run(Console.java:128)
>       at 
> org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl$ShellImpl.run(ShellFactoryImpl.java:236)
>       at 
> org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl$ShellImpl.run(ShellFactoryImpl.java:256)
>       at java.lang.Thread.run(Thread.java:613)
> Caused by: org.apache.geronimo.gshell.command.CommandException: 
> java.lang.IllegalStateException: Configuration org.ops4j.pax.logging deleted
>       at 
> org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.doExecute(CommandLineExecutorImpl.java:148)
>       at 
> org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.execute(CommandLineExecutorImpl.java:106)
>       at 
> org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor$1.run(ExecutingVisitor.java:208)
>       at 
> org.apache.geronimo.gshell.parser.visitor.ExecutingVisitor.executePiped(ExecutingVisitor.java:231)
>       ... 14 more
> Caused by: java.lang.IllegalStateException: Configuration 
> org.ops4j.pax.logging deleted
>       at 
> org.apache.felix.cm.impl.ConfigurationAdapter.checkDeleted(ConfigurationAdapter.java:170)
>       at 
> org.apache.felix.cm.impl.ConfigurationAdapter.getPid(ConfigurationAdapter.java:53)
>       at 
> org.apache.servicemix.kernel.gshell.config.ListCommand.doExecute(ListCommand.java:35)
>       at 
> org.apache.servicemix.kernel.gshell.config.ConfigCommandSupport.doExecute(ConfigCommandSupport.java:50)
>       at 
> org.apache.servicemix.kernel.gshell.core.OsgiCommandSupport.execute(OsgiCommandSupport.java:48)
>       at 
> org.apache.geronimo.gshell.wisdom.command.CommandSupport.executeAction(CommandSupport.java:303)
>       at 
> org.apache.geronimo.gshell.wisdom.command.StatefulCommand.executeAction(StatefulCommand.java:94)
>       at 
> org.apache.geronimo.gshell.wisdom.command.CommandSupport.execute(CommandSupport.java:194)
>       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:585)
>       at 
> org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:64)
>       at 
> org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:78)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>       at 
> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
>       at 
> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>       at 
> org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:57)
>       at 
> org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:40)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>       at 
> org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>       at 
> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
>       at 
> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
>       at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
>       at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>       at $Proxy16.execute(Unknown Source)
>       at 
> org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl.doExecute(CommandLineExecutorImpl.java:127)
>       ... 17 more
> {code}
> Actually the same exception also happen in the file deployer:
> {code}
> 10:59:08,309 | WARN  | Timer-1          | FileMonitor                      | 
> x.kernel.filemonitor.FileMonitor  296 | Failed to process: 
> /Users/gnodet/work/servicemix/smx4/nmr/trunk/assembly/target/apache-servicemix-nmr-1.0.0-SNAPSHOT/instances/smx1/etc/org.apache.servicemix.jbi.cluster.cfg.
>  Reason: java.lang.IllegalStateException: Configuration 
> org.apache.servicemix.jbi.cluster deleted
> java.lang.IllegalStateException: Configuration 
> org.apache.servicemix.jbi.cluster deleted
>       at 
> org.apache.felix.cm.impl.ConfigurationAdapter.checkDeleted(ConfigurationAdapter.java:170)
>       at 
> org.apache.felix.cm.impl.ConfigurationAdapter.delete(ConfigurationAdapter.java:130)
>       at 
> org.apache.servicemix.kernel.filemonitor.FileMonitor.deleteConfiguration(FileMonitor.java:484)
>       at 
> org.apache.servicemix.kernel.filemonitor.FileMonitor.onFilesChanged(FileMonitor.java:241)
>       at 
> org.apache.servicemix.kernel.filemonitor.FileMonitor$1.filesChanged(FileMonitor.java:151)
>       at 
> org.apache.servicemix.kernel.filemonitor.Scanner.reportBulkChanges(Scanner.java:431)
>       at 
> org.apache.servicemix.kernel.filemonitor.Scanner.reportDifferences(Scanner.java:327)
>       at 
> org.apache.servicemix.kernel.filemonitor.Scanner.scan(Scanner.java:261)
>       at 
> org.apache.servicemix.kernel.filemonitor.Scanner$1.run(Scanner.java:221)
>       at java.util.TimerThread.mainLoop(Timer.java:512)
>       at java.util.TimerThread.run(Timer.java:462)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to