Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » javax.net.ssl and jersey dependency(can't find bundles export jersey and javax.net.ssl)
javax.net.ssl and jersey dependency [message #988221] Wed, 28 November 2012 22:04 Go to next message
anatoly shein is currently offline anatoly shein
Messages: 1
Registered: November 2012
Junior Member
Hi
I have to develop some bundle that uses jersey and javax.net.ssl packages for REST communication with remote service. Deploy of the bundle fails with notice on javax.net.ssl package. I've searched for bundle that exports it but found nothing. How should I import javax.net.ssl and jersey packages?

I'm using virgo server that comes with vmware vsphere vcenter 5.1
My manifest looks like this:
================
Manifest-Version: 1.0
Export-Package: com.tonian.api.rest;uses:="com.sun.jersey.api.client,c
om.tonian.director.ui.commons.view.model,com.tonian.vcplugin.model",c
om.tonian.vcplugin.model,com.vmware.samples.wssdkprovider;uses:="com.
vmware.vim25,com.vmware.vise.data.query,com.vmware.vise.security,com.
vmware.vise.usersession,com.vmware.vise.vim.data,javax.net.ssl"
Bundle-Vendor: accera
Bundle-Version: 1.0.2
Tool: Bundlor 1.1.0.RELEASE
Bundle-Name: vsphere-wssdk-provider
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.vmware.samples.wssdkprovider
Import-Package: com.sun.jersey.api.client,com.accera.director.commons,
com.accera.director.commons.web,com.accera.director.ui.commons.view.m
odel,com.vmware.vim25,com.vmware.vise.data.query,com.vmware.vise.secu
rity,com.vmware.vise.usersession,com.vmware.vise.vim.data,javax.net.s
sl,javax.xml.ws,org.apache.commons.logging
the log:
================
[2012-11-27 18:37:10.371] [INFO ] TCP Connection(51)-127.0.0.1 <DE0000I> Installing bundle 'com.vmware.samples.wssdkprovider' version '1.0.2'.
[2012-11-27 18:37:10.511] [INFO ] TCP Connection(51)-127.0.0.1 <DE0001I> Installed bundle 'com.vmware.samples.wssdkprovider' version '1.0.2'.
[2012-11-27 18:37:10.519] [INFO ] TCP Connection(51)-127.0.0.1 <DE0004I> Starting bundle 'com.vmware.samples.wssdkprovider' version '1.0.2'.
[2012-11-27 18:37:10.760] [ERROR] region-dm-5 <AG0000E> Application context creation failure for bundle 'com.vmware.samples.wssdkprovider' version '1.0.2'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'VmDataProvider': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'VmDataProviderImpl' defined in URL [bundleentry://265.fwk1811861298/META-INF/spring/bundle-context.xml]: Resolution of declared constructors on bean Class [com.vmware.samples.wssdkprovider.VmDataProviderImpl] from ClassLoader [KernelBundleClassLoader: [bundle=com.vmware.samples.wssdkprovider_1.0.2]] failed; nested exception is java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'VmDataProviderImpl' defined in URL [bundleentry://265.fwk1811861298/META-INF/spring/bundle-context.xml]: Resolution of declared constructors on bean Class [com.vmware.samples.wssdkprovider.VmDataProviderImpl] from ClassLoader [KernelBundleClassLoader: [bundle=com.vmware.samples.wssdkprovider_1.0.2]] failed; nested exception is java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.afterPropertiesSet(OsgiServiceFactoryBean.java:167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 17 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getDeclaredConstructors(Class.java:1853)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:157)
... 28 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: javax.net.ssl.HostnameVerifier in KernelBundleClassLoader: [bundle=com.vmware.samples.wssdkprovider_1.0.2]
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:138)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 32 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.net.ssl.HostnameVerifier
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:134)
... 33 common frames omitted
Re: javax.net.ssl and jersey dependency [message #988350 is a reply to message #988221] Thu, 29 November 2012 14:15 Go to previous message
Dmitry Sklyut is currently offline Dmitry Sklyut
Messages: 272
Registered: January 2010
Senior Member
javax.net.ssl is part of "org.osgi.framework.system.packages" property from java6-server.profile. This blog post has a nice description of that property.

Try to check if that class is available in the -clean server start up. Are you deploying kernel or tomcat/etc package?

Thanks
Dmitry
Previous Topic:Spring security on Virgo
Next Topic:Shutdown Virgo programmatically
Goto Forum:
  


Current Time: Wed Oct 01 06:11:34 GMT 2014

Powered by FUDForum. Page generated in 0.02295 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software