4 Replies Latest reply: Aug 20, 2009 10:27 AM by 843810 RSS

    Error in Importing the packages in Duke’s Bank Application in Netbeans

    843810
      Hi,

      I am trying to run the Duke’s Bank Application in Netbeans with Jboss application server.

      During compilation I am getting following errors:

      prepare:

      compile:

      Compiling 5 source files to D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\build

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\TellerBean.java:16: package com.sun.ebank.ejb.account does not exist

      import com.sun.ebank.ejb.account.AccountController;

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\TellerBean.java:17: package com.sun.ebank.ejb.account does not exist

      import com.sun.ebank.ejb.account.AccountControllerHome;

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\TellerBean.java:18: package com.sun.ebank.util does not exist

      import com.sun.ebank.util.AccountDetails;

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\TellerBean.java:53: cannot resolve symbol

      symbol : class AccountController

      location: class com.jboss.ebank.TellerBean

      AccountController mgr = getController();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\TellerBean.java:60: cannot resolve symbol

      symbol : class AccountDetails

      location: class com.jboss.ebank.TellerBean

      AccountDetails details = (AccountDetails) it_list.next();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\TellerBean.java:60: cannot resolve symbol

      symbol : class AccountDetails

      location: class com.jboss.ebank.TellerBean

      AccountDetails details = (AccountDetails) it_list.next();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\WSClient.java:31: cannot resolve symbol

      symbol : class ServiceFactoryImpl

      location: class com.jboss.ebank.WSClient

      ServiceFactoryImpl factory = new ServiceFactoryImpl();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\WSClient.java:31: cannot resolve symbol

      symbol : class ServiceFactoryImpl

      location: class com.jboss.ebank.WSClient

      ServiceFactoryImpl factory = new ServiceFactoryImpl();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\web\CustomerHackFilter.java:40: cannot resolve symbol

      symbol : class BeanManager

      location: class com.jboss.ebank.web.CustomerHackFilter

      BeanManager beanManager =

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\web\CustomerHackFilter.java:41: cannot resolve symbol

      symbol : class BeanManager

      location: class com.jboss.ebank.web.CustomerHackFilter

      (BeanManager) session.getAttribute("beanManager");

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\web\CustomerHackFilter.java:44: cannot resolve symbol

      symbol : variable Debug

      location: class com.jboss.ebank.web.CustomerHackFilter

      Debug.print("hack - Creating bean manager.");

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\web\CustomerHackFilter.java:45: cannot resolve symbol

      symbol : class BeanManager

      location: class com.jboss.ebank.web.CustomerHackFilter

      beanManager = new BeanManager();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\web\CustomerHackFilter.java:49: cannot resolve symbol

      symbol : class CustomerBean

      location: class com.jboss.ebank.web.CustomerHackFilter

      CustomerBean customerBean = new CustomerBean();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\web\CustomerHackFilter.java:49: cannot resolve symbol

      symbol : class CustomerBean

      location: class com.jboss.ebank.web.CustomerHackFilter

      CustomerBean customerBean = new CustomerBean();

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\src\com\jboss\ebank\web\CustomerHackFilter.java:52: cannot resolve symbol

      symbol : variable Debug

      location: class com.jboss.ebank.web.CustomerHackFilter

      Debug.print("hack - added customerBean to request");

      24 errors

      D:\Technical\Software\Tutorial\J2ee\Installation\J2ee-1_4\J2ee-1_4\j2ee-1_4-doc-tutorial_7\j2eetutorial14\jbossj2ee-src\examples\bank\jboss-build.xml:44: Compile failed; see the compiler error output for details.

      BUILD FAILED (total time: 0 seconds)

      Its not able to import the packages.

      I am using J2EE 1.4 and Jboss 4.0.2. I am not able to make out why the packages are not imported.

      Please help me.

      Thanks in Advance.
        • 1. Re: Error in Importing the packages in Duke’s Bank Application in Netbeans
          843810
          I'm getting the same errors. Seems like an ejb jar is missing or something. Just started trying to run this, but with no luck so far.
          • 2. Re: Error in Importing the packages in Duke’s Bank Application in Netbeans
            jschellSomeoneStoleMyAlias
            Class not found means the class path is wrong.
            • 3. Re: Error in Importing the packages in Duke’s Bank Application in Netbeans
              843810
              I got past this error by basically integrating the JBoss code with the J2EE Tutorial code from Sun as mentioned here: http://www.jboss.org/community/wiki/J2EETutorialTips.

              Though now I get a seperate set of compile errors:
              C:\j2ee-1_4-doc-tutorial_7_copy\j2eetutorial14\examples\bank>ant -f jboss-build.xml compile
              Buildfile: jboss-build.xml
              
              prepare:
              
              compile:
                  [javac] Compiling 61 source files to C:\j2ee-1_4-doc-tutorial_7_copy\j2eetutorial14\examples\bank\build
                  [javac] C:\j2ee-1_4-doc-tutorial_7_copy\j2eetutorial14\examples\bank\src\com\sun\ebank\web\template\DefinitionTag.ja
              va:31: package javax.servlet.jsp does not exist
                  [javac] import javax.servlet.jsp.JspTagException;
                  [javac]                          ^
                  [javac] C:\j2ee-1_4-doc-tutorial_7_copy\j2eetutorial14\examples\bank\src\com\sun\ebank\web\template\DefinitionTag.ja
              va:32: package javax.servlet.jsp does not exist
                  [javac] import javax.servlet.jsp.PageContext;
                  [javac]                          ^
                  [javac] C:\j2ee-1_4-doc-tutorial_7_copy\j2eetutorial14\examples\bank\src\com\sun\ebank\web\template\DefinitionTag.ja
              va:33: package javax.servlet.jsp.tagext does not exist
                  [javac] import javax.servlet.jsp.tagext.SimpleTagSupport;
                  [javac]                                 ^
                  [javac] C:\j2ee-1_4-doc-tutorial_7_copy\j2eetutorial14\examples\bank\src\com\sun\ebank\web\template\DefinitionTag.ja
              va:37: cannot find symbol
                  [javac] symbol: class SimpleTagSupport
                  [javac] public class DefinitionTag extends SimpleTagSupport {
                  [javac]                                    ^
               
              ...
              
              BUILD FAILED
              C:\j2ee-1_4-doc-tutorial_7_copy\j2eetutorial14\examples\bank\jboss-build.xml:44: Compile failed; see the compiler error
              output for details.
              
              Total time: 7 seconds
              • 4. Re: Error in Importing the packages in Duke’s Bank Application in Netbeans
                843810
                The JBoss code essentially is an add on to the J2EE tutorial example code so there are dependencies on that code from the JBoss Duke's code. The other fix I made came from here: http://getluky.net/2008/05/12/getting-the-j2ee-dukes-bank-example-running-on-jboss-422ga/ which was to modify a build file and 1 java file. Now everything compiles as expected.