错误335544421.连接被远程接口拒绝

时间:2018-09-10 10:24:58

标签: java jdbc firebird jaybird

我有验证码

package com.redsoft.company.dao;

import org.firebirdsql.jdbc.FBDriver;
import java.sql.Connection;
import java.sql.DriverManager;

public class AbstractDao {
    private static final String USER = "root";
    private static final String PASSWORD = "root";
    private static final String URL = "jdbc:firebirdsql:localhost/3050:D:\\dev\\mycompany\\COMPANY.FDB";

    public AbstractDao() throws Exception {
        initConnection();
    }

    private void initConnection() throws Exception {
        Class.forName("org.firebirdsql.jdbc.FBDriver");
        DriverManager.registerDriver(new FBDriver());
        System.out.println(URL);
        Connection connection = DriverManager.getConnection(URL, USER, PASSWORD);

    }

    public static void main(String[] args) throws Exception {
        AbstractDao abstractDao = new AbstractDao();
    }
}

运行主方法时出现错误

  

线程“ main”中的异常org.firebirdsql.jdbc.FBSQLException:   GDS异常。 335544421.远程接口拒绝了连接

Firebird版本3.0.3 Jaybird版本2.2.5

0 个答案:

没有答案