---
title: "TNS:no appropriate service handler found"
author: "ymanyang"
date: "2012-11-16T16:47:53Z"
tags: []
categories: ["数据库"]
slug: "tns-no-appropriate-service-handler-found"
draft: false
lastmod: "2012-11-16T16:47:53Z"
id: 1722158
url: "https://buckyang.iteye.com/blog/1722158"
---

# Error Message:

Caused by: java.sql.SQLException: Listener refused the connection with the following error:

ORA-12519, TNS:no appropriate service handler found

The Connection descriptor used by the client was:

localhost:1521:xe

 

# Cause:

This error is generally caused by the value of allowed processes or sessiones is too small. 

# Solution:

Excecute the following command in SQLPLUS to change the parameters of Oracle then restart the oracle service.

```
alter system set processes=500 scope=spfile sid='*';
alter system set sessions=555 scope=spfile sid='*';
alter system set transactions=610 scope=spfile sid='*';
```