java.lang.NoClassDefFoundError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Re: Aries Blueprint and cglib
    via by Johan Edstrom,
  • Re: Aries Blueprint and cglib
    via by Johan Edstrom,
  • This stack trace is found during REFAPP startup:- {noformat} java.lang.ClassNotFoundException: org.apache.velocity.runtime.resource.ResourceManagerImpl [INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772) [INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) [INFO] [talledLocalContainer] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690) [INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [INFO] [talledLocalContainer] at com.atlassian.templaterenderer.velocity.CompositeClassLoader.loadClass(CompositeClassLoader.java:117) [INFO] [talledLocalContainer] at java.lang.Class.forName0(Native Method) [INFO] [talledLocalContainer] at java.lang.Class.forName(Class.java:247) [INFO] [talledLocalContainer] at org.apache.velocity.util.ClassUtils.getClass(ClassUtils.java:64) [INFO] [talledLocalContainer] at org.apache.velocity.util.ClassUtils.getNewInstance(ClassUtils.java:96) [INFO] [talledLocalContainer] at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:639) [INFO] [talledLocalContainer] at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:251) [INFO] [talledLocalContainer] at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107) [INFO] [talledLocalContainer] at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.<init>(VelocityTemplateRendererImpl.java:66) [INFO] [talledLocalContainer] at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererServiceFactory.getService(VelocityTemplateRendererServiceFactory.java:33) [INFO] [talledLocalContainer] at org.springframework.osgi.service.exporter.support.internal.support.PublishingServiceFactory.getService(PublishingServiceFactory.java:105) [INFO] [talledLocalContainer] at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:307) [INFO] [talledLocalContainer] at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:221) [INFO] [talledLocalContainer] at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:295) [INFO] [talledLocalContainer] at org.apache.felix.framework.Felix.getService(Felix.java:3007) [INFO] [talledLocalContainer] at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:329) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.support.ServiceWrapper.getService(ServiceWrapper.java:99) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor$ServiceLookUpCallback.doWithRetry(ServiceDynamicInterceptor.java:107) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.support.RetryTemplate.execute(RetryTemplate.java:83) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.lookupService(ServiceDynamicInterceptor.java:430) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.getTarget(ServiceDynamicInterceptor.java:415) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.internal.aop.ServiceDynamicInterceptor.afterPropertiesSet(ServiceDynamicInterceptor.java:472) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean.createProxy(OsgiServiceProxyFactoryBean.java:215) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.AbstractServiceImporterProxyFactoryBean.getObject(AbstractServiceImporterProxyFactoryBean.java:86) [INFO] [talledLocalContainer] at org.springframework.osgi.service.importer.support.OsgiServiceProxyFactoryBean.getObject(OsgiServiceProxyFactoryBean.java:161) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport$1.run(FactoryBeanRegistrySupport.java:121) [INFO] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:116) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:91) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:671) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:610) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:622) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:584) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [INFO] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method) [INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) {noformat} By looking at the OSGi bundle, the package org.apache.velocity.runtime.resource is not being imported:- {noformat} e.velocity.runtime.directive;version="[1.6,1.7)",org.apache.velocity .runtime.log;version="[1.6,1.7)",org.apache.velocity.runtime.parser.n ode;version="[1.6,1.7)",org.apache.velocity.runtime.resource.loader;v ersion="[1.6,1.7)",org.apache.velocity.util;version="[1.6,1.7)",org.a pache.velocity.util.introspection;version="[1.6,1.7)",org.osgi.framew ork;resolution:=optional;version="1.5",org.slf4j;resolution:=optional ;version="1.5" {noformat} I think our package scanner is just not smart enough in this case and perhaps the solution would be to explicitly declare the missing package import.
    via by Piyawoot Songsiritat,
  • NoClassDefFoundError in Osgi w/ Felix, ant
    via Stack Overflow by Dima O
    ,
    • java.lang.NoClassDefFoundError: org/apache/servicemix
    • mr/api/service/ServiceHelper at org.apache.servicemix.jbi.runtime.impl.ComponentContextImpl.deactivateEndpoint(ComponentContextImpl.java:129) at org.apache.servicemix.common.endpoints.ProviderEndpoint.deactivate(ProviderEndpoint.java:69) at org.apache.servicemix.common.DefaultServiceUnit.removeEndpoint(DefaultServiceUnit.java:206) at org.apache.servicemix.common.DefaultComponent.removeEndpoint(DefaultComponent.java:301) at org.apache.servicemix.wsn.component.WSNComponent$WSNEndpointManager$1.run(WSNComponent.java:283) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.ClassNotFoundException: org.apache.servicemix.nmr.api.service.ServiceHelper at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772) at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 8 more

    Users with the same issue

    poroszdporoszd
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,