
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Equinox 3.3
Run on Eclipse 3.3 with PDE
Equinox 3.3
Run on Eclipse 3.3 with PDE
|
|
|
We have been developing a system using Spring DM for both application logic componentization and wiring as well as spring mvc for the web interface. Everything was working OK with 1.1.0M2 but, when upgrading to final 1.1.0 the following exception appears:
[Start Level Event Dispatcher] WARN org.springframework.osgi.extender.internal.activator.ContextLoaderListener - Cannot start bundle es.itecban.deployment.repository.manager due to
java.lang.NullPointerException
at org.springframework.osgi.io.internal.resolver.PackageAdminResolver.addExportedPackages(PackageAdminResolver.java:198)
at org.springframework.osgi.io.internal.resolver.PackageAdminResolver.getImportedBundles(PackageAdminResolver.java:78)
at org.springframework.osgi.extender.internal.activator.SpringTypeCompatibilityChecker.checkCompatibility(SpringTypeCompatibilityChecker.java:71)
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.maybeCreateApplicationContextFor(ContextLoaderListener.java:721)
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.start(ContextLoaderListener.java:416)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)
I have skimmed through the Spring DM code and it looks the problem comes when processing Required Bundles, but the trace does not provide where exactly is the problem.
After setting up the Target Platform for debugging I found the problem appears when Spring DM processes my require bundle header, specifically the first entry:
Require-Bundle: org.eclipse.emf,
org.eclipse.emf.ecore.xmi,
org.eclipse.emf.teneo.hibernate;visibility:=reexport,
org.eclipse.xsd
In execution, on line 79 of the PackageAdminResolver, the call to the OSGi service:
ExportedPackage[] exportedPackages = pa.getExportedPackages(requiredBundle);
returns null (which is correct with the specification, as the emf main bundle does not actually export any package.
After that, the exception is thrown when trying to read the length of the array (line 198).
packages = new ArrayList(pkgs.length);
I think checking the exported packages are not null should be enough to solve the problem.
Félix
|
|
Description
|
We have been developing a system using Spring DM for both application logic componentization and wiring as well as spring mvc for the web interface. Everything was working OK with 1.1.0M2 but, when upgrading to final 1.1.0 the following exception appears:
[Start Level Event Dispatcher] WARN org.springframework.osgi.extender.internal.activator.ContextLoaderListener - Cannot start bundle es.itecban.deployment.repository.manager due to
java.lang.NullPointerException
at org.springframework.osgi.io.internal.resolver.PackageAdminResolver.addExportedPackages(PackageAdminResolver.java:198)
at org.springframework.osgi.io.internal.resolver.PackageAdminResolver.getImportedBundles(PackageAdminResolver.java:78)
at org.springframework.osgi.extender.internal.activator.SpringTypeCompatibilityChecker.checkCompatibility(SpringTypeCompatibilityChecker.java:71)
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.maybeCreateApplicationContextFor(ContextLoaderListener.java:721)
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.start(ContextLoaderListener.java:416)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)
I have skimmed through the Spring DM code and it looks the problem comes when processing Required Bundles, but the trace does not provide where exactly is the problem.
After setting up the Target Platform for debugging I found the problem appears when Spring DM processes my require bundle header, specifically the first entry:
Require-Bundle: org.eclipse.emf,
org.eclipse.emf.ecore.xmi,
org.eclipse.emf.teneo.hibernate;visibility:=reexport,
org.eclipse.xsd
In execution, on line 79 of the PackageAdminResolver, the call to the OSGi service:
ExportedPackage[] exportedPackages = pa.getExportedPackages(requiredBundle);
returns null (which is correct with the specification, as the emf main bundle does not actually export any package.
After that, the exception is thrown when trying to read the length of the array (line 198).
packages = new ArrayList(pkgs.length);
I think checking the exported packages are not null should be enough to solve the problem.
Félix
|
Show » |
|
We have a bundle which exports no package.
PackageAdmin.getExportedPackages(Bundle) may return null:
@return An array of exported packages, or <code>null</code> if the specified bundle has no exported packages.