Details
-
Enhancement
-
Resolution: Done
-
Minor
-
jboss-fuse-6.2.1
-
None
-
%
-
6.3 Sprint 2 (1-Feb - 26-Feb)
Description
The focus of this request for enhancement is to upgrade an existing exception handler to provide better diagnostics that can help identify the culprit file. The following is from the person making this enhancement request and who encountered the error:
A developer was experiencing an issue on a local Fuse Fabric. The error message below was being thrown at start up, prseumably indicating that one of the features files was corrupted. However, the message "Error while populating repositries from uri" isn't particularly helpful. Looking at the code for io.fabric8.features.FabricFeaturesServiceImpl, it seems that it would be quite simple to wrap the offending lines in a try / catch block and log the URI before rethrowing the error.
2015-11-18 11:49:54,456 | WARN | pool-17-thread-1 | FeaturesService | atures.FabricFeaturesServiceImpl 337 | 86 - io.fabric8.fabric-features-service - 1.0.0.redhat-379 | Error while populating repositories from uri. java.util.concurrent.ExecutionException: java.io.IOException at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)[82:com.google.guava:15.0.0] at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)[82:com.google.guava:15.0.0] at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)[82:com.google.guava:15.0.0] at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:135)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2344)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache.get(LocalCache.java:3932)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3936)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4806)[82:com.google.guava:15.0.0] at io.fabric8.features.FabricFeaturesServiceImpl.populateRepositories(FabricFeaturesServiceImpl.java:345)[86:io.fabric8.fabric-features-service:1.0.0.redhat-379] at io.fabric8.features.FabricFeaturesServiceImpl.listInstalledRepositories(FabricFeaturesServiceImpl.java:335)[86:io.fabric8.fabric-features-service:1.0.0.redhat-379] at io.fabric8.features.FabricFeaturesServiceImpl.run(FabricFeaturesServiceImpl.java:93)[86:io.fabric8.fabric-features-service:1.0.0.redhat-379] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_51] at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_51] at java.lang.Thread.run(Thread.java:744)[:1.7.0_51] Caused by: java.io.IOException at org.apache.karaf.features.internal.RepositoryImpl.load(RepositoryImpl.java:231)[86:io.fabric8.fabric-features-service:1.0.0.redhat-379] at io.fabric8.features.FabricFeaturesServiceImpl$1.load(FabricFeaturesServiceImpl.java:65)[86:io.fabric8.fabric-features-service:1.0.0.redhat-379] at io.fabric8.features.FabricFeaturesServiceImpl$1.load(FabricFeaturesServiceImpl.java:61)[86:io.fabric8.fabric-features-service:1.0.0.redhat-379] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)[82:com.google.guava:15.0.0] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)[82:com.google.guava:15.0.0] ... 13 more