IntelliJ Java IDE
The moose likes General Computing and the fly likes Firewall(?), Java App and Database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » General Computing
Reply Bookmark "Firewall(?), Java App and Database" Watch "Firewall(?), Java App and Database" New topic
Author

Firewall(?), Java App and Database

Rafael Lee
Greenhorn

Joined: Sep 06, 2003
Posts: 23
When I use my PC as standalone (not connected to the internet), I disable the firewall program (to save on resources I guess). However, when I run a java app which accesses a database, say MySql, installed in my PC the following error occurs:
===================
...
java.sql.SQLException: Connection is broken: Network is down: connect
at org.hsqldb.Trace.getError(Unknown Source)
at org.hsqldb.Trace.error(Unknown Source)
at org.hsqldb.jdbcConnection.reconnectHSQL(Unknown Source)
at org.hsqldb.jdbcConnection.openHSQL(Unknown Source)
at org.hsqldb.jdbcConnection.<init>(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at HsqldbTest.main(HsqldbTest.java:13)
Finished executing
=================
I notice that this happens even when a java app accesses other databases e.g. hsqldb in my pc.
The error however goes away when I enable the firewall program before running the mentioned java app (it seemed that the firewall configured something in my pc that persists even if the firewall is disabled(?)).
Will anyone explain the error? And any suggestion on how to run the app without enabling the firewall in my machine(in case the app is installed in another standalone machine of similar condition)?
 
 
subject: Firewall(?), Java App and Database
 
Threads others viewed
Cannot acces Mysql database
Error connecting to DB2 database in localhost
Derby: Closing Db Problem
Updated from JRE 1.5 to 1.6, now SQL JDBC Connection doesnt work
SQLServerException: TCP/IP connection to the host has failed.
developer file tools