geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dileepa Jayakody <dile...@wso2.com>
Subject Class Loading issue with Dynamic-Imports in Geronimo
Date Mon, 03 Sep 2012 07:45:22 GMT
Hi All,

I'm deploying a set of osgi bundles in Geronimo (under /hotbundles). Among
these bundles is a customized axis2 bundle which is used by our core to
deploy axis2 services and modules.
At startup when axis2 deployer is deploying modules and services I came
across the below [1] NoClassDefFoundError exception for
org.wso2.carbon.core.AbstractAdmin class.
(This class is extended by most of our axis2 service classes and it is
loaded dynamically using class.forname in axis2)

Can this be an issue with how Dynamic-Imports work in Geronimo? How does
class loading happen in
org.apache.geronimo.hook.equinox.GeronimoClassLoader for dynamically
imported classes?
Appreciate your advice.

Thanks,
Dileepa

[1]
2012-09-03 12:33:19,266] FATAL
{org.wso2.carbon.core.init.CarbonServerManager} -  WSO2 Carbon
initialization Failed
java.lang.NoClassDefFoundError: org/wso2/carbon/core/AbstractAdmin
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at
org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213)
    at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
    at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
    at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
    at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
    at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
    at
org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237)
    at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
    at
org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
    at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)
    at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at
org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
    at org.apache.axis2.util.Loader.loadClass(Loader.java:261)
    at org.apache.axis2.util.Loader.loadClass(Loader.java:229)
    at org.apache.axis2.util.Utils.getServiceClass(Utils.java:799)
    at
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:430)
    at
org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:397)
    at
org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101)
    at
org.wso2.carbon.utils.deployment.Axis2ServiceRegistry.addServices(Axis2ServiceRegistry.java:217)
    at
org.wso2.carbon.utils.deployment.Axis2ServiceRegistry.register(Axis2ServiceRegistry.java:102)
    at
org.wso2.carbon.utils.deployment.Axis2ServiceRegistry.register(Axis2ServiceRegistry.java:89)
    at
org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:471)
    at
org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:288)
    at
org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
    at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
    at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.ClassNotFoundException:
org.wso2.carbon.core.AbstractAdmin
    at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
    at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at
org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)


-- 
Dileepa Jayakody,
Software Engineer, WSO2 Inc.
Lean . Enterprise . Middleware

Mobile : +94777-857616

Mime
View raw message