You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Geoffry Roberts <th...@gmail.com> on 2014/04/08 15:10:41 UTC
Hadoop Client and JAAS not working.
All,
How can I make the Hadoop Client find the com.sun.security.auth.module
package?
I am trying to use the Hadoop Client in an equinox container. I'm using
bndtools for my code. I'm getting an error when I try to access HDFS. The
error says it can't find com.sun.security.auth.module.UnixLoginModule.
This happens with the following code:
*Configuration conf = new Configuration();*
*conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));*
*conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));*
*conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));*
*FileSystem fs = FileSystem.get(conf);*
I've been advised to set a runtime property like so:
*-runproperties:*
*org.osgi.framework.system.packages.extra=com.sun.security.auth.module*
and to also have my bundle import the package in question:
*Import-Package: com.sun.security.auth.module*
both of which I've done to no avail. What can I do? I find working with
OSGi, issues like this crop up often especially with code that was not
originally written with OSGi in mind. Other than that, I like OSGi. I like
bndtools. I like Hadoop. Why can't they all just get along? :-)
Thanks in advance.
--
There are ways and there are ways,
Geoffry Roberts
Re: Hadoop Client and JAAS not working.
Posted by Geoffry Roberts <th...@gmail.com>.
Thanks Wim,
I am running servicemix. For the time being, I have side stepped the
issue. I am using the hadoop client only as a dependency to the accumulo
client. No doubt the need will arise again.
On Wed, Apr 30, 2014 at 10:02 AM, Wim Verreydt <wi...@anova.be> wrote:
> Hi Geoffry,
>
> The class “com.sun.security.auth.module” is provided trough the JVM. Have
> you tried running your bundle in servicemix? Servicemix has these osgi
> bootdelegations pre-configured so the container knows where to find this
> class.
>
> Regards,
>
> Wim Verreydt
>
>
> On 08 Apr 2014, at 15:10, Geoffry Roberts <th...@gmail.com> wrote:
>
> > All,
> >
> > How can I make the Hadoop Client find the com.sun.security.auth.module
> > package?
> >
> > I am trying to use the Hadoop Client in an equinox container. I'm using
> > bndtools for my code. I'm getting an error when I try to access HDFS.
> The
> > error says it can't find com.sun.security.auth.module.UnixLoginModule.
> > This happens with the following code:
> >
> > *Configuration conf = new Configuration();*
> >
> > *conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));*
> >
> > *conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));*
> >
> > *conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));*
> >
> > *FileSystem fs = FileSystem.get(conf);*
> >
> >
> > I've been advised to set a runtime property like so:
> >
> > *-runproperties:*
> > *org.osgi.framework.system.packages.extra=com.sun.security.auth.module*
> >
> >
> > and to also have my bundle import the package in question:
> >
> > *Import-Package: com.sun.security.auth.module*
> >
> >
> > both of which I've done to no avail. What can I do? I find working with
> > OSGi, issues like this crop up often especially with code that was not
> > originally written with OSGi in mind. Other than that, I like OSGi. I
> like
> > bndtools. I like Hadoop. Why can't they all just get along? :-)
> >
> > Thanks in advance.
> >
> > --
> > There are ways and there are ways,
> >
> > Geoffry Roberts
>
>
--
There are ways and there are ways,
Geoffry Roberts
Re: Hadoop Client and JAAS not working.
Posted by Wim Verreydt <wi...@anova.be>.
Hi Geoffry,
The class “com.sun.security.auth.module” is provided trough the JVM. Have you tried running your bundle in servicemix? Servicemix has these osgi bootdelegations pre-configured so the container knows where to find this class.
Regards,
Wim Verreydt
On 08 Apr 2014, at 15:10, Geoffry Roberts <th...@gmail.com> wrote:
> All,
>
> How can I make the Hadoop Client find the com.sun.security.auth.module
> package?
>
> I am trying to use the Hadoop Client in an equinox container. I'm using
> bndtools for my code. I'm getting an error when I try to access HDFS. The
> error says it can't find com.sun.security.auth.module.UnixLoginModule.
> This happens with the following code:
>
> *Configuration conf = new Configuration();*
>
> *conf.addResource(new Path(F.CFG_PATH + "/core-site.xml"));*
>
> *conf.addResource(new Path(F.CFG_PATH + "/hdfs-site.xml"));*
>
> *conf.addResource(new Path(F.CFG_PATH + "/mapred-site.xml"));*
>
> *FileSystem fs = FileSystem.get(conf);*
>
>
> I've been advised to set a runtime property like so:
>
> *-runproperties:*
> *org.osgi.framework.system.packages.extra=com.sun.security.auth.module*
>
>
> and to also have my bundle import the package in question:
>
> *Import-Package: com.sun.security.auth.module*
>
>
> both of which I've done to no avail. What can I do? I find working with
> OSGi, issues like this crop up often especially with code that was not
> originally written with OSGi in mind. Other than that, I like OSGi. I like
> bndtools. I like Hadoop. Why can't they all just get along? :-)
>
> Thanks in advance.
>
> --
> There are ways and there are ways,
>
> Geoffry Roberts