I'm coding Java application that decode TCAP frame which will be reading from a text file, then insert decoded data in a database(Oracle)! So, at the beginning decoding and integration are perfectly performed, but when it reachs a finite of number decoded and inserted data, it starts triggering this error at the thread that assumes the insertion in the database:
" java.lang.OutOfMemoryError: unable to create new native thread "
" Exception in thread "Thread-465" java.lang.NullPointerException "
Code extract:
public void run(){
Conn_BD connexion=new Conn_BD("thin:@localhost:1521:XE", "SYSTEM", "SYSTEM");
java.sql.Connection cn=connexion.connect();
try {
Statement instruction = cn.createStatement();
instruction.executeUpdate("update tcapBegin set "+
trame+"='"+trame_val+"' where "+message+" like '"+trameId+"'");
cn.close();
} catch(SQLException e) {
System.out.print(e);
}
}
Does anyone have an idea to resolve this problem?