In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to solve the problem of JDBC connection error". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "JDBC connection error report how to solve" it!
The solution is as follows:
1) whether there is a problem with the database itself, there is no problem with the client login.
2) check if there is a problem with the war package, connect to the database locally, no problem.
3) is there something wrong with the startup parameters? Because of multiple data sources, the data source and driver name are configured in the startup parameters.
-- spring.datasource.url=jdbc:dm://172.31.98.190:5236/DMSERVER\
-- spring.datasource.driverClassName=dm.jdbc.driver.DmDriver\
Check it out and there's no problem.
4) are there any special characters?
I looked at the startup script with vi-b start.sh and found no special characters like ^ M.
5) remove the startup parameters, write them into application.properties, repackage them, upload them,. / start.sh, the startup does not report an error.
6) check these two lines of parameters again later, delete the parameters line by line, type them manually, and navigate to the parameter line
-- spring.datasource.driverClassName=dm.jdbc.driver.DmDriver\
Delete the space after DmDriver, and then manually type in the space,: wq save, restart and start successfully.
7) Why? I went to have lunch and come back to see it in the afternoon. Suspected hidden characters on the road.
8) when I came back in the afternoon, I went to Baidu according to the idea of hidden characters to see if there was any other way to view the hidden characters on linux. Found an order, cat-A.
Cat-A start.sh
The information found is as follows
-- spring.datasource.url=jdbc:dm://172.31.98.190:5236/DMSERVERM-BM-\ $
-- spring.datasource.driverClassName=dm.jdbc.driver.DmDriverM-BM-\ $
With the addition of MmurBM-this special string of characters, the truth will be revealed.
9) what special character is MmurBM -? Which god can tell me? My keyword search only found the BM algorithm, which is a search and replacement algorithm. I also found a post saying that this problem also occurred when I posted it in oneNote. Therefore, it is speculated that it is caused by the operation and maintenance personnel replacing the database parameters in batch on windows.
At this point, I believe you have a deeper understanding of "JDBC connection error report how to solve", might as well come to the actual operation! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.