org.opengis.referencing.FactoryException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Firewall might be blocking your connection, or MySQL it's not running on your server machine.


rafael
tip

Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.


rafael
tip

Check if ip adress is correct, if the port is correct, and if the server is up and running and waiting for connections. Also, check if there's no firewall blocking you and if your internet connection is working.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Convert EPSG:3068 to WGS84
    via Geographic Information Systems by Selphiron
    ,
  • Connection refused.
    via by Unknown author,
  • Exception in thread "main" java.lang.Exception: The database server's error messages are not in English, however the installer requires them to be in English when using PostgreSQL earlier than 7.4. You either need to set "lc_messages = 'C'" in your postgresql.conf file and restart PostgreSQL or upgrade to PostgreSQL 7.4 or later. The installer executed the query "SELECT bogus_column_1249697930711 FROM bogus_table_1249697930711 WHERE another_bogus_column_1249697930711 IS NULL" and expected "does not exist" in the error message, but this exception was received instead: java.sql.SQLException: Could not get an administrative connection to the database. Is the database running, listening for TCP connections, and allowing us to connect and authenticate from localhost? Tried connecting to database specified by data source SimpleDataSource[URL='jdbc:postgresql://localhost:5432/template1', driver class='org.postgresql.Driver', properties: user='postgres', password='']. Original error: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.opennms.netmgt.dao.db.InstallerDb.databaseCheckLanguage(InstallerDb.java:1610) at org.opennms.install.Installer.install(Installer.java:225) at org.opennms.install.Installer.main(Installer.java:858) Caused by: java.sql.SQLException: Could not get an administrative connection to the database. Is the database running, listening for TCP connections, and allowing us to connect and authenticate from localhost? Tried connecting to database specified by data source SimpleDataSource[URL='jdbc:postgresql://localhost:5432/template1', driver class='org.postgresql.Driver', properties: user='postgres', password='']. Original error: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.opennms.netmgt.dao.db.InstallerDb.rethrowDatabaseConnectionException(InstallerDb.java:2243) at org.opennms.netmgt.dao.db.InstallerDb.initializeAdminConnection(InstallerDb.java:2220) at org.opennms.netmgt.dao.db.InstallerDb.getAdminConnection(InstallerDb.java:2209) at org.opennms.netmgt.dao.db.InstallerDb.databaseCheckLanguage(InstallerDb.java:1599) ... 2 more Caused by: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65) at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:116) at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24) at org.postgresql.Driver.makeConnection(Driver.java:369) at org.postgresql.Driver.connect(Driver.java:245) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.opennms.netmgt.dao.db.SimpleDataSource.getConnection(SimpleDataSource.java:79) at org.opennms.netmgt.dao.db.InstallerDb.initializeAdminConnection(InstallerDb.java:2218) ... 4 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.<init>(Socket.java:367) at java.net.Socket.<init>(Socket.java:180) at org.postgresql.core.PGStream.<init>(PGStream.java:60) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77) ... 14 more
    via by DJ Gregor,
    • org.opengis.referencing.FactoryException: Failed to connect to the EPSG database. at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:441) at org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:133) at org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:235) at org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:119) at org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:667) at org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:501) at org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:192) at javax.imageio.spi.FilterIterator.advance(Unknown Source) at javax.imageio.spi.FilterIterator.<init>(Unknown Source) at javax.imageio.spi.ServiceRegistry.getServiceProviders(Unknown Source) at org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:197) at org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:180) at org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:455) at org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:88) at org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:69) at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:262) at org.geotools.referencing.CRS.decode(CRS.java:519) at org.geotools.referencing.CRS.decode(CRS.java:447) at Test.convert(Test.java:74) at Test.main(Test.java:53) Caused by: org.postgresql.util.PSQLException: Connection refused. Check the correctness of host name and port number and check whether the data base server accepts TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125) at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30) at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24) at org.postgresql.Driver.makeConnection(Driver.java:393) at org.postgresql.Driver.connect(Driver.java:267) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:87) at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:70) at org.geotools.referencing.factory.epsg.DirectEpsgFactory.getConnection(DirectEpsgFactory.java:3196) at org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:436) ... 19 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at org.postgresql.core.PGStream.<init>(PGStream.java:62) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:76) ... 31 more

    Users with the same issue

    Unknown visitor1 times, last one,
    andyglick
    56 times, last one,
    Unknown visitor1 times, last one,
    Justin
    18 times, last one,
    Unknown visitor1 times, last one,
    761 more bugmates