Hello Dmitry, I think that it's more an OSGi container issue than a Restlet one. You can specify additional packages that are available at startup through configuration property.
For example, with Equinox and Felix, you can configure this aspect in the corresponding configuration file as described below: org.osgi.framework.bootdelegation=sun.*,com.sun.*,javax.*,org.w3c.dom Hope it helps you. Thierry > I am trying to run a sample restlet bundle under OSGi (with SSL HTTP server). > Restlet for OSGi version 2.1-rc4. > > When running it from the Eclipse environment it work fine, however trying a > standalone OSGi server results in the following traceback when starting up > my bundle (I've tried Knoplerfish and Equinox with the same result): > > java.lang.NoClassDefFoundError: > javax/security/auth/callback/UnsupportedCallbackException > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:186) > at > org.restlet.ext.ssl.internal.SslUtils.getSslContextFactory(SslUtils.java:146) > at org.restlet.ext.ssl.HttpsServerHelper.start(HttpsServerHelper.java:154) > at org.restlet.Server.start(Server.java:590) > at org.restlet.Component.startServers(Component.java:611) > at org.restlet.Component.start(Component.java:538) > at com.mysample.Activator.start(Activator.java:40) > at org.knopflerfish.framework.BundleImpl.start0(BundleImpl.java:356) > at org.knopflerfish.framework.BundleThread.run(BundleThread.java:107) > Caused by java.lang.ClassNotFoundException: > javax.security.auth.callback.UnsupportedCallbackException > at > org.knopflerfish.framework.BundleClassLoader.findClass(BundleClassLoader.java:235) > at > org.knopflerfish.framework.BundleClassLoader.loadClass(BundleClassLoader.java:349) > at java.lang.ClassLoader.loadClass(ClassLoader.java:266) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:186) > at > org.restlet.ext.ssl.internal.SslUtils.getSslContextFactory(SslUtils.java:146) > at org.restlet.ext.ssl.HttpsServerHelper.start(HttpsServerHelper.java:154) > at org.restlet.Server.start(Server.java:590) > at org.restlet.Component.startServers(Component.java:611) > at org.restlet.Component.start(Component.java:538) > at com.mysample.Activator.start(Activator.java:40) > at org.knopflerfish.framework.BundleImpl.start0(BundleImpl.java:356) > at org.knopflerfish.framework.BundleThread.run(BundleThread.java:107) > > Am I misssing something? All necessary bundles (org.restlet.*, org.json, > org.jsslutils) are installed. > > > -- > View this message in context: > http://restlet-discuss.1400322.n2.nabble.com/OSGI-startup-issue-tp7479870p7479870.html > Sent from the Restlet Discuss mailing list archive at Nabble.com. > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2949831 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2950100

