Invocation of init method failed; nested exception is java.sql.SQLException: Listener refused the connection with the following error:ORA-12519, TNS:no appropriate service handler found

When the machine is started, reported this error, then check the information on the Internet, the majority said that the number of database connection problems, execute the following statement

Query the current number of connections: the SELECT COUNT (*) from  v $ Process ;  

Maximum number of connections query: SELECT value from  V $ Parameter WHERE name = 'Processes' ;     

Then find the current number of connections does not exceed the maximum number of connections, but it's a third.

 

Then the information found on the Internet, execute the following statement

SELECT osuser, a.username,cpu_time/executions/1000000||'s', sql_fulltext,machine

from v$session a, v$sqlarea b

where a.sql_address =b.address order by cpu_time/executions desc;

Discovered a problem: user-MACHINE field oracle is mhraz2, and the example project named mhraz1, then there is executed the following statement to view the database instance name

SELECT instance_name FROM v$instance;

And found that indeed the instance name is mhraz1, change the database instance name jdbc.properties, and then start the project, the project started successfully.

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/zwl18/p/11224677.html