Caused By Java.sql.sqlexception Socket Creation Error
not work correctly without it enabled. Please turn JavaScript back on and reload this page. All Places > JBoss AS > Beginner's Corner > Discussions Please enter a title. You can not post a blank message. Please type your message and try again. 7 Replies Latest reply on Apr 1, 2011 6:18 AM by kaissun bs java.sql.SQLException: socket creation error (table creatio Safak Kayikci Apr 12, 2005 10:22 AM 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 withant -f jboss-build.xml db-create-table command I got the error which is :--------------------------------------------------------------------------------Buildfile: jboss-build.xmldb-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: 1BUILD SUCCESSFUL------------------------------------------------------------------------------------Ayn suggestions ??? Thanx. 22225Views Tags: none (add) This content has been marked as final. Show 7 replies 1. Re: java.sql.SQLException: socket creation error (table cre pang Apr 25, 2005 1:24 AM (in response to Safak Kayikci) 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-tableBuildfile: jboss-build.xmldb-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.
This Site Careers Other all forums Forum: JDBC and Relational Databases HSQLDB Connection not established Manisha Haran Greenhorn Posts: 2 posted 8 years ago Hi everyone, I had created a HSQLDB in the following manner : java -classpath ./hsqldb.jar org.hsqldb.util.DatabaseManager -driver org.hsqldb.jdbcDriver -url jdbc:hsqldb:C:\Users\mharidas\Documents\Test_AC -user sa That is my DB name is TEST_AC. I believe that when the DataBase gets created it is of IN-Memory type and not standAlone etc. Now when I try to connect to it by the following code :
code:It gives me a nullPointerException..at DriverManager.getConnection. Can someone help me as to why this exception has occured. I have tried giving jdbc:hsqldb:mem:. as well as jdbc:hsqldb:./TEST_AC as the url but it still dint work.. Am i https://coderanch.com/t/307085/JDBC/databases/HSQLDB-Connection-established missing something? [ July 16, 2008: Message edited by: Manisha Haran ] [ July 16, 2008: Message edited by: Manisha Haran ] Campbell Ritchie Sheriff Posts: 50289 80 posted 8 years ago Welcome to JavaRanch. Please check the stack trace for the NullPointerException (NPE). Somebody else had an NPE on a database today as well; some of the links might be helpful, from this post. Are you sure that is where the problem is? The getConnection method is static, so that oughtn't to throw an NPE. You are supplying the requisite 3 arguments, so they oughtn't to throw an NPE. If there is any error in that line, it would throw an SQLException rather than an NPE. Please check the server-side part of your database program is running. I am not familar with HSQLDB, but there is probably some admin utility where you can see whether the server is alive. If none of those suggestions helps, please come back with more details. [ July 13, 2008: Message edited by: Campbell Ritchie ] Campbell Ritchihttps://developer.jboss.org/thread/77279 Connection conn=null; Statement select=null; try{ Class.forName("org.hsqldb.jdbcDriver"); System.out.println("Driver loaded...");} catch(Exception e){ System.out.println("Failed to load hsql driver."); return; } try{ conn = DriverManager.getConnection("jdbc:hsqldb:C:\\Users\\mharidas\\Documents\\Test_AC","sa",""); System.out.println("connected to hsql..");
Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.
HyperSQL Database Engine (HSQLDB) Brought to you by: fredt, unsaved Summary Files Reviews Support Wiki Mailing Lists Tickets ▾ Patches Bugs Feature Requests HSQLDB Utilities News Discussion Git ▾ hsqldb tmp SVN CVS Create Topic Stats Graph Forums License Issues 12 Help 3775 Open Discussion 715 Help Formatting Help Gilead Hibernate Hsqldb Forum: Help Creator: fred Created: 2010-09-19 Updated: 2014-01-19 fred - 2010-09-19 Hi I'm using a sample with Gilead, Hibernate and Hsqldb. The sample is described at http://code.google.com/intl/sv/webtoolkit/articles/using_gwt_with_hibernate.html and is downloaded at http://google-web-toolkit.googlecode.com/files/gwt_hibernate_gilead.zip I start the Hsqldb with the command java -cp lib/hsqldb.jar org.hsqldb.Server When I try to add items through the sample application i get the following stack trace below. What could be the problem? log4j:WARN No appenders could be found for logger (org.apache.jasper .compiler.JspRuntimeContext). log4j:WARN Please initialize the log4j system properly. 31 INFO org.hibernate.cfg.Environment - Hibernate 3.3.1. GA 31 INFO org.hibernate.cfg.Environment - hibernate.proper ties not found 47 INFO org.hibernate.cfg.Environment - Bytecode provide r name : javassist 47 INFO org.hibernate.cfg.Environment - using JDK 1.4 ja va.sql.Timestamp handling 171 INFO org.hibernate.cfg.Configuration - configuring f rom resource: /hibernate.cfg.xml 171 INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml 265 INFO org.hibernate.cfg.Configuration - Reading mappi ngs from resource : com/google/musicstore/domain/Record.hbm.xml 343 INFO org.hibernate.cfg.HbmBinder - Mapping class: co m.google.musicstore.domain.Record -> RECORD 374 INFO org.hibernate.cfg.Configuration - Reading mappi ngs from resource : com/google/musicstore/domain/Account.hbm.xml 405 INFO org.hibernate.cfg.HbmBinder - Mapping class: co m.google.musicstore.domain.Account -> ACCOUNT 405 INFO org.hibernate.cfg.HbmBinder - Mapping collectio n: com.google.musicstore.domain.Account.records -> ACCOUNT_RECORD 421 INFO org.hibernate.cfg.Configuration - Configured Se ssionFactory: null 546 INFO org.hibernate.connection.DriverManagerConnectio nProvider - Using Hibernate built-in connection pool (not for production use!) 546 INFO org.hibernate.connection.DriverManagerConnectio nProvider - Hibernate connection pool size: 1