7 Replies Latest reply: Apr 1, 2011 6:18 AM by kaissun bs RSS

    java.sql.SQLException: socket creation error  (table creatio

    Safak Kayikci Newbie

      Hi,
      I'm new to JBoss and doing the Duke's Bank application in J2EE tutorial. I made the modifications in hsqldb-ds.xml .however, when I try to create database with

      ant -f jboss-build.xml db-create-table command I got the error which is :

      --------------------------------------------------------------------------------
      Buildfile: jboss-build.xml

      db-create-table:
      [java] java.sql.SQLException: socket creation error
      [java] at org.hsqldb.jdbc.jdbcUtil.sqlException(Unknown Source)
      [java] at org.hsqldb.jdbc.jdbcConnection.(Unknown Source)
      [java] at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
      [java] ScriptTool.init error: socket creation error
      [java] at org.hsqldb.jdbcDriver.connect(Unknown Source)
      [java] at java.sql.DriverManager.getConnection(DriverManager.java:512)
      [java] at java.sql.DriverManager.getConnection(DriverManager.java:171)
      [java] at org.hsqldb.util.ScriptTool.execute(Unknown Source)
      [java] at org.hsqldb.util.ScriptTool.main(Unknown Source)
      [java] java.lang.NullPointerException
      [java] at org.hsqldb.util.ScriptTool.execute(Unknown Source)
      [java] at org.hsqldb.util.ScriptTool.main(Unknown Source)
      [java] Exception in thread "main"
      [java] Java Result: 1

      BUILD SUCCESSFUL
      ------------------------------------------------------------------------------------

      Ayn suggestions ??? Thanx.

        • 1. Re: java.sql.SQLException: socket creation error  (table cre
          pang Newbie

          I got similar error and I am sure I follow exact what the guide said.

          [jboss@web bank]$ ant -f jboss-build.xml db-create-table
          Buildfile: jboss-build.xml

          db-create-table:
          [java] ScriptTool.init error: socket creation error
          [java] java.sql.SQLException: socket creation error
          [java] at org.hsqldb.jdbc.jdbcUtil.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:512)
          [java] at java.sql.DriverManager.getConnection(DriverManager.java:171)
          [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

          BUILD SUCCESSFUL
          Total time: 0 seconds


          Could anyone help?

          • 2. Re: java.sql.SQLException: socket creation error  (table cre
            micke Novice

            Have you started Jboss (HSQL up and running)?

            • 3. Re: java.sql.SQLException: socket creation error  (table cre
              bao jiaozi Newbie

              I also meet the same problem. I statred jboss first ,then impelment the command:ant -f jboss-build.xml db-create-table
              but got the same result:(
              Every answer is appreciated:)

              • 4. Re: java.sql.SQLException: socket creation error  (table cre
                Aladdin El-Nattar Newbie

                I have the same problem and it seems that when I modified the hsqldb-ds.xml according to the guide the problem arises.

                JBoss comes up just fine when I'm using localDB but when I try to use the TCP connection option and uncomment the <connection-url> section and the mbean that follows, that's when JBoss is unhappy.

                My log all of a sudden shows the java.sql.SQLException: socket creation error message all over the place.

                The guide is missing something. What could it be?

                • 5. Re: java.sql.SQLException: socket creation error  (table cre
                  Madhu Ramachandran Newbie

                  has anyone got answer to this problem? i get tons of errors when i start JBoss (run.bat) on Win XP, JBoss 4.02 related to sqlException - socket connection error
                  setting up db schema give this error
                  java.sql.SQLException: socket creation error
                  at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

                  I disabled my firewalls .. no use.. still get socket ex at jboss startup

                  Caused by: java.sql.SQLException: socket creation error
                  at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
                  at org.hsqldb.jdbc.jdbcConnection.(Unknown Source)
                  at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
                  at org.hsqldb.jdbcDriver.connect(Unknown Source)
                  at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
                  reateManagedConnection(LocalManagedConnectionFactory.java:151)

                  JBoss does finally startup.. but obv.. the DB part is not working.. Any tips would be greatly appreciated.

                  • 6. Re: java.sql.SQLException: socket creation error  (table cre
                    Madhu Ramachandran Newbie

                    my mistake.. section 4.1.7.1 , i uncommented another mbean (the last one). but forgot to uncomment the one before that..

                    for other folks who get same error, make sure,
                    foll mbean is like below..
                    (the --> would have been at end, move it up)

                    <!-- This mbean should be used only when using tcp connections. Uncomment
                    when the tcp based connection-url is used. -->

                    1701
                    true
                    default
                    false
                    true





                    • 7. Re: java.sql.SQLException: socket creation error  (table cre
                      kaissun bs Newbie

                      could you mention the file to establish this operation please ?