Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:21:20+00:00 2026-06-16T00:21:20+00:00

I am trying to deploy the Duke’s Bank example form the Java EE 5

  • 0

I am trying to deploy the Duke’s Bank example form the Java EE 5 tutorial on JBoss 7.1.1. I have only used (unaltered) the source, and the standard XML configuration files for deployment, part of the exercise here is to see how I might structure a JSP based project of my own.

The exception I get is as follows:

  ERROR [[jsp]] Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException
    at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1858) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
    at org.apache.jsp.main_jsp._jspx_meth_f_005fview_005f0(main_jsp.java:99)
    at org.apache.jsp.main_jsp._jspService(main_jsp.java:76)
    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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
    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(Thread.java:636) [rt.jar:1.6.0_18]

I have not given any JBoss configuration files, the WAR’s WEB-INF part looks like this:

$ jar tvf build/lib/dukebank-web.war 
     0 Sat Dec 15 22:00:12 GMT 2012 META-INF/
   123 Sat Dec 15 22:00:10 GMT 2012 META-INF/MANIFEST.MF
     0 Sat Dec 15 22:00:12 GMT 2012 WEB-INF/
  2514 Fri Dec 14 14:29:20 GMT 2012 WEB-INF/web.xml
  1348 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/dukesBank.tld
  7245 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/faces-config.xml
  2153 Sat Dec 15 08:19:46 GMT 2012 WEB-INF/tutorial-template.tld
     0 Sat Dec 15 22:00:12 GMT 2012 WEB-INF/classes/...

The JSP file (main.jsp) that causes this problem is:

<f:view>
    <h:form>
        <jsp:include page="/template/template.jsp"/>
        <center>
            <h3><h:outputText value="#{bundle.Welcome}"/></h3>
        </center>
    </h:form>
</f:view>

The template file it includes:

<%@ taglib uri="/WEB-INF/tutorial-template.tld" prefix="tt" %>
<%@ page errorPage="/template/errorpage.jsp" %>
<%@ include file="/template/screendefinitions.jspf" %>
<html>
<head>
<title>
  <tt:insert definition="bank" parameter="title"/>
</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body bgcolor="#ffffff">
  <tt:insert definition="bank" parameter="banner"/>
  <tt:insert definition="bank" parameter="links"/>
</body>
</html>

I will refrain from coping any more files because, as I said at the start I haven’t altered any of the files I have used.

Many thanks for your help,
Steve

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:21:21+00:00Added an answer on June 16, 2026 at 12:21 am

    The Duke’s Bank example is based on JSF, which is a component based MVC framework which previously used to use JSP as "View". JSF pages are supposed to be opened by an URL which matches the <url-pattern> of the FacesServlet as definied in webapp’s web.xml. For example, if it’s *.jsf, then you should open it by main.jsf instead of main.jsp. Or if it’s /faces/*, then you should open it by faces/main.jsp instead of main.jsp. This would invoke the FacesServlet which in turn will create the FacesContext and do all the JSF works.

    You’re getting a NPE on that line because the <f:view> (which is represented by the line at org.apache.jsp.main_jsp._jspx_meth_f_005fview_005f0(main_jsp.java:99) in the stack trace) is trying to find JSF’s FacesContext, but can’t seem to find one. This is true, since the FacesContext is supposed to be created by the FacesServlet.

    See also:

    • java.lang.NullPointerException at javax.faces.webapp.UIComponentClassicTagBase.setJspId
    • What is the difference between JSF, Servlet and JSP?
    • JSF in Java EE 5 tutorial (better: JSF in Java EE 6 tutorial)

    Unrelated to the concrete problem: the legacy Java EE 5 tutorial is not the right tutorial to read for JBoss 7. JBoss 7 is a modern Java EE 6 compatible container. Since Java EE 6, JSP is deprecated as JSF view technology and succeeded by Facelets. Also, JSF 1.x (part of Java EE 5) is really not what you would like to use these days, you should be heading to JSF 2.x (part of Java EE 6).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to deploy my JBpm application on Jboss 7.0.2. I have defined a
I'm trying to deploy WebServices with JBoss 7. I have a single class with
I trying to deploy Java EE web application on Geronimo container with Jetty web
I was trying to deploy my project with IExpress. I have the following scenario.
I'm trying to deploy a django application for production on apache mod-wsgi. I have
I'm trying to deploy an Applet with new Java JNLP specifications, but I always
I am trying to deploy a ear file, which was originally written for Jboss
I am trying to deploy a web application from my Eclipse to Jboss 6.x
I am trying to deploy a GWT client-only app on a custom web server.
I am trying to deploy a simple Seam 3 application on JBoss 7.1.1. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.