AnsweredAssumed Answered

MapR5 Writing file to HDFS from JBOSS application Server(servlet)

Question asked by venkat on Feb 24, 2014
Latest reply on Apr 7, 2016 by adamdiaz
Hi Team,

I am facing following error while I am running the program from JBOSS application server.

    29:09,858 ERROR [com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils] (http-localhost-127.0.0.1-8080-1) Exception during init: java.lang.UnsatisfiedLinkError: com.mapr.security.JNISecurity.SetClusterOption(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
at com.mapr.security.JNISecurity.SetClusterOption(Native Method) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.init(CLDBRpcCommonUtils.java:158) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<init>(CLDBRpcCommonUtils.java:69) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<clinit>(CLDBRpcCommonUtils.java:60) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at org.apache.hadoop.conf.MapRConf.<clinit>(MapRConf.java:38) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1348) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1285) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.conf.Configuration.get(Configuration.java:500) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:137) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:129) [hadoop-0.20.2-dev-core.jar:]
at com.test.Test.wirteData(Test.java:30) [classes:]
at com.test.Test.main(Test.java:69) [classes:]
at org.apache.jsp.index_jsp._jspService(index_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]

    11:29:09,899 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestProject].[jsp]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet jsp threw exception: java.lang.UnsatisfiedLinkError: com.mapr.security.JNISecurity.SetParsingDone()V
at com.mapr.security.JNISecurity.SetParsingDone(Native Method) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.init(CLDBRpcCommonUtils.java:219) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<init>(CLDBRpcCommonUtils.java:69) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at com.mapr.baseutils.cldbutils.CLDBRpcCommonUtils.<clinit>(CLDBRpcCommonUtils.java:60) [maprfs-1.0.3-mapr-3.1.0.jar:1.0.3-mapr-3.1.0]
at org.apache.hadoop.conf.MapRConf.<clinit>(MapRConf.java:38) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:1348) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:1285) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.conf.Configuration.get(Configuration.java:500) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:137) [hadoop-0.20.2-dev-core.jar:]
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:129) [hadoop-0.20.2-dev-core.jar:]
at com.test.Test.wirteData(Test.java:30) [classes:]
at com.test.Test.main(Test.java:69) [classes:]
at org.apache.jsp.index_jsp._jspService(index_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jbossweb-7.0.13.Final.jar:]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [jbossweb-7.0.13.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
 **But same program works with Tomcat and standalone.  Let me know if you need any more details.**

Outcomes