当前位置:网站首页>Record several frequently asked questions (202207)
Record several frequently asked questions (202207)
2022-07-05 22:25:00 【zhangbeizhen18】
Record :282
scene : Several common questions :
Java Code execution SQL Statement causes the thread to get stuck , No more execution .
CLIENT_PUGIN_AUTH is required.
Communications link failure.
java.lang.ClassNotFoundException.
edition :Spring Boot 2.6.3
One 、 Case scenario
1.Java Code execution SQL Statement causes the thread to get stuck , No more execution
problem :Java Thread pool 10 Threads , Concurrent in Oracle Table of database T_DEMO Implementation UPDATE sentence . however 10 All threads are stuck , This leads to the accumulation of tasks , and try catch No exceptions were caught .
reason :Oracle Table of database T_DEMO, stay PL/SQL The client executes on the whole table FOR UPDATE Lock the watch , Not submit . Lead to Java The code is executing UPDATE When the sentence is , Cannot get database table operation , Been waiting . And no exception is thrown .
solve : Set the timeout in the data source class , for example .
DruidDataSource dataSource = new DruidDataSource();
dataSource.setQueryTimeout(60);The phenomenon : Overtime , It throws an exception .
Caused by: java.sql.SQLTimeoutException: ORA-01013: The user requested to cancel the current operation
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:630)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:564)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1151)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:771)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:299)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:498)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:152)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1052)
at oracle.jdbc.driver.OracleStatement.executeSQLStatement(OracleStatement.java:1531)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1311)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3746)
at oracle.jdbc.driver.OraclePreparedStatement.executeLargeUpdate(OraclePreparedStatement.java:3918)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3897)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:992)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:255)
at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:965)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:651)
... 9 more
Caused by: Error : 1013, Position : 0,......2. Report errors :CLIENT_PUGIN_AUTH is required
Report errors :java.sql.SQLNontransientConnectionException: CLIENT_PUGIN_AUTH is required
reason : In this case MySQL The database version is 5.6.29, And in the pom.xml Introduced in 8.0.23 drive
solve :MySQL Drive reduced version .
2.1 pom.xml change
Higher version :
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>>8.0.23</version>
</dependency>Changed to: :
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.49</version>
</dependency>2.2 application.yml change
MySQL Drive class :
Higher version :
com.mysql.cj.jdbc.DriverChanged to: :
com.mysql.jdbc.Driver3. Report errors :404 Not Found: [no body]
Report errors :
org.springframework.web.client.HttpClientErrorException$NotFound: 404 Not Found: [no body]
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:113)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:168)
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:122)
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:819)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:777)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:437)solve : This example is the server of access Controller The way of doing this has changed , Re determine the server access path .
4. Report errors :Communications link failure
Report errors :
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure.
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.solve : The database connection information is incorrect .
5. Report errors :ClassNotFoundException
Report errors :
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpSessionIdListenerreason :
be based on Spring Boot 2.6.3 Of web engineering :
stay Tomcat 7 Of servlet-api.java There is no HttpSessionIdListener.
stay Tomcat 8 Of javax.servlet-api-4.0.1.jar There is HttpSessionIdListener.
solve :war The package deployment environment is changed to Tomcat 8.
above , thank .
2022 year 7 month 4 Japan
边栏推荐
- Hcip day 16
- Two stage locking protocol for concurrency control
- Overriding equals() & hashCode() in sub classes … considering super fields
- 航海日答题小程序之航海知识竞赛初赛
- 90后测试员:“入职阿里,这一次,我决定不在跳槽了”
- Postman core function analysis - parameterization and test report
- Navigation day answer applet: preliminary competition of navigation knowledge competition
- Metaverse ape received $3.5 million in seed round financing from negentropy capital
- 解决thinkphp启动时“No input file specified”的问题
- Analysis of the problem that the cookie value in PHP contains a plus sign (+) and becomes a space
猜你喜欢

Qtquick3d real time reflection

Technology cloud report: how many hurdles does the computing power network need to cross?

U盘的文件无法删除文件怎么办?Win11无法删除U盘文件解决教程

2022-07-05:给定一个数组,想随时查询任何范围上的最大值。 如果只是根据初始数组建立、并且以后没有修改, 那么RMQ方法比线段树方法好实现,时间复杂度O(N*logN),额外空间复杂度O(N*

The simple problem of leetcode is to split a string into several groups of length K

2022 Software Test Engineer salary increase strategy, how to reach 30K in three years

A substring with a length of three and different characters in the leetcode simple question

How to quickly experience oneos

database mirroring

Index optimization of performance tuning methodology
随机推荐
CA certificate trampled pit
Analysis of the problem that the cookie value in PHP contains a plus sign (+) and becomes a space
Oracle triggers
Leetcode simple question check whether all characters appear the same number of times
Calculation method of boundary IOU
Oracle is sorted by creation time. If the creation time is empty, the record is placed last
科技云报道荣膺全球云计算大会“云鼎奖”2013-2022十周年特别贡献奖
Matlab draws a cute fat doll
Leetcode simple question: check whether each row and column contain all integers
Understand the basic concept of datastore in Android kotlin and why SharedPreferences should be stopped in Android
[groovy] mop meta object protocol and meta programming (Introduction to groovyobject interface | introduction to metaclass | implementation of class methods using groovyobject invokemethod)
Metaverse ape received $3.5 million in seed round financing from negentropy capital
等到产业互联网时代真正发展成熟,我们将会看待一系列的新产业巨头的出现
點到直線的距離直線的交點及夾角
Implementing Lmax disruptor queue from scratch (IV) principle analysis of multithreaded producer multiproducersequencer
MCU case -int0 and INT1 interrupt count
Overview of concurrency control
Interprocess communication in the "Chris Richardson microservice series" microservice architecture
Go语言学习教程(十五)
How to quickly experience oneos