0 Replies Latest reply on Oct 19, 2004 11:23 AM by heman

    compile error using Duke bank app from Getting started with

    heman Newbie

      Hi, I've followed the Getting Started with JBoss 4.0 guide step by step, but when I try to compile using ant -f jboss-build.xml compile on Linux Fedora Core 2, I get this output:

      Buildfile: jboss-build.xml

      prepare:

      compile:
      [javac] Compiling 58 source files to /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/build
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java: In class `com.sun.ebank.appclient.BankAdmin':
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java: In method `com.sun.ebank.appclient.BankAdmin.addCustToActFields(java.lang.String,java.lang.String)':
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:351: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] customer = new JTextField(custID);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:357: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] account = new JTextField(actID);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java: In method `com.sun.ebank.appclient.BankAdmin.createCustFields(boolean,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)':
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:377: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] fname = new JTextField(first);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:378: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] lname = new JTextField(last);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:379: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] mi = new JTextField(mid);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:380: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] street = new JTextField(str);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:381: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] city = new JTextField(cty);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:382: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] state = new JTextField(st);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:383: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] zip = new JTextField(zp);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:384: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] phone = new JTextField(tel);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:385: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] e = new JTextField(mail);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:388: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] fname.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:389: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] lname.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:390: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] mi.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:391: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] street.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:392: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] city.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:393: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] state.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:394: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] zip.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:395: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] phone.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:396: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] e.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java: In method `com.sun.ebank.appclient.BankAdmin.createActFields(boolean,java.lang.String,java.math.BigDecimal,java.math.BigDecimal,java.math.BigDecimal,java.util.ArrayList,java.util.Date)':
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:492: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] this.cust = new JTextField(custIDs);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:497: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] this.descrip = new JTextField(this.desc);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:498: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] this.type = new JTextField(type);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:503: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] this.time = new JTextField(viewtime);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:507: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] this.bal = new JTextField(balstring);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:510: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] this.credit = new JTextField(creditstring);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:513: error: Can't find constructor `javax.swing.JTextField(Ljava/lang/String;)' in type `javax.swing.JTextField'.
      [javac] this.begbal = new JTextField(begbalstring);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:524: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] this.bal.setEditable(false);
      [javac] ^
      [javac] /home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/src/com/sun/ebank/appclient/BankAdmin.java:525: error: Can't find method `setEditable(Z)' in type `javax.swing.JTextField'.
      [javac] this.time.setEditable(false);
      [javac] ^
      [javac] 29 errors

      BUILD FAILED
      file:/home/pzw/source/java/j2ee/j2eetutorial14/examples/bank/jboss-build.xml:54: Compile failed; see the compiler error output for details.

      Total time: 2 seconds

      Does anyone know how to fix this problem?

      Best regards,
      Peter