Announcement Announcement Module
Collapse
No announcement yet.
Package already included in Import-Package, but still Receive ClassNotFoundException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Package already included in Import-Package, but still Receive ClassNotFoundException

    My bundle threw the following exception:

    Code:
    [2010-02-07 23:36:31.950] Thread-3                     <AG0000E> Application context creation failure for bundle 'com.apress.prodmserver.vehicle-1-com.apress.prodmserver.vehicle.service' version '1.0.0'. java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException
    	at java.lang.Class.getDeclaredMethods0(Native Method)
    	at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    	at java.lang.Class.getDeclaredMethods(Class.java:1791)
    	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:449)
    	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:431)
    	at org.springframework.util.ReflectionUtils.getAllDeclaredMethods(ReflectionUtils.java:473)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:626)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:565)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1277)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:302)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:424)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.invokeBeanFactoryPostProcessors(AbstractDelegatedExecutionApplicationContext.java:395)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:281)
    	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:214)
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
    	at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
    	at com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106)
    	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:619)
    Caused by: com.springsource.kernel.osgi.framework.ExtendedClassNotFoundException: org.aspectj.lang.NoAspectBoundException in KernelBundleClassLoader: [bundle=org.springframework.aspects_3.0.0.RELEASE]
    	at com.springsource.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:149)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    	... 23 common frames omitted
    Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.NoAspectBoundException
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
    	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
    	at com.springsource.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:145)
    	... 25 common frames omitted
    While the Manifest file already included this particular package:

    Code:
    Manifest-Version: 1.0
    Export-Package: com.apress.prodmserver.vehicle.service;version="1.0.0"
    Bundle-Version: 1.0.0
    Tool: Bundlor 1.0.0.M6
    Bundle-Name: com.apress.prodmserver.vehicle.service Name
    Bundle-ManifestVersion: 2
    Import-Package: com.apress.prodmserver.vehicle.domain;version="[1.0.0,
     1.0.0]",com.apress.prodmserver.vehicle.repository;version="[1.0.0,1.0
     .0]",org.springframework.beans.factory.annotation;version="[3.0.0,3.1
     .0)",org.springframework.transaction;version="[3.0, 3.1)",org.springf
     ramework.transaction.annotation;version="[3.0.0,3.1.0)",org.springfra
     mework.transaction.aspectj;version="[3.0,3.1)",
     org.aspectj.lang;version="[1.6.6,1.6.7)"
    Bundle-SymbolicName: com.apress.prodmserver.vehicle.service
    Environments: Windows 7, dm Server 2.0.0.RELEASE

  • #2
    This issue went away after I packaged the my project with maven and deployed directly to dm server instead of going through the GUI.

    Comment

    Working...
    X