AnsweredAssumed Answered

accessing HDFS from javaee app in Glassfish kills login realms

Question asked by gafurov on Mar 13, 2012
Latest reply on Mar 14, 2012 by gafurov
Hello,

I am developing a javaee app which needs to read/write into HDFS. The application is deployed into Glassfish v3.1.x.  Reading and writing works, so there are no problems here.  But after  my app opens FileSystem, new users cannot login any more. Application server throws an exception like "javax.security.auth.login.LoginException: No LoginModules configured for jdbcRealm". 

It looks like JAAS configuration which is set up by Glassfish  is later overwritten by Hadoop's libraries when my app uses Hadoop classes for the first time. I also found similar issues
https://issues.apache.org/jira/browse/HADOOP-7070
https://issues.cloudera.org/browse/DISTRO-66

I cannot guarantee that the issues above are applicable to my situation, but symptoms are absolutely the same.

Could you help me to find a workaround for my problem, please? I use M3 Edition. Security of HDFS is not a concern in my case (so, I do not mind to switch it off, if it is possible)

Kind regards,
Sergey

PS. I think I could write a wrapper which would delegate getAppConfigurationEntry() calls in turn to Hadoop and than to Glassfish. But may be another solution already exists?

Outcomes