You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Nitiraj Singh Rathore (JIRA)" <ji...@apache.org> on 2015/09/18 15:38:04 UTC

[jira] [Commented] (AMBARI-12321) error ambari-view example (hello-spring-view)

    [ https://issues.apache.org/jira/browse/AMBARI-12321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14875627#comment-14875627 ] 

Nitiraj Singh Rathore commented on AMBARI-12321:
------------------------------------------------

The problem was that classes in jasper-runtime were conflicting with the jsp-2.1-glassfish.
jasper-runtime was not included in this view but was included in other views like file and capacity-scheduler etc (via hadoop-common and hadoop-hdfs).
Although the class loaders of the views are different. But still inclusion of jasper-runtime in other views caused error in hello-spring-view
I think this was because the Class.forName in 
./jsp-api-2.1-glassfish-2.1.v20100127.jar.src./javax/servlet/jsp/JspFactory.java:/* 118 */         
Class factory = Class.forName("org.apache.jasper.runtime.JspFactoryImpl");

Also I have noted that in ambari-metrics-timelineservice excludes the jasper-runtime.

This patch excludes the jasper-runtime from the poms of views

> error ambari-view example (hello-spring-view)
> ---------------------------------------------
>
>                 Key: AMBARI-12321
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12321
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-views
>    Affects Versions: 2.1.0
>         Environment: Sandbox (HDP 2.3)
>            Reporter: Seungyeop Shin
>         Attachments: AMBARI-12321_branch-2.1.patch
>
>
> When I was practice "hello-spring-view" on ambari(2.1.0) for spring web app in view, an error is occured the view page.
> Problem accessing /views/HELLO_SPRING/1.0.0/INSTANCE/. Reason:
>     Server Error
> Caused by:
> java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
> 	at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:994)
> 	at org.apache.jsp.WEB_002dINF.jsp.hello_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.hello_jsp:68)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575)
> - I had to move the view.xml file in "hello-spring-view" to src/main/webapp, since ambari couldn't extract war file in /var/lib/ambari-server/resources/views/work automatically. That means ambari can't recognize view package if the view.xml file isn't located in root of the view package.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)