Sometimes, when we perform database connection tests or deploy the system, we may encounter problems with data. Let's share one of my experiences over the past two days.
The scenario is as follows: the project needs to be transferred to other servers, and both database backup and project backup are completed. The two backups are correct. Then install the database. Here I use the default one. Directly configure listen, which is a risk of problems. Next, import data and deploy the project on Tomcat. After Tomcat is started. No matter how you log on, the message "cocould found JDBC driver" is displayed. I checked the driver in the project. I suspect that my database is different from the driver in the project, so the driver in the database of the server used in the new project is put on the project, and the application is restarted, the problem still persists. The header is too big and the configuration file is okay. Later, a colleague helped me debug the database by reading the listen and found that he used the actual IP address. After the IP address is changed, the problem is solved.
In summary, the problem is that I ignore it. The address in the URL should be the address listened to by the database, while localhost is not necessarily the address of the Data listener (if listen is localhost, It is localhost ).
Note: The URL is the address listened by JDBC. Oracle. Thin @ listen: Database port: Database Name. Note the address of the listen listener.