Community
Participate
Working Groups
Build Identifier: 3.7.0.v20110613 DuplicateBundleException implements Serializable (inherited from Throwable) but is not serializable, since the "duplicate" member of type Bundle (implemented by BundleHost) is not. I ran into this problem when using a Framework via a thin RMI wrapper. The remote caller only receives a NotSerializableException for BundleHost and never sees the DuplicateBundleException indicating the real cause. Reproducible: Always Steps to Reproduce: Install the same bundle twice with different locations using an RMI wrapper.
There are a few implementers of org.eclipse.osgi.framework.adaptor.StatusException that all have a similar issue. Looking at them I am thinking the most simple thing to do is to make the status object transient for all the cases: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.TerminatingClassNotFoundException org.eclipse.osgi.framework.internal.core.AbstractBundle.BundleStatusException org.eclipse.osgi.framework.internal.core.Framework.DuplicateBundleException In the TerminatingClassNotFoundException case it likely doesn't need to be transient, because the status object should always be another Throwable which is serializable. The status object is really only important in the exact context the exception was thrown. Even if we could serialize the status object it likely would have little meaning on the other end where you de-serialize it.
Fixed in the following commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=2e949b1a58c7d93f62fdebff512044d0fda3f8a9