Hi Steven,

The refresh doesn't occur on Karaf standard distribution, so I think
you have another feature that triggers the refresh.

Can you please share the karaf.log and eventually your assembly pom.xml ?

Thanks
Regards
JB

On Tue, Mar 21, 2023 at 11:31 AM Steven Huypens
<steven.huyp...@gmail.com> wrote:
>
> Hi,
>
> When starting our custom Karaf distribution, we regularly see the error 
> below. I'm not sure I understand it OK, but it looks like the Felix 
> ConfigurationManager tries to log something, but an exception is thrown, 
> stopping the update-Thread. Maybe the eventAdmin bundle is restarted somehow 
> during boot, which makes it unavailable for a short period, but I feel that a 
> logLine should never have this kind of impact. At the bottom you can find the 
> configuration of our karaf-maven-plugin.
>
> Can I prevent the eventAdmin bundle from being restarted, or should the 
> exception be handled differently somewhere ?
>
>
>
> RejectedExecutionException: Task java.util.concurrent.FutureTask@616ff6e9[Not 
> completed, task = 
> java.util.concurrent.Executors$RunnableAdapter@35bad341[Wrapped task = 
> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter@6de671aa]]
>  rejected from java.util.concurrent.ThreadPoolExecutor@20fbc2ac[Shutting 
> down, pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 
> 176]
>  java.util.concurrent.RejectedExecutionException: Task 
> java.util.concurrent.FutureTask@616ff6e9[Not completed, task = 
> java.util.concurrent.Executors$RunnableAdapter@35bad341[Wrapped task = 
> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter@6de671aa]]
>  rejected from java.util.concurrent.ThreadPoolExecutor@20fbc2ac[Shutting 
> down, pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 
> 176]
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2055)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825)
> at 
> java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1350)
> at 
> java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
> at 
> org.apache.felix.eventadmin.impl.tasks.DefaultThreadPool.executeTask(DefaultThreadPool.java:134)
> at 
> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks.execute(AsyncDeliverTasks.java:102)
> at 
> org.apache.felix.eventadmin.impl.handler.EventAdminImpl.postEvent(EventAdminImpl.java:180)
> at 
> org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.postEvent(EventAdminSecurityDecorator.java:79)
> at 
> org.ops4j.pax.logging.spi.support.EventAdminTracker.deliver(EventAdminTracker.java:103)
> at 
> org.ops4j.pax.logging.spi.support.EventAdminTracker.postEvent(EventAdminTracker.java:65)
> at 
> org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl.handleEvents(PaxLoggingServiceImpl.java:417)
> at 
> org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog0(PaxLoggerImpl.java:1127)
> at 
> org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.doLog(PaxLoggerImpl.java:1098)
> at 
> org.ops4j.pax.logging.log4j2.internal.PaxLoggerImpl.debug(PaxLoggerImpl.java:252)
> at 
> org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl.logImpl(PaxLoggingServiceImpl.java:402)
> at 
> org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl.access$000(PaxLoggingServiceImpl.java:70)
> at 
> org.ops4j.pax.logging.log4j2.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.log(PaxLoggingServiceImpl.java:678)
> at org.apache.felix.cm.impl.Log.log(Log.java:186)
> at org.apache.felix.cm.impl.Log.log(Log.java:168)
> at 
> org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1383)
> at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:122)
> at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:84)
> at java.base/java.lang.Thread.run(Thread.java:829)
>
>                 <plugin>
>                     <groupId>org.apache.karaf.tooling</groupId>
>                     <artifactId>karaf-maven-plugin</artifactId>
>                     <version>${karaf.plugin.version}</version>
>                     <configuration>
>                         
> <includeBuildOutputDirectory>false</includeBuildOutputDirectory>
>                         <blacklistedFeatures>
>                             <!-- will be replaced by felix-http 
> (http://blog.nanthrax.net/?p=1038) -->
>                             <feature>http</feature>
>                             <feature>pax-web-*</feature>
>
>                             <!-- diagnostic-feature results in HealthCheck : 
> WARN Inactive bundle 308 org.apache.karaf.diagnostic.boot: RESOLVED -->
>                             <feature>diagnostic</feature>
>
>                             <!-- Blacklisting the Apache Aries 
> transaction-blueprint bundles to prevent a -->
>                             <!-- "Ignored XML validation warning 
> org.xml.sax.SAXParseException". Included by Cellar -->
>                             
> <blacklistedFeature>transaction</blacklistedFeature>
>                         </blacklistedFeatures>
>
>                         <blacklistedBundles>
>                             <!-- Excluding this bundle from the 
> framework-feature, because of the 
> mvn:jakarta.xml.bind/jakarta.xml.bind-api/2.3.2 bundle from the cxf-feature 
> -->
>                             
> <bundle>mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxb-api-2.2/2.9.0</bundle>
>                         </blacklistedBundles>
>                         <bootRepositories>
>                             
> <bootRepository>mvn:org.apache.karaf.features/spring/${karaf.runtime.version}/xml/features</bootRepository>
>                         </bootRepositories>
>                         <startupFeatures>
>                             <startupFeature>eventadmin</startupFeature>
>                         </startupFeatures>
>                         <bootFeatures>
>                             <bootFeature>scr</bootFeature>
>                             <bootFeature>standard</bootFeature>
>                             <bootFeature>webconsole</bootFeature>
>                             <bootFeature>felix-http</bootFeature>
>
>                             <bootFeature>decanter-collector-jmx</bootFeature>
>                             
> <bootFeature>decanter-appender-prometheus</bootFeature>
>                         </bootFeatures>
>                         <javase>11</javase>
>                         <archiveTarGz>false</archiveTarGz>
>                         <propertyFileEdits>
>                             
> ${project.build.directory}/maven-shared-archive-resources/propertyFileEdits/assembly-property-edits.xml
>                         </propertyFileEdits>
>                         <classifier>distribution</classifier>
>                         <useReferenceUrls>true</useReferenceUrls>
>                     </configuration>
>                 </plugin>
>
> Kind regards,
> Steven Huypens

Reply via email to