In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "Tomcat cluster session replication and how to solve the Oracle pit". In the daily operation, I believe many people have doubts about how to solve the problem of Tomcat cluster session replication and Oracle pit. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to solve the Tomcat cluster session replication and Oracle pit". Next, please follow the editor to study!
Problem description
One of the company's systems uses the cluster session replication feature that comes with tomcat, and then reports an exception that the connection in the oracle driver package cannot be serialized.
01-Nov-2017 1615 org.apache.catalina.ha.session.DeltaManager.requestCompleted Unable to serialize delta request for sessionid 26.653 SEVERE [https-jsse-nio-8443-exec-2] org.apache.catalina.ha.session.DeltaManager.requestCompleted Unable to serialize delta request for sessionid [F825A52DD9E0E7F8FD6BB3E3F721F841] java.io.NotSerializableException: oracle.jdbc.driver.T4CConnection at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1183) at java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1547) at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1508) at java.io.ObjectOutputStream .writeordinaryObject (ObjectOutputStream.java:1431) at java.io.ObjectOutputStream.writeObject0 (ObjectOutputStream.java:1177) at java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1547) at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1508) solution
When you see this problem, first check whether the code in the entire system is used in T4CConnection or java.sql.Connection and put them in session.
After inspection, it is found that the system does not use any related classes in session.
Next, the operation and maintenance students had a headache, changing the tomcat version and changing all kinds of tomcat-related configurations were not solved.
Then I decided that the problem might be caused by the program or data, and sure enough, after exhaustive testing one by one, I found that it was working properly after killing an object, and did not report serialization errors. It is found that the java.sql.Clob type is used in the object killed. Once upon a time, I saw this exception on the Internet, and it will be a problem to use this type of field in tomcat session replication.
It is really easy to confirm that the Clob field is not used in practical applications, so the problem that has been troubling the whole team for two or three days has finally been solved.
Tomcat is really drunk, session copy you do not support Clob field, you reported an error that the oracle driver can not be serialized, a bit misleading, people lose their way, but fortunately the problem is solved.
At this point, the study on "Tomcat cluster session replication and how to solve the Oracle pit" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.