hadooposgihbasespringsource-dm-server

Is it possible to connect to HBase from an SpringDM application? Getting missing constraint for com.sun.security.auth!


I'm building a webapp that should connect to a HBase datastore. Since there is no OSGi'fied version (that I'm aware of) of the hadoop-core and hbase jars I was planning on using BND to generate these. When I provision them however, the following pops up: Missing Constraint: Import-Package: com.sun.security.auth; version="0.0.0"

Any ideas on where to find a (OSGi'fied) jar for this package? Is it überhaupt possible to connect to HBase from a SpringDM app? Apart from DataNucleus I haven't seen anybody doing so...

Any help would be greatly appreciated! Kind regards,

Niels


Solution

  • The error message is telling you that your bundle wants to import a package (when you take a look at its manifest, you will see an Import-Package statements, which will include com.sun.security.auth). This is a class that is provided by the Sun Java VM, but not exported by default from the OSGi framework bundle (bundle 0); this is because is is not part of the Java class library, but is Sun-specific.

    If you really need this class, you can use a framework property to make the system bundle export it; you will need a statement like

    org.osgi.framework.system.packages.extra=com.sun.security.auth
    

    The exact way in which you can give this directive, depends on the framework launcher you use.