Leitura Arquivo CSV e inserção banco Oracle

Pessoal, boa tarde.
Estou com um problema e já tentei de vairas formas resolver, mas sem sucesso.
Criei uma Classe Java para ler um arquivo csv e depois inserir os valores em um banco de dados oracle.
Quando executado o arquivo, ele insere alguns valores e depois apresenta o seguinte erro:

Conexao OK
Conexao OK
Conexao OK
Conexao OK
Exception in thread “main” java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:774)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at obama.Exercicios.Leitor1.main(Leitor1.java:56)

Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found

at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:271)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:317)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1438)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:518)
... 6 more

C:\Users\Ativo - Fabio\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
FALHA NA CONSTRUÇÃO (tempo total: 2 segundos)

#################################################################

Este é o código completo, se alguém já passou pelo mesmo problema, poderia dar uma luz da solução, desde já agradeço

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package obama.Exercicios;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Leitor1 {

String drive = "oracle.jdbc.driver.OracleDriver";    
Connection conexao;
Statement statement;
ResultSet resultset;


public static void main(String[] args) throws ClassNotFoundException, SQLException {
    try {
        FileInputStream arquivo = new FileInputStream("C:\\Arquivos\\IMPFUNC.csv");
        InputStreamReader input = new InputStreamReader(arquivo);
        BufferedReader br = new BufferedReader(input);

        String linha;

        do {
            linha = br.readLine();
            if (linha != null) {

                String[] campo = linha.split(";");
                
                String mesref = campo[0];
                String chave = campo[1];
                String EmployeeID = campo[2];
                String EmployeeFullName = campo[3];
                String GivenName = campo[4];
                String FamilyName = campo[5];
                String EmployeeOrganization = campo[6];
                String JobCode = campo[7];
                String JobTitle = campo[8];
                String DiscretionaryTitle = campo[9];
                String Function = campo[10];
                String SpecialityArea = campo[11];
                String GlobalCareerLevel = campo[12];
                String WorkLocation = campo[13]; 
            
                Class.forName("oracle.jdbc.driver.OracleDriver"); 
                try (Connection con = DriverManager.getConnection ("jdbc:oracle:thin:@localhost:1521:xe", "fabio", "Leticia1")) {
                    System.out.println("Conexao OK");
                    try (Statement st = con.createStatement()) {
                        ResultSet rs = st.executeQuery("INSERT into TB_FUNCORACLE ( MESREF ) VALUES ("+mesref+")");
                        //int rs = st.executeUpdate("INSERT into TB_FUNCORACLE ( MESREF ) VALUES ("+mesref+")");
                    st.close(); 
                    con.close();
                    
                    }
                }                    
            }
        } while (linha != null);
    } catch (IOException e) {
        System.out.println("Erro ao ler Arquivo");
    }
}

}

Abra a conexão fora do laço e feche-a depois que concluir.

Darlan boa tarde.
Fiz da seguinte maneira.

Criei uma nova classe de Conexão
###################################################################
public class Conexao {
Connection connection = null;
/* Efetua conexão com o banco de dados /
Conexao() throws SQLException {
try
{
Class.forName(“oracle.jdbc.driver.OracleDriver”);
String url = “jdbc:oracle:thin:@localhost:1521:xe”;
String username = “fabio”;
String password = “Leticia1”;
connection = DriverManager.getConnection(url, username, password);
JOptionPane.showMessageDialog(null, “Conexão efetuada com sucesso.”);
}
catch(HeadlessException | ClassNotFoundException | SQLException e ) {
JOptionPane.showMessageDialog(null, “Falha”);
}
}
/
Retorna conexão quando é requisitada */
public Connection getConnection() {
return connection;
}

int executeUpdate(String sql) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

}

##########################################################################

depois mantive a outra classe Leitor1, instanciei a Classe Conexao dentro de Leitor 1 e lá no laço de repetição, inseri meu instrução SQL, porem apresenta erro

public class Leitor1 {

Statement statement;
ResultSet resultset;



public static void main(String[] args) throws ClassNotFoundException, SQLException {
    try {
        FileInputStream arquivo = new FileInputStream("C:\\Arquivos\\IMPFUNC.csv");
        InputStreamReader input = new InputStreamReader(arquivo);
        BufferedReader br = new BufferedReader(input);

        String linha;
        
         Conexao con = new Conexao();

        do {
            linha = br.readLine();
            if (linha != null) {

                String[] campo = linha.split(";");
                
                String mesref = campo[0];
                String chave = campo[1];
                //String EmployeeID = campo[2];
                //String EmployeeFullName = campo[3];
                //String GivenName = campo[4];
                //String FamilyName = campo[5];
                //String EmployeeOrganization = campo[6];
                //String JobCode = campo[7];
                //String JobTitle = campo[8];
                //String DiscretionaryTitle = campo[9];
                //String Function = campo[10];
                //String SpecialityArea = campo[11];
                //String GlobalCareerLevel = campo[12];
                //String WorkLocation = campo[13]; 

// Class.forName(“oracle.jdbc.driver.OracleDriver”);
// try (Connection con = DriverManager.getConnection (“jdbc:oracle:thin:@localhost:1521:xe”, “fabio”, “Leticia1”)) {
// System.out.println(“Conexao OK”);
// try (Statement st = con.createStatement()) {
// ResultSet rs = st.executeQuery(“INSERT into TB_FUNCORACLE ( MESREF ) VALUES (”+mesref+")");
// //int rs = st.executeUpdate(“INSERT into TB_FUNCORACLE ( MESREF ) VALUES (”+mesref+")");
// st.close();
// con.close();
// }
// }

        String sql = "INSERT INTO TB_FUNCORACLE (mesref,chave) VALUES ('"+mesref+"','"+chave+"');";
    int res = con.executeUpdate(sql);
                
            }
        } while (linha != null);
    } catch (IOException e) {
        System.out.println("Erro ao ler Arquivo");
    }
}

}
###########################################################

Sou novato nesta linguagem de programação e não faço a minima ideia de como devo chamar uma classe e depois dizer a ela que deverá executar uma instrução sql

Segue um exemplo.
Tu pode abrir a conexao no construtor da classe, usar um método para fazer os inserts e depois que terminar chama um método para fechar a conexao.
Pode ser melhorada, mas acho que já resolve.

public class Conexao {

static Connection connection;
Statement st;
ResultSet rs;

public Conexao() {
	super();
	try {
		connection = DriverManager.getConnection("string de conexao");
	} catch (SQLException e) {
		e.printStackTrace();
		System.out.println("Nao foi possivel conectar ao banco");
	}		
}

public void executeInsert(String sql)
{
	// faz o insert aqui
}	

public void closeConnection() {
	if(this.connection != null)
		connection.close();
}

}

Pessoal, bom dia.
Obrigado pela ajuda, com as informações apresentadas e mais algumas consultas no google consegui resolver o problema.

Segue o código completo

package obama.Exercicios;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class Leitor1 {

// JDBC driver name and database URL
static final String JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver";
static final String DB_URL = "jdbc:oracle:thin:@localhost:1521:xe";
//  Database credentials
static final String USER = "fabio";
static final String PASS = "Leticia1";

public static void main(String[] args) throws ClassNotFoundException, SQLException, FileNotFoundException {

    Connection conn = null;
    Statement stmt = null;

    try {
        FileInputStream arquivo = new FileInputStream("C:\\Arquivos\\IMPFUNC.csv");
        InputStreamReader input = new InputStreamReader(arquivo);
        BufferedReader br = new BufferedReader(input);

        String linha;

        Class.forName("oracle.jdbc.driver.OracleDriver");

        //STEP 3: Open a connection
        System.out.println("Connecting to a selected database...");
        conn = DriverManager.getConnection(DB_URL, USER, PASS);
        System.out.println("Connected database successfully...");

        do {
            linha = br.readLine();
            if (linha != null) {

                String[] campo = linha.split(";");

                String mesref = campo[0];
                String chave = campo[1];
                String EmployeeID = campo[2];
                String EmployeeFullName = campo[3];
                String GivenName = campo[4];
                String FamilyName = campo[5];
                String EmployeeOrganization = campo[6];
                String JobCode = campo[7];
                String JobTitle = campo[8];
                String DiscretionaryTitle = campo[9];
                String Function = campo[10];
                String SpecialityArea = campo[11];
                String GlobalCareerLevel = campo[12];
                String WorkLocation = campo[13]; 

                stmt = conn.createStatement();
                String sql = "insert into tb_funcoracle (mesref ) values (" + mesref + ")";
                stmt.executeUpdate(sql);
                stmt.close();
            }
        } while (linha != null);
    } catch (IOException e) {
        System.out.println("Erro ao ler Arquivo");
    }
}

}