com.springsource.server.osgi.framework.OsgiFrameworkException: Failed to get class loader for bundle 'file:////home/me/path/to/springsource-dm-server-1.0.2.RELEASE/work/com.springsource.server.deployer/Module/myapp-1.0.0.jar-0/myapp-1.0. 0.jar [67]' - possible resolution problem: 14747 null 14748 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:91) 14749 at com.springsource.server.osgi.framework.equinox.EquinoxOsgiFramework.getBundleClassLoader(EquinoxOsgiFramework.java:243) 14750 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14751 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14752 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14753 at java.lang.reflect.Method.invoke(Method.java:597) 14754 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

SpringSource Issue Tracker | E. Sammer | 8 years ago
  1. 0

    When attempting to deploy a simple bundle (no Import-Package, no Export-Package, and nothing dm specific - plain OSGI) as either a jar or a war, I am seeing NullPointerExceptions from one of underlying Equinox packages. Stack trace from serviability/trace/trace.log: 14746 com.springsource.server.osgi.framework.OsgiFrameworkException: Failed to get class loader for bundle 'file:////home/me/path/to/springsource-dm-server-1.0.2.RELEASE/work/com.springsource.server.deployer/Module/myapp-1.0.0.jar-0/myapp-1.0. 0.jar [67]' - possible resolution problem: 14747 null 14748 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:91) 14749 at com.springsource.server.osgi.framework.equinox.EquinoxOsgiFramework.getBundleClassLoader(EquinoxOsgiFramework.java:243) 14750 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14751 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14752 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14753 at java.lang.reflect.Method.invoke(Method.java:597) 14754 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 14755 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) 14755 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) 14756 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) 14757 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14758 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14759 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14760 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14761 at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) 14762 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14763 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14764 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14765 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14766 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 14767 at $Proxy77.getBundleClassLoader(Unknown Source) 14768 at com.springsource.server.deployer.core.module.StandardModule.pushThreadContextClassLoader(StandardModule.java:793) 14769 at com.springsource.server.deployer.core.module.StandardModule.pushThreadContext(StandardModule.java:765) 14770 at com.springsource.server.deployer.core.module.StandardModule.deploy(StandardModule.java:301) 14771 at com.springsource.server.deployer.app.legacy.SingleBundleApplication.deploy(SingleBundleApplication.java:123) 14772 at com.springsource.server.deployer.core.internal.StandardApplicationDeployer.deploy(StandardApplicationDeployer.java:329) 14773 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14774 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14775 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14776 at java.lang.reflect.Method.invoke(Method.java:597) 14777 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 14778 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) 14779 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) 14780 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14781 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14782 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14783 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14784 at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) 14785 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14786 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14787 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14788 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14789 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 14790 at $Proxy14.deploy(Unknown Source) 14791 at com.springsource.server.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:190) 14792 at com.springsource.server.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:91) 14793 at com.springsource.server.io.core.fs.WatchTask.notifyListeners(WatchTask.java:194) 14794 at com.springsource.server.io.core.fs.WatchTask.notifyListeners(WatchTask.java:188) 14795 at com.springsource.server.io.core.fs.WatchTask.processMonitoredRecord(WatchTask.java:182) 14796 at com.springsource.server.io.core.fs.WatchTask.run(WatchTask.java:107) 14797 at java.lang.Thread.run(Thread.java:619) 14798 Caused by: java.lang.reflect.InvocationTargetException 14799 at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) 14800 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14801 at java.lang.reflect.Method.invoke(Method.java:597) 14802 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:88) 14803 ... 49 more 14804 Caused by: java.lang.NullPointerException 14805 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.createProtectionDomain(DefaultClassLoader.java:232) 14806 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.createClassPathEntry(DefaultClassLoader.java:161) 14807 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.createClassPathEntry(ClasspathManager.java:259) 14808 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.getClasspath(ClasspathManager.java:226) 14809 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.addClassPathEntry(ClasspathManager.java:189) 14810 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassPathEntry(ClasspathManager.java:167) 14811 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.buildClasspath(ClasspathManager.java:145) 14812 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.initialize(ClasspathManager.java:79) 14813 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.initialize(DefaultClassLoader.java:181) 14814 at org.eclipse.osgi.framework.internal.core.BundleLoader.createBCL(BundleLoader.java:845) 14815 at org.eclipse.osgi.framework.internal.core.BundleLoader.createBCLPrevileged(BundleLoader.java:820) 14816 at org.eclipse.osgi.framework.internal.core.BundleLoader.createClassLoader(BundleLoader.java:352) 14817 ... 53 more (Line numbers are from vim - please ignore.) Even after eliminating all internal libraries and classes - just an empty OSGI bundle - I receive this error. Recent trace logs, dump files, and a stripped down war file are available for debugging. I originally posted this to the dm forums and was asked to file a bug by Andy Wilkinson. http://forum.springsource.org/showthread.php?t=68788

    SpringSource Issue Tracker | 8 years ago | E. Sammer
    com.springsource.server.osgi.framework.OsgiFrameworkException: Failed to get class loader for bundle 'file:////home/me/path/to/springsource-dm-server-1.0.2.RELEASE/work/com.springsource.server.deployer/Module/myapp-1.0.0.jar-0/myapp-1.0. 0.jar [67]' - possible resolution problem: 14747 null 14748 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:91) 14749 at com.springsource.server.osgi.framework.equinox.EquinoxOsgiFramework.getBundleClassLoader(EquinoxOsgiFramework.java:243) 14750 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14751 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14752 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14753 at java.lang.reflect.Method.invoke(Method.java:597) 14754 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
  2. 0

    When attempting to deploy a simple bundle (no Import-Package, no Export-Package, and nothing dm specific - plain OSGI) as either a jar or a war, I am seeing NullPointerExceptions from one of underlying Equinox packages. Stack trace from serviability/trace/trace.log: 14746 com.springsource.server.osgi.framework.OsgiFrameworkException: Failed to get class loader for bundle 'file:////home/me/path/to/springsource-dm-server-1.0.2.RELEASE/work/com.springsource.server.deployer/Module/myapp-1.0.0.jar-0/myapp-1.0. 0.jar [67]' - possible resolution problem: 14747 null 14748 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:91) 14749 at com.springsource.server.osgi.framework.equinox.EquinoxOsgiFramework.getBundleClassLoader(EquinoxOsgiFramework.java:243) 14750 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14751 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14752 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14753 at java.lang.reflect.Method.invoke(Method.java:597) 14754 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 14755 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) 14755 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) 14756 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) 14757 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14758 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14759 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14760 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14761 at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) 14762 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14763 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14764 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14765 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14766 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 14767 at $Proxy77.getBundleClassLoader(Unknown Source) 14768 at com.springsource.server.deployer.core.module.StandardModule.pushThreadContextClassLoader(StandardModule.java:793) 14769 at com.springsource.server.deployer.core.module.StandardModule.pushThreadContext(StandardModule.java:765) 14770 at com.springsource.server.deployer.core.module.StandardModule.deploy(StandardModule.java:301) 14771 at com.springsource.server.deployer.app.legacy.SingleBundleApplication.deploy(SingleBundleApplication.java:123) 14772 at com.springsource.server.deployer.core.internal.StandardApplicationDeployer.deploy(StandardApplicationDeployer.java:329) 14773 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14774 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14775 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14776 at java.lang.reflect.Method.invoke(Method.java:597) 14777 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 14778 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) 14779 at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) 14780 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14781 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14782 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14783 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14784 at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) 14785 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14786 at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 14787 at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 14788 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 14789 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 14790 at $Proxy14.deploy(Unknown Source) 14791 at com.springsource.server.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:190) 14792 at com.springsource.server.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:91) 14793 at com.springsource.server.io.core.fs.WatchTask.notifyListeners(WatchTask.java:194) 14794 at com.springsource.server.io.core.fs.WatchTask.notifyListeners(WatchTask.java:188) 14795 at com.springsource.server.io.core.fs.WatchTask.processMonitoredRecord(WatchTask.java:182) 14796 at com.springsource.server.io.core.fs.WatchTask.run(WatchTask.java:107) 14797 at java.lang.Thread.run(Thread.java:619) 14798 Caused by: java.lang.reflect.InvocationTargetException 14799 at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) 14800 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14801 at java.lang.reflect.Method.invoke(Method.java:597) 14802 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:88) 14803 ... 49 more 14804 Caused by: java.lang.NullPointerException 14805 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.createProtectionDomain(DefaultClassLoader.java:232) 14806 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.createClassPathEntry(DefaultClassLoader.java:161) 14807 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.createClassPathEntry(ClasspathManager.java:259) 14808 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.getClasspath(ClasspathManager.java:226) 14809 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.addClassPathEntry(ClasspathManager.java:189) 14810 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassPathEntry(ClasspathManager.java:167) 14811 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.buildClasspath(ClasspathManager.java:145) 14812 at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.initialize(ClasspathManager.java:79) 14813 at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.initialize(DefaultClassLoader.java:181) 14814 at org.eclipse.osgi.framework.internal.core.BundleLoader.createBCL(BundleLoader.java:845) 14815 at org.eclipse.osgi.framework.internal.core.BundleLoader.createBCLPrevileged(BundleLoader.java:820) 14816 at org.eclipse.osgi.framework.internal.core.BundleLoader.createClassLoader(BundleLoader.java:352) 14817 ... 53 more (Line numbers are from vim - please ignore.) Even after eliminating all internal libraries and classes - just an empty OSGI bundle - I receive this error. Recent trace logs, dump files, and a stripped down war file are available for debugging. I originally posted this to the dm forums and was asked to file a bug by Andy Wilkinson. http://forum.springsource.org/showthread.php?t=68788

    SpringSource Issue Tracker | 8 years ago | E. Sammer
    com.springsource.server.osgi.framework.OsgiFrameworkException: Failed to get class loader for bundle 'file:////home/me/path/to/springsource-dm-server-1.0.2.RELEASE/work/com.springsource.server.deployer/Module/myapp-1.0.0.jar-0/myapp-1.0. 0.jar [67]' - possible resolution problem: 14747 null 14748 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:91) 14749 at com.springsource.server.osgi.framework.equinox.EquinoxOsgiFramework.getBundleClassLoader(EquinoxOsgiFramework.java:243) 14750 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14751 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14752 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14753 at java.lang.reflect.Method.invoke(Method.java:597) 14754 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

    Root Cause Analysis

    1. com.springsource.server.osgi.framework.OsgiFrameworkException

      Failed to get class loader for bundle 'file:////home/me/path/to/springsource-dm-server-1.0.2.RELEASE/work/com.springsource.server.deployer/Module/myapp-1.0.0.jar-0/myapp-1.0. 0.jar [67]' - possible resolution problem: 14747 null 14748 at com.springsource.server.osgi.framework.equinox.EquinoxUtils.getBundleClassLoader(EquinoxUtils.java:91) 14749 at com.springsource.server.osgi.framework.equinox.EquinoxOsgiFramework.getBundleClassLoader(EquinoxOsgiFramework.java:243) 14750 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14751 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 14752 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 14753 at java.lang.reflect.Method.invoke(Method.java:597) 14754 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

      at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke()
    2. Spring OSGi Core
      ServiceInvoker.doInvoke
      1. org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      2. org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      2 frames