Sunday, June 3, 2012

java.lang.NoClassDefFoundError: oracle/integration/platform/kernel/FabricMeshUtils

We often get this error while using OSB with JCA File Adapter:

java.lang.NoClassDefFoundError: oracle/integration/platform/kernel/FabricMeshUtils
        at oracle.tip.adapter.file.inbound.FileListDAO.(FileListDAO.java:188)
        at oracle.tip.adapter.file.inbound.PollWork.(PollWork.java:236)
        at oracle.tip.adapter.file.FileResourceAdapter.endpointActivation(FileResourceAdapter.java:222)
        at oracle.tip.adapter.sa.impl.fw.jca.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:498)
        at oracle.tip.adapter.sa.impl.inbound.JCABindingActivationAgent.activateEndpoint(JCABindingActivationAgent.java:336)
        at oracle.tip.adapter.sa.impl.JCABindingServiceImpl.activate(JCABindingServiceImpl.java:113)


the class is in C:\Oracle\Middleware\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar

or in
C:\Oracle\Middleware\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar

(better use the latter...)


and in oracle.tip.adapter.file.inbound.FileListDAO there is clearly a dependency:
import oracle.integration.platform.blocks.FabricConfigManager;
import oracle.integration.platform.kernel.FabricMeshUtils;



When loading this class fails, you will see in the logs "Unable to retrieve database info"

After adding the fabric-runtime.jar file to $DOMAIN_HOME/lib, I still get:




While trying to lookup 'soa-infra:comp.ApplicationContext' didn't find subcontext 'soa-infra:comp'. Resolved ''
javax.naming.NameNotFoundException: While trying to lookup 'soa-infra:comp.ApplicationContext' didn't find subcontext 'soa-infra:comp'. Resolved ''; remaining name 'soa-infra:comp/ApplicationContext'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.integration.platform.kernel.FabricMeshUtils.getApplicationContext(FabricMeshUtils.java:57)
at oracle.tip.adapter.file.inbound.FileListDAO.<init>(FileListDAO.java:188)
at oracle.tip.adapter.file.inbound.PollWork.<init>(PollWork.java:236)
at oracle.tip.adapter.file.FileResourceAdapter.endpointActivation(FileResourceAdapter.java:222)
at oracle.tip.adapter.sa.impl.fw.jca.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:498)
at oracle.tip.adapter.sa.impl.inbound.JCABindingActivationAgent.activateEndpoint(JCABindingActivationAgent.java:336)
at oracle.tip.adapter.sa.impl.JCABindingServiceImpl.activate(JCABindingServiceImpl.java:113)
at com.bea.wli.sb.transports.jca.binding.JCATransportInboundOperationBindingServiceImpl.activateService(JCATransportInboundOperationBindingServiceImpl.java:325)






RESOLUTION: we decided to ignore this message, if you want to configure the FileAdapter for useCompression you can do so with the JCA Activation Properties.
I assume all works fine in SOA Suite, where the FabricMeshUtils is surely available in the classpath.



In fact, further investigation proves that the only side effect of this error is that the useCompression (default: false) flag can be set only using the JCA Activation Properties, and not with a DB value (in any case OSB doesn't use any DB to store configuration information).


No comments: