資源描述:
《Solving Common JDBC Problems with MySQL 》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在學術(shù)論文-天天文庫。
1、1Copyright?2011,Oracleand/oritsaffiliates.Allrightsreserved.InsertInformationProtectionPolicyClassificationfromSlide8SolvingCommonJDBCProblemswithMySQLToddFarmer2Copyright?2011,Oracleand/oritsaffiliates.Allrightsreserved.InsertInformationProtectionPolicyClassif
2、icationfromSlide8ProgramAgenda?Commonproblems?RecommendedConfigurations?HighAvailability?LoadDistribution?ExtensionPoints?DebuggingMySQLJDBCIssues3Copyright?2011,Oracleand/oritsaffiliates.Allrightsreserved.InsertInformationProtectionPolicyClassificationfromSlid
3、e8CommonProblems?ClasspathExceptions?CommunicationExceptions?Auto-reconnect4Copyright?2011,Oracleand/oritsaffiliates.Allrightsreserved.InsertInformationProtectionPolicyClassificationfromSlide8CommonProblemsClasspathExceptions?Mostcommonproblemseeninforums?java.
4、lang.ClassNotFoundException:com.mysql.jdbc.Driver?KnowwhereyourapplicationserverexpectstofindJARfiles–Ifusingservercomponents(e.g.,JDBCRealmsinTomcat)makesureJARfileisincommonlib5Copyright?2011,Oracleand/oritsaffiliates.Allrightsreserved.InsertInformationProtec
5、tionPolicyClassificationfromSlide8CommonProblemsCommunicationException?Verycommonproblem?Mostoftencausedby:–Reusingidle(orevenclosed)connectionswithoutcheckingstate–Networkproblems–MySQLServerornetworkconfiguration?Connector/JandServerrelyonTCP-levelkeepalive–W
6、hennotactivelyexecutingcommands,connectioncanappear“dead”toroutersandfirewalls6Copyright?2011,Oracleand/oritsaffiliates.Allrightsreserved.InsertInformationProtectionPolicyClassificationfromSlide8CommonProblemsCommunicationExceptions-Debugging?Upgrade!Versionsgr
7、eaterthan5.1.13haveadditionaldiagnosticinformationinerrormessage7Copyright?2011,Oracleand/oritsaffiliates.Allrightsreserved.InsertInformationProtectionPolicyClassificationfromSlide8CommonProblemsCommunicationExceptions-Debugging?Upgrade!Versionsgreaterthan5.1.1
8、3haveadditionaldiagnosticinformationinerrormessagecom.mysql.jdbc.exceptions.jdbc4.CommunicationsException:CommunicationslinkfailureThelastpacketsuccessfullyreceivedfromthese