Hi, Is your NetBeans IDE implementing providing DataSources such as your JBOSS?! For debugging with Eclipse I use the following props
torque.database.WEBSHOP.adapter=oracle torque.dsfactory.WEBSHOP.connection.driver = oracle.jdbc.driver.OracleDriver torque.dsfactory.WEBSHOP.connection.url = jdbc:oracle:thin:@172.23.4.137:1521:WEBSHT02 torque.dsfactory.WEBSHOP.connection.user = ??? torque.dsfactory.WEBSHOP.connection.password = ??? torque.dsfactory.WEBSHOP.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory torque.dsfactory.WEBSHOP.pool.maxActive=2 torque.dsfactory.WEBSHOP.pool.maxIdle=1 torque.dsfactory.WEBSHOP.pool.testOnBorrow=true torque.dsfactory.WEBSHOP.pool.testOnReturn=false torque.dsfactory.WEBSHOP.pool.maxWait=10000 torque.dsfactory.WEBSHOP.pool.validationQuery=SELECT 1 FROM DUAL My impression is that there is no connection available which causes your call to hang Cheers, Siegfried Goeschl -----Original Message----- From: Dowell Griffin [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 22. Juli 2004 02:20 To: [EMAIL PROTECTED] Subject: Torque.getConnection() hangs - help I have successfully been using Torque to connect to hsqldb within a JBoss J2EE environment. I want to use it from my Netbeans IDE to do some debugging (debugging not related to Torque). I must have something wrong in the properties file. I know that there is a difference when JBoss is not managing the connection pool. Some of this is new to me so I may be overlooking something fundamental. Config: hsqldb (Hypersonic) Windows 2000 Java 1.4.2 JBoss 3.2.3 (but connections work when JBoss is the connection manager) When running from my IDE: Any connection attempt inside my torque classes hangs. I can make the problem surface like this: Torque.init(<file>); java.sql.Connection con=Torque.getConnection(); // this never returns I can do this, bypassing Torque, and get a connection with no problems: java.sql.DriverManager.getConnection("jdbc:hsqldb:hsql://127.0.0.1:9001", "sa", " "); When it hangs I pause the debugger and look at the stack trace and see the stack shown at the end of this post. This suggests Torque 'thinks' all is well or it would not have gone so far as to attempt to open the connection. There must be something fundamental I am missing. Here is my property file. I have tried many version of property files and some hang and some say the datasource is not configured. torque.database.createUrl=jdbc:hsqldb:hsql://localhost:9001 torque.database.buildUrl=jdbc:hsqldb:hsql://localhost:9001 torque.database.url=jdbc:hsqldb:hsql://localhost:9001 torque.database.driver=org.hsqldb.jdbcDriver torque.database.user=sa torque.database.password= torque.database.host=localhost torque.database.default =maindb torque.database.name =maindb torque.database.maindb.adapter=hypersonic torque.dsfactory.maindb.datasource.factory=org.apache.torque.dsfactory.Torqu eDataSourceFactory ## tried all of these ###org.apache.torque.dsfactory.PerUserPoolDataSourceFactory ###org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS torque.dsfactory.maindb.datasource.driver=org.hsqldb.jdbcDriver torque.dsfactory.maindb.datasource.url=jdbc:hsqldb:hsql://localhost:9001 torque.dsfactory.maindb.datasource.user=sa torque.dsfactory.maindb.datasource.password= # not sure if this is actually used? torque.dsfactory.maindb.connection.factory=org.apache.torque.dsfactory.Torqu eDataSourceFactory # these 5 are the same for non-J2EE or J2EE torque.dsfactory.maindb.connection.driver=org.hsqldb.jdbcDriver torque.dsfactory.maindb.connection.url=jdbc:hsqldb:hsql://localhost:9001 torque.dsfactory.maindb.connection.user=sa torque.dsfactory.maindb.connection.password= STACK Trace when hung: SocketInputStream.socketRead0 [EMAIL PROTECTED] SocketInputStream.read [EMAIL PROTECTED] BufferedInputStream.fill [EMAIL PROTECTED] BufferedInputStream.read [EMAIL PROTECTED] DataInputStream.readInt [EMAIL PROTECTED] jdbcConnection.executeHSQL [EMAIL PROTECTED] jdbcConnection.execute [EMAIL PROTECTED] jdbcConnection.setAutoCommit [EMAIL PROTECTED] ConnectionImpl.setAutoCommit [EMAIL PROTECTED] TorqueClassicDataSource.getConnection [EMAIL PROTECTED] TorqueClassicDataSource.getConnection [EMAIL PROTECTED] TorqueInstance.getConnection [EMAIL PROTECTED] TorqueInstance.getConnection [EMAIL PROTECTED] Torque.getConnection [EMAIL PROTECTED] TESTER.runRFServer [EMAIL PROTECTED] TESTER.main [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
