First off I'm new to OSGi bundling, so it's probably me that have
overlooked some detail. I am using the Equinox 3.5 release, and starting
my bundle using the console.
However during some CORBA communication the application fails. The problem
boils down to this:
In the bundle I make a call to java.util.TimeZone.getDefault(), it works
fine. However when I serialize the result of
java.util.TimeZone.getDefault() and then deserialize it I get this error:
java.lang.ClassNotFoundException: sun.util.calendar.ZoneInfo
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:489)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at
java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:585)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
Apparantly java.util.TimeZone.getDefault() returns an object from the
sun.util.calendar package. It doesn't seem to be posible to import the
package (And I would rather avoid having to import a sun package).
Do you have any suggestions on solving this problem?