Exception always occurs when patching a fabric from 6.2.0 to 6.2.1

Solution Verified - Updated -

Issue

Exception always occurs when patching a fabric from 6.2.0 to 6.2.1 by following the official document[1].

There are 2 types of Exception,ClassNotFoundException and IllegalStateException.

JBossFuse:karaf@root> log4j:ERROR Could not instantiate class [org.apache.log4j.SanitizingPatternLayout].
java.lang.ClassNotFoundException: org.apache.log4j.SanitizingPatternLayout not found by org.ops4j.pax.logging.pax-logging-service [4]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1556)
        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at org.apache.log4j.helpers.Loader.loadClass(Loader.java:198)
        at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:326)
        at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:123)
        at org.apache.log4j.PaxLoggingConfigurator.parseAppender(PaxLoggingConfigurator.java:129)
        at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
        at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
        at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
        at org.apache.log4j.PaxLoggingConfigurator.doConfigure(PaxLoggingConfigurator.java:72)
        at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl.updated(PaxLoggingServiceImpl.java:214)
        at org.ops4j.pax.logging.service.internal.PaxLoggingServiceImpl$1ManagedPaxLoggingService.updated(PaxLoggingServiceImpl.java:362)
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)
        at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)
        at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1747)
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
        at java.lang.Thread.run(Thread.java:745)
log4j:ERROR No layout set for the appender named [out].
Error in initialization script: Command not found: if
JBossFuse:karaf@root> io.fabric8.fabric-agent[io.fabric8.agent.DeploymentAgent] : Unable to update agent
java.lang.IllegalStateException: Invalid BundleContext.
        at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:514)
        at org.apache.felix.framework.BundleContextImpl.getServiceReference(BundleContextImpl.java:358)
        at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:635)
        at io.fabric8.agent.DeploymentAgent$4.run(DeploymentAgent.java:283)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
WARN : io.fabric8.patch.patch-management (280): Problem with applying the change d80cf06460b2c4f476368abd147540dbbbaa8d9a:
INFO : io.fabric8.patch.patch-management (280):  - etc/config.properties (BOTH_MODIFIED): Choosing change from patch

[1]
https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.2.1/html/Migration_Guide/ESBMigrationPatching-Fabric.html

Environment

  • Red Hat JBoss Fuse
    • 6.2.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In