3 Replies Latest reply on Aug 19, 2004 8:42 PM by Robert Hook

    Compile of Duke's Bank app failed

    bdemeulle Newbie

      I am having a difficulty and was wondering if anyone has a suggestion. When I try to run the "ant -f jboss-build.xml compile" command, I get the following in the console:

      Buildfile: jboss-build.xml

      prepare:

      compile:
      [javac] Compiling 55 source files to C:\j2eetutorial\bank\build
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\ContextListener.java:13: package javax.servlet does not exist
      [javac] import javax.servlet.ServletContext;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\ContextListener.java:14: package javax.servlet does not exist
      [javac] import javax.servlet.ServletContextEvent;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\ContextListener.java:15: package javax.servlet does not exist
      [javac] import javax.servlet.ServletContextListener;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\ContextListener.java:19: cannot resolve symbol
      [javac] symbol : class ServletContextListener
      [javac] location: class com.sun.ebank.web.ContextListener
      [javac] implements ServletContextListener {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\ContextListener.java:21: cannot resolve symbol
      [javac] symbol : class ServletContext
      [javac] location: class com.sun.ebank.web.ContextListener
      [javac] private ServletContext context = null;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\ContextListener.java:23: cannot resolve symbol
      [javac] symbol : class ServletContextEvent
      [javac] location: class com.sun.ebank.web.ContextListener
      [javac] public void contextDestroyed(ServletContextEvent event) {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\ContextListener.java:29: cannot resolve symbol
      [javac] symbol : class ServletContextEvent
      [javac] location: class com.sun.ebank.web.ContextListener
      [javac] public void contextInitialized(ServletContextEvent event) {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:11: package javax.servlet does not exist
      [javac] import javax.servlet.*;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:12: package javax.servlet.http does not exist
      [javac] import javax.servlet.http.*;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:17: cannot resolve symbol
      [javac] symbol : class HttpServlet
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] public class Dispatcher extends HttpServlet {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:18: cannot resolve symbol
      [javac] symbol : class HttpServletRequest
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] public void doGet(HttpServletRequest request, HttpServletResponse response) {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:18: cannot resolve symbol
      [javac] symbol : class HttpServletResponse
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] public void doGet(HttpServletRequest request, HttpServletResponse response) {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:58: cannot resolve symbol
      [javac] symbol : class HttpServletRequest
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] public void doPost(HttpServletRequest request, HttpServletResponse response) {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:58: cannot resolve symbol
      [javac] symbol : class HttpServletResponse
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] public void doPost(HttpServletRequest request, HttpServletResponse response) {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:11: package javax.servlet.jsp does not exist
      [javac] import javax.servlet.jsp.JspTagException;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:12: package javax.servlet.jsp.tagext does not exist
      [javac] import javax.servlet.jsp.tagext.TagSupport;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:15: cannot resolve symbol
      [javac] symbol : class TagSupport
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] public class DefinitionTag extends TagSupport {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:37: cannot resolve symbol
      [javac] symbol : class JspTagException
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] public int doEndTag()throws JspTagException {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:12: package javax.servlet.jsp does not exist
      [javac] import javax.servlet.jsp.JspTagException;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:13: package javax.servlet.jsp.tagext does not exist
      [javac] import javax.servlet.jsp.tagext.TagSupport;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:15: cannot resolve symbol
      [javac] symbol : class TagSupport
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] public class InsertTag extends TagSupport {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:43: cannot resolve symbol
      [javac] symbol : class JspTagException
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] public int doEndTag()throws JspTagException {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:11: package javax.servlet.jsp does not exist
      [javac] import javax.servlet.jsp.JspTagException;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:12: package javax.servlet.jsp.tagext does not exist
      [javac] import javax.servlet.jsp.tagext.*;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:15: cannot resolve symbol
      [javac] symbol : class TagSupport
      [javac] location: class com.sun.ebank.web.taglib.ParameterTag
      [javac] public class ParameterTag extends TagSupport {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:16: cannot resolve symbol
      [javac] symbol : class Tag
      [javac] location: class com.sun.ebank.web.taglib.ParameterTag
      [javac] private Tag parentTag = null;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:11: package javax.servlet.jsp does not exist
      [javac] import javax.servlet.jsp.JspTagException;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:12: package javax.servlet.jsp.tagext does not exist
      [javac] import javax.servlet.jsp.tagext.*;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:14: cannot resolve symbol
      [javac] symbol : class TagSupport
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] public class ScreenTag extends TagSupport {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:19: cannot resolve symbol
      [javac] symbol : class HttpSession
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] HttpSession session = request.getSession();
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:30: cannot resolve symbol
      [javac] symbol : method getServletContext ()
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] BeanManager beanManager = (BeanManager)getServletContext().getAttribute("beanManager");
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:59: cannot resolve symbol
      [javac] symbol : class HttpSession
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] HttpSession session = request.getSession();
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\Dispatcher.java:64: cannot resolve symbol
      [javac] symbol : method getServletContext ()
      [javac] location: class com.sun.ebank.web.Dispatcher
      [javac] BeanManager beanManager = (BeanManager)getServletContext().getAttribute("beanManager");
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:32: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] screens = (HashMap) pageContext.getAttribute("screens", pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:32: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] screens = (HashMap) pageContext.getAttribute("screens", pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:34: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] pageContext.setAttribute("screens", new HashMap(), pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:34: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] pageContext.setAttribute("screens", new HashMap(), pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:35: cannot resolve symbol
      [javac] symbol : variable EVAL_BODY_INCLUDE
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] return EVAL_BODY_INCLUDE;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:42: cannot resolve symbol
      [javac] symbol : class TagSupport
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] TagSupport screen = null;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:44: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] screens = (HashMap) pageContext.getAttribute("screens", pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:44: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] screens = (HashMap) pageContext.getAttribute("screens", pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:63: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] pageContext.setAttribute(definitionName, definition);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:67: cannot resolve symbol
      [javac] symbol : variable EVAL_PAGE
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] return EVAL_PAGE;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\DefinitionTag.java:73: cannot resolve symbol
      [javac] symbol : variable super
      [javac] location: class com.sun.ebank.web.taglib.DefinitionTag
      [javac] super.release();
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:34: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] definition = (Definition)pageContext.getAttribute(definitionName);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:41: cannot resolve symbol
      [javac] symbol : variable SKIP_BODY
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] return SKIP_BODY;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:47: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] pageContext.getOut().print(parameter.getValue());
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:51: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] pageContext.include(parameter.getValue());
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:54: cannot resolve symbol
      [javac] symbol : class JspTagException
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] throw new JspTagException(ex.getMessage());
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:56: cannot resolve symbol
      [javac] symbol : variable EVAL_PAGE
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] return EVAL_PAGE;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\InsertTag.java:64: cannot resolve symbol
      [javac] symbol : variable super
      [javac] location: class com.sun.ebank.web.taglib.InsertTag
      [javac] super.release();
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:43: cannot resolve symbol
      [javac] symbol : class TagSupport
      [javac] location: class com.sun.ebank.web.taglib.ParameterTag
      [javac] ArrayList parameters = (ArrayList)((TagSupport)getParent()).getValue("parameters");
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:43: cannot resolve symbol
      [javac] symbol : method getParent ()
      [javac] location: class com.sun.ebank.web.taglib.ParameterTag
      [javac] ArrayList parameters = (ArrayList)((TagSupport)getParent()).getValue("parameters");
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:54: cannot resolve symbol
      [javac] symbol : variable SKIP_BODY
      [javac] location: class com.sun.ebank.web.taglib.ParameterTag
      [javac] return SKIP_BODY;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ParameterTag.java:61: cannot resolve symbol
      [javac] symbol : variable super
      [javac] location: class com.sun.ebank.web.taglib.ParameterTag
      [javac] super.release();
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:21: cannot resolve symbol
      [javac] symbol : method setValue (java.lang.String,java.util.ArrayList)
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] setValue("parameters", new ArrayList());
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:22: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] HashMap screens = (HashMap) pageContext.getAttribute("screens", pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:22: cannot resolve symbol
      [javac] symbol : variable pageContext
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] HashMap screens = (HashMap) pageContext.getAttribute("screens", pageContext.APPLICATION_SCOPE);
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:25: cannot resolve symbol
      [javac] symbol : variable SKIP_BODY
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] return SKIP_BODY;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:28: cannot resolve symbol
      [javac] symbol : method getId ()
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] if (!screens.containsKey(getId())) {
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:29: cannot resolve symbol
      [javac] symbol : method getId ()
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] screens.put(getId(), getValue("parameters"));
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:29: cannot resolve symbol
      [javac] symbol : method getValue (java.lang.String)
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] screens.put(getId(), getValue("parameters"));
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:31: cannot resolve symbol
      [javac] symbol : variable EVAL_BODY_INCLUDE
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] return EVAL_BODY_INCLUDE;
      [javac] ^
      [javac] C:\j2eetutorial\bank\src\com\sun\ebank\web\taglib\ScreenTag.java:36: cannot resolve symbol
      [javac] symbol : variable super
      [javac] location: class com.sun.ebank.web.taglib.ScreenTag
      [javac] super.release();
      [javac] ^
      [javac] 64 errors

      BUILD FAILED
      C:\j2eetutorial\bank\jboss-build.xml:49: Compile failed; see the compiler error output for details.

      Any suggestions???? This same this has happened on two diffferent machines. I am obviously missing something in my config but I do not know what it is.

      Thanks.

      BD

        • 1. Re: Compile of Duke's Bank app failed
          Holger Baxmann Novice

          your ant script environment is missing some impotent .jar files (servlet.jar in this case)

          bax

          • 2. Re: Compile of Duke's Bank app failed
            Robert Hook Newbie

             

            "hbaxmann" wrote:
            your ant script environment is missing some impotent .jar files (servlet.jar in this case)

            bax




            {Rant mode enabled}
            aaaarrrgghhht!!! Just what I like about the FOSS world. An answer that is:

            a) misspelt;

            b) risible due to incorrect spelling;

            c) accurate, but completely useless.

            That's nice. We know that servlet.jar is missing. Some of us can tell that there are other things missing. If you've solved this issue, why not SAY WHAT THE SOLUTION IS rather than saying "there is a solution"
            {Rant Mode disabled}

            • 3. Re: Compile of Duke's Bank app failed
              Robert Hook Newbie

              Rantless response. To get over that particular hurdle, I had to do the following:


              1. Edit the build.properties file in the j2eetutorial directory to make sure the servlet.jar line read:

              servlet.jar=${jboss.server}/deploy/jbossweb-tomcat50.sar/servlet-api.jar

              2. Edit the jboss-build.xml file in the j2eetutorial\bank directory to make sure the section near the top "class for running the client" looked like this:

              <path id="client.classpath">
               <fileset dir="${jboss.home}/server/all/deploy/jbossweb-tomcat50.sar">
               <include name="*.jar"/>
               </fileset>
              </path>


              Having said that, I've done that much and the tutorial build still fails because there are dozens of other classes that cannot be found. thinking is in progress.