1 2 3 Previous Next 30 Replies Latest reply on Apr 21, 2008 2:14 AM by Niraj Singh Go to original post
      • 15. Re: Duke's Bank Application Problem
        Peter Johnson Master

        Looks like the table already exists.

        If you are using HSQLDB (the default), then bring down the app server and remove the directory server/default/data. Then bring the app server up and try it again. By the way, HSQLDB puts its database at server/default/deploy/hypersonic.localDB.script, so by removing the data directory your are deleting the database.

        • 16. Re: Duke's Bank Application Problem
          dominik heller Newbie

          The database can also be deleted using the command
          ant -f jboss-build.xml db-delete
          but it might be that u have to uncomment it in the jboss-build.xml

          hope that helps

          • 17. Re: Duke's Bank Application Problem
            Paula Bentabol Newbie

            Hello again,

            I tried what you told me but it didn't work. I must clarify that I'm working with a copy of the default server which I called "myconfig", as the tutorial says.

            I tried to create the tables with the default server as well; again it builds successfully, but I get new errors:

            [java] ScriptTool.init error: socket creation error
            [java] java.sql.SQLException: socket creation error
            [java] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
            [java] at org.hsqldb.jdbc.jdbcConnection.(Unknown Source)
            [java] at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
            [java] at org.hsqldb.jdbcDriver.connect(Unknown Source)
            [java] at java.sql.DriverManager.getConnection(DriverManager.java:52
            [java] at java.sql.DriverManager.getConnection(DriverManager.java:17
            [java] at org.hsqldb.util.ScriptTool.execute(Unknown Source)
            [java] at org.hsqldb.util.ScriptTool.main(Unknown Source)
            [java] Exception in thread "main" java.lang.NullPointerException
            [java] at org.hsqldb.util.ScriptTool.execute(Unknown Source)
            [java] at org.hsqldb.util.ScriptTool.main(Unknown Source)
            [java] Java Result: 1

            Any ideas about any of the two cases?
            Thanks!

            • 18. Re: Duke's Bank Application Problem
              H ZH Newbie

              when i ccompile the Duke's Bank Application, it came the follwing errors:

              E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank>ant -f build.xml compile-inter
              face
              Buildfile: build.xml

              init:

              prepare:

              compile-detail:

              compile-exception:

              compile-interface:
              [javac] Compiling 12 source files to E:\j2ee-1_3-doc-tutorial-draft5\j2eetut
              orial\bank\build
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\Account.java:14: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBObject;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\Account.java:18: 找�到符�
              [javac] 符�: 类 EJBObject
              [javac] public interface Account extends EJBObject {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountController.java:15: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBObject;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountController.java:20: 找�到符�
              [javac] 符�: 类 EJBObject
              [javac] public interface AccountController extends EJBObject {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountControllerHome.java:14: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.CreateException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountControllerHome.java:15: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBHome;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountControllerHome.java:18: 找�到符�
              [javac] 符�: 类 EJBHome
              [javac] public interface AccountControllerHome extends EJBHome {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountControllerHome.java:20: 找�到符�
              [javac] 符�: 类 CreateException
              [javac] �置: 接� com.sun.ebank.ejb.account.AccountControllerHome
              [javac] AccountController create() throws RemoteException, CreateExcepti
              on;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountHome.java:14: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.*;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountHome.java:18: 找�到符�
              [javac] 符�: 类 EJBHome
              [javac] public interface AccountHome extends EJBHome {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountHome.java:23: 找�到符�
              [javac] 符�: 类 CreateException
              [javac] �置: 接� com.sun.ebank.ejb.account.AccountHome
              [javac] throws RemoteException, CreateException, MissingPrimaryKeyEx
              ception;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountHome.java:26: 找�到符�
              [javac] 符�: 类 FinderException
              [javac] �置: 接� com.sun.ebank.ejb.account.AccountHome
              [javac] throws FinderException, RemoteException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\account\AccountHome.java:29: 找�到符�
              [javac] 符�: 类 FinderException
              [javac] �置: 接� com.sun.ebank.ejb.account.AccountHome
              [javac] throws FinderException, RemoteException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\Customer.java:13: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBObject;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\Customer.java:17: 找�到符�
              [javac] 符�: 类 EJBObject
              [javac] public interface Customer extends EJBObject {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerController.java:14: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBObject;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerController.java:19: 找�到符�
              [javac] 符�: 类 EJBObject
              [javac] public interface CustomerController extends EJBObject {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerControllerHome.java:14: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.CreateException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerControllerHome.java:15: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBHome;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerControllerHome.java:18: 找�到符�
              [javac] 符�: 类 EJBHome
              [javac] public interface CustomerControllerHome extends EJBHome {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerControllerHome.java:20: 找�到符�
              [javac] 符�: 类 CreateException
              [javac] �置: 接� com.sun.ebank.ejb.customer.CustomerControllerHome
              [javac] CustomerController create() throws RemoteException, CreateExcept
              ion;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerHome.java:13: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.*;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerHome.java:17: 找�到符�
              [javac] 符�: 类 EJBHome
              [javac] public interface CustomerHome extends EJBHome {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerHome.java:23: 找�到符�
              [javac] 符�: 类 CreateException
              [javac] �置: 接� com.sun.ebank.ejb.customer.CustomerHome
              [javac] throws RemoteException, CreateException, MissingPrimaryKeyEx
              ception;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerHome.java:26: 找�到符�
              [javac] 符�: 类 FinderException
              [javac] �置: 接� com.sun.ebank.ejb.customer.CustomerHome
              [javac] throws FinderException, RemoteException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerHome.java:29: 找�到符�
              [javac] 符�: 类 FinderException
              [javac] �置: 接� com.sun.ebank.ejb.customer.CustomerHome
              [javac] throws FinderException, RemoteException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\customer\CustomerHome.java:32: 找�到符�
              [javac] 符�: 类 FinderException
              [javac] �置: 接� com.sun.ebank.ejb.customer.CustomerHome
              [javac] throws FinderException, RemoteException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\Tx.java:13: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBObject;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\Tx.java:17: 找�到符�
              [javac] 符�: 类 EJBObject
              [javac] public interface Tx extends EJBObject {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxController.java:15: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBObject;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxController.java:20: 找�到符�
              [javac] 符�: 类 EJBObject
              [javac] public interface TxController extends EJBObject {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxControllerHome.java:14: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.CreateException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxControllerHome.java:15: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.EJBHome;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxControllerHome.java:18: 找�到符�
              [javac] 符�: 类 EJBHome
              [javac] public interface TxControllerHome extends EJBHome {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxControllerHome.java:20: 找�到符�
              [javac] 符�: 类 CreateException
              [javac] �置: 接� com.sun.ebank.ejb.tx.TxControllerHome
              [javac] TxController create() throws RemoteException, CreateException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxHome.java:14: 软件包 javax.ejb ä¸�å˜åœ¨
              [javac] import javax.ejb.*;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxHome.java:18: 找�到符�
              [javac] 符�: 类 EJBHome
              [javac] public interface TxHome extends EJBHome {
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxHome.java:23: 找�到符�
              [javac] 符�: 类 CreateException
              [javac] �置: 接� com.sun.ebank.ejb.tx.TxHome
              [javac] throws RemoteException, CreateException, MissingPrimaryKeyEx
              ception;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxHome.java:26: 找�到符�
              [javac] 符�: 类 FinderException
              [javac] �置: 接� com.sun.ebank.ejb.tx.TxHome
              [javac] throws FinderException, RemoteException;
              [javac] ^
              [javac] E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\src\com\sun\ebank\
              ejb\tx\TxHome.java:30: 找�到符�
              [javac] 符�: 类 FinderException
              [javac] �置: 接� com.sun.ebank.ejb.tx.TxHome
              [javac] throws FinderException, RemoteException;
              [javac] ^
              [javac] 40 错误

              BUILD FAILED
              E:\j2ee-1_3-doc-tutorial-draft5\j2eetutorial\bank\build.xml:58: Compile failed;
              see the compiler error output for details.

              could anyone be so kind to tell me why i got these errors?

              • 19. Re: Duke's Bank Application Problem
                Peter Johnson Master

                HZH, please do not post your questions on someone else's topic - start a new topic instead.

                bentabol, because you created a different server, you would of course remove server/myconfig/data. Let's not confuse things by trying to use the 'default' config, let's stick with the problem on 'myconfig.' IT's been a while since I ran Duke's Bank and I am being lazy, so before I try it again let me ask this - does Duke's Bank run despite the error? If so, ignore the error.

                • 20. Re: Duke's Bank Application Problem
                  Paula Bentabol Newbie

                  Hello,

                  I removed that directory and I still have the same error. I try to go on with the next steps, but they also produce errors. I try to run up the JMX console but it doesn't work, it gives a HTTP 500 failure. If I try to deploy the application the server doesn't give the output it says in the tutorial.

                  About the error when creating the tables I thought it could be a problem with the script. I had a look at the code but I couldn't fix it.

                  • 21. Re: Duke's Bank Application Problem
                    Peter Johnson Master

                    Could you post the full output from running "ant -f jboss-build.xml db-create-table"? Also, what version of JBossAS are you using?

                    You do have the application server running and Hypersonic configured to open a port, right? You should see console output like this when starting the app server:

                    09:44:56,713 INFO [STDOUT] [Server@9021e3]: [Thread[hypersonic-default,5,jboss]
                    ]: checkRunning(false) entered
                    09:44:56,713 INFO [STDOUT] [Server@9021e3]: [Thread[hypersonic-default,5,jboss]
                    ]: checkRunning(false) exited
                    09:44:56,713 INFO [STDOUT] [Server@9021e3]: Startup sequence initiated from mai
                    n() method
                    09:44:56,713 INFO [STDOUT] [Server@9021e3]: Loaded properties from [F:\opt\jbos
                    s\jboss-4.0.5.GA\bin\server.properties]
                    09:44:56,713 INFO [STDOUT] [Server@9021e3]: Initiating startup sequence...
                    09:44:56,729 INFO [STDOUT] [Server@9021e3]: Server socket opened successfully i
                    n 16 ms.
                    09:44:57,510 INFO [STDOUT] [Server@9021e3]: Database [index=0, id=0, db=file:F:
                    \opt\jboss\jboss-4.0.5.GA\server\bank\data\hypersonic\default, alias=] opened su
                    cessfully in 750 ms.
                    09:44:57,510 INFO [STDOUT] [Server@9021e3]: Startup sequence completed in 797 m
                    s.
                    09:44:57,510 INFO [STDOUT] [Server@9021e3]: 2007-11-26 09:44:57.510 HSQLDB serv
                    er 1.8.0 is online

                    • 22. Re: Duke's Bank Application Problem
                      Peter Johnson Master

                      And one more question, what JDK are you using?

                      • 23. Re: Duke's Bank Application Problem
                        Paula Bentabol Newbie

                        Hello,

                        I am using JBoss AS 4.2.1 and JDK 5.0. I have the server running but I have not done anything with Hypersonic (the tutorial does not mention it) so I do not obtain the output you posted.
                        This is the output I get when running "ant -f jboss-build.xml db-create-table":

                        Buildfile: jboss-build.xml

                        db-create-table:
                        [java] SQL Error at line 54: java.sql.SQLException: Table is referenced by
                        a constraint in table SYS_REF_FK6713A03980734EA4_58 table: BOOKING in statement
                        [
                        [java] DROP TABLE customer if exists]

                        BUILD SUCCESSFUL
                        Total time: 5 seconds

                        Thank you very much!

                        • 24. Re: Duke's Bank Application Problem
                          Peter Johnson Master

                          I have been using 4.0.5. odin69 mentioned that he was using that version and you never said you were on a different version so this whole time I assumed you were on 4.0.5.

                          The tutorial I am looking at states that you have to modify the hsqldb-ds.xml file to cause Hypersonic to open a port. When you do that, you should see the [STDOUT] messages that I posted. I verified that these messages also appear on 4.2.1. See http://docs.jboss.org/jbossas/getting_started/v5/html/dukesbank.html#d0e946. What tutorial are you using?

                          I am also starting to suspect that you have another application deployed which has a Customer table, hence the problems with deleting the table. The name 'Booking' causes me to suspect the Seam booking application. Try using a clean configuration with no other applications deployed.

                          • 25. Re: Duke's Bank Application Problem
                            Paula Bentabol Newbie

                            Hello PeterJ,

                            First of all, thank you very much for your help.

                            Excuse me for not mentioning the version I am using.
                            I did modified the hsqldb-ds.xml, I did not remember that was what made Hypersonic to open a port.

                            I tried the Seam booking application many weeks ago to see how it worked. What should I do now so it is not deployed?

                            • 26. Re: Duke's Bank Application Problem
                              Peter Johnson Master

                              Two options.

                              1) Recreate the 'default' configuration. Personally, I never use the 'default' config - the first thing I do when I download JBossAS is to rename 'default' to 'default-orig', then I make a copy of it. For example, when working with Duke's Bank, I copy it as 'bank'. (Yes, working with Seam is a pain in the @$$ in this regards because they hard-coded the 'default' config into their scripts instead of letting you specify the configuration you want to use.) Then my startup statement becomes 'run -c bank'. If you have already messed up the 'default' config, you could restore it by reinstalling JBossAS (I also always keep the zip file I downlaoded, takes just a few seconds to unzip.) Once you do this, don't forget to remodify the hsqldb-ds.xml file.

                              2) Undeploy the Seam booking application. If the build script does not have an undeploy option. then do this:

                              a) Stop the app server
                              a) Delete the booking ear file or directory
                              b) Delete the data, tmp and work directories

                              • 28. Re: Duke's Bank Application Problem
                                lich king Newbie

                                .............................................

                                • 29. Re: Duke's Bank Application Problem
                                  123 fun Newbie

                                  Okay. I give up. Could somebody kindly give me the URL of the correct zip file (jbossj2ee-src.zip or whatever) that contains the JBoss-4.x-specific build files for Duke's Bank? The documentation links to a download page with a large number of links, none of which seems to be the right one. The gettingstarted.zip file which seemed like the obvious one to get does not contain anything useful for this purpose, as far as I can tell.