{"id":2418,"date":"2011-08-31T07:59:26","date_gmt":"2011-08-31T12:59:26","guid":{"rendered":"https:\/\/www.migrate2cloud.com\/blog\/?p=2418"},"modified":"2017-08-31T08:31:21","modified_gmt":"2017-08-31T13:31:21","slug":"solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver","status":"publish","type":"post","link":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/","title":{"rendered":"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"},"content":{"rendered":"<p>Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files.<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>\u00a0Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>We can get things working by following these steps.<\/p>\n<p>&nbsp;<\/p>\n<p>Install the missing libraries<\/p>\n<p>&nbsp;<\/p>\n<p><code>apt-get install libmysql-java<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Find the required Jar files by using the following command<\/p>\n<p>&nbsp;<\/p>\n<p><code>dpkg-query -L libmysql-java<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>This will give an output like the following<\/p>\n<blockquote><p>\/.<br \/>\n\/usr<br \/>\n\/usr\/share<br \/>\n\/usr\/share\/java<br \/>\n\/usr\/share\/java\/mysql-connector-java-5.1.38.jar<br \/>\n\/usr\/share\/doc<br \/>\n\/usr\/share\/doc\/libmysql-java<br \/>\n\/usr\/share\/doc\/libmysql-java\/copyright<br \/>\n\/usr\/share\/doc\/libmysql-java\/README.gz<br \/>\n\/usr\/share\/doc\/libmysql-java\/changelog.Debian.gz<br \/>\n\/usr\/share\/maven-repo<br \/>\n\/usr\/share\/maven-repo\/mysql<br \/>\n\/usr\/share\/maven-repo\/mysql\/mysql-connector-java<br \/>\n\/usr\/share\/maven-repo\/mysql\/mysql-connector-java\/5.1.38<br \/>\n\/usr\/share\/maven-repo\/mysql\/mysql-connector-java\/5.1.38\/mysql-connector-java-5.1.38.pom<br \/>\n\/usr\/share\/maven-repo\/mysql\/mysql-connector-java\/debian<br \/>\n\/usr\/share\/maven-repo\/mysql\/mysql-connector-java\/debian\/mysql-connector-java-debian.pom<br \/>\n<strong>\/usr\/share\/java\/mysql.jar<\/strong><br \/>\n<strong>\/usr\/share\/java\/mysql-connector-java.jar<\/strong><br \/>\n\/usr\/share\/maven-repo\/mysql\/mysql-connector-java\/5.1.38\/mysql-connector-java-5.1.38.jar<br \/>\n\/usr\/share\/maven-repo\/mysql\/mysql-connector-java\/debian\/mysql-connector-java-debian.jar<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>From the above, the two jars mysql.jar and mysql-connector-java.jar are the ones which is needed.<\/p>\n<p>create a soft link to the library path of your solr installation. (in this case, \/opt\/solr-6.6.0 )<\/p>\n<p><code><br \/>\ncd \/opt\/solr-6.6.0\/server\/lib<\/code><\/p>\n<p>ln -s \/usr\/share\/java\/mysql-connector-java-5.1.38.jar\u00a0 \/opt\/solr-6.6.0\/server\/lib<\/p>\n<p>ln -s \/usr\/share\/java\/mysql.jar \/opt\/solr-6.6.0\/server\/lib<\/p>\n<p>&nbsp;<\/p>\n<p>Add the relevant path to your solrconfig.xml<\/p>\n<p>&nbsp;<\/p>\n<p><code>&lt;lib dir=\"${solr.install.dir:..\/..\/..\/..}\/server\/lib\" regex=\".*\\.jar\" \/&gt;<\/code><\/p>\n<p>restart Solr &amp; you are all set.<\/p>\n<p>&nbsp;<\/p>\n<p>In some cases, you will get an error<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>Caused by: java.sql.SQLException: Illegal value for setFetchSize().<\/p><\/blockquote>\n<p>This can be addressed by adding batchSize=&#8221;-1&#8243; to the data source declaration.<\/p>\n<p>&nbsp;<\/p>\n<p>ie,<\/p>\n<p>&nbsp;<br \/>\n<code><br \/>\n<dataConfig><br \/>\n <dataSource type=\"JdbcDataSource\" driver=\"com.mysql.jdbc.Driver\"\n                     url=\"jdbc:mysql:\/\/{DB_HOST}\/{DB_NAME}\" \n                        user=\"{DB_USER}\" password=\"{DB_PASS}\" batchSize=\"-1\"\/><br \/>\n <document><br \/>\n     <entity name=\"id\" \n          query=\"select col1,col2,col3 from mytable\"><br \/>\n        <field column=\"col1\" name=\"solr_field1\"\/><br \/>\n        <field column=\"col2\" name=\"solr_field2\"\/><br \/>\n        <field column=\"col3\" name=\"solr_field3\"\/><br \/>\n     <\/entity><br \/>\n <\/document><br \/>\n<\/dataConfig><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. &nbsp; \u00a0Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver &nbsp; We can get things working by following these steps. &nbsp; Install the missing libraries &nbsp; apt-get install libmysql-java &nbsp; Find [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[67,693,131],"tags":[694,120],"class_list":["post-2418","post","type-post","status-publish","format-standard","hentry","category-mysql","category-tips","category-tools","tag-apache-solr","tag-mysql-2"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"bobinson\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Migrate to Cloud - we make the clouds rain\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Solr Error message \u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud\" \/>\n\t\t<meta property=\"og:description\" content=\"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-08-31T12:59:26+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2017-08-31T13:31:21+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Solr Error message \u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#blogposting\",\"name\":\"Solr Error message \\u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud\",\"headline\":\"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver\",\"author\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/bobinson\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-08-31T07:59:26-05:00\",\"dateModified\":\"2017-08-31T08:31:21-05:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#webpage\"},\"articleSection\":\"MySQL, tips, Tools, Apache Solr, Mysql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/mysql\\\/#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/mysql\\\/#listItem\",\"position\":2,\"name\":\"MySQL\",\"item\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/mysql\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#listItem\",\"name\":\"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#listItem\",\"position\":3,\"name\":\"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/category\\\/mysql\\\/#listItem\",\"name\":\"MySQL\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\",\"name\":\"Migrate to Cloud\",\"description\":\"we make the clouds rain\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/bobinson\\\/#author\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/bobinson\\\/\",\"name\":\"bobinson\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/75ccdce824303bc4f61f39dec0a643a767f9bda27d54a85334ab60120544971f?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"bobinson\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#webpage\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/\",\"name\":\"Solr Error message \\u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud\",\"description\":\"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/bobinson\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/author\\\/bobinson\\\/#author\"},\"datePublished\":\"2011-08-31T07:59:26-05:00\",\"dateModified\":\"2017-08-31T08:31:21-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/\",\"name\":\"Migrate to Cloud\",\"description\":\"we make the clouds rain\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.migrate2cloud.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Solr Error message \u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud","description":"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find","canonical_url":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#blogposting","name":"Solr Error message \u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud","headline":"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver","author":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/bobinson\/#author"},"publisher":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization"},"datePublished":"2011-08-31T07:59:26-05:00","dateModified":"2017-08-31T08:31:21-05:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#webpage"},"isPartOf":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#webpage"},"articleSection":"MySQL, tips, Tools, Apache Solr, Mysql"},{"@type":"BreadcrumbList","@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.migrate2cloud.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/mysql\/#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/mysql\/#listItem","position":2,"name":"MySQL","item":"https:\/\/www.migrate2cloud.com\/blog\/category\/mysql\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#listItem","name":"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#listItem","position":3,"name":"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver","previousItem":{"@type":"ListItem","@id":"https:\/\/www.migrate2cloud.com\/blog\/category\/mysql\/#listItem","name":"MySQL"}}]},{"@type":"Organization","@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization","name":"Migrate to Cloud","description":"we make the clouds rain","url":"https:\/\/www.migrate2cloud.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/bobinson\/#author","url":"https:\/\/www.migrate2cloud.com\/blog\/author\/bobinson\/","name":"bobinson","image":{"@type":"ImageObject","@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/75ccdce824303bc4f61f39dec0a643a767f9bda27d54a85334ab60120544971f?s=96&d=mm&r=g","width":96,"height":96,"caption":"bobinson"}},{"@type":"WebPage","@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#webpage","url":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/","name":"Solr Error message \u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud","description":"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/#breadcrumblist"},"author":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/bobinson\/#author"},"creator":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/author\/bobinson\/#author"},"datePublished":"2011-08-31T07:59:26-05:00","dateModified":"2017-08-31T08:31:21-05:00"},{"@type":"WebSite","@id":"https:\/\/www.migrate2cloud.com\/blog\/#website","url":"https:\/\/www.migrate2cloud.com\/blog\/","name":"Migrate to Cloud","description":"we make the clouds rain","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.migrate2cloud.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Migrate to Cloud - we make the clouds rain","og:type":"article","og:title":"Solr Error message \u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud","og:description":"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find","og:url":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/","article:published_time":"2011-08-31T12:59:26+00:00","article:modified_time":"2017-08-31T13:31:21+00:00","twitter:card":"summary_large_image","twitter:title":"Solr Error message \u2013 Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver - Migrate to Cloud","twitter:description":"Sometimes when we follow the default steps to install Solr the MySQL JDBC libraries are missed out and we end up getting the following error in the log files. Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver We can get things working by following these steps. Install the missing libraries apt-get install libmysql-java Find"},"aioseo_meta_data":{"post_id":"2418","title":null,"description":null,"keywords":[{"label":"MySQL","value":"MySQL"},{"label":"Solr","value":"Solr"},{"label":"Lucene","value":"Lucene"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2022-12-27 09:17:48","updated":"2026-07-21 15:30:24","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.migrate2cloud.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.migrate2cloud.com\/blog\/category\/mysql\/\" title=\"MySQL\">MySQL<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSolr Error message \u2013  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.migrate2cloud.com\/blog"},{"label":"MySQL","link":"https:\/\/www.migrate2cloud.com\/blog\/category\/mysql\/"},{"label":"Solr Error message &#8211;  Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver","link":"https:\/\/www.migrate2cloud.com\/blog\/solr-error-message-caused-by-java-lang-classnotfoundexception-com-mysql-jdbc-driver\/"}],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/2418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/comments?post=2418"}],"version-history":[{"count":6,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/2418\/revisions"}],"predecessor-version":[{"id":2424,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/posts\/2418\/revisions\/2424"}],"wp:attachment":[{"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/media?parent=2418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/categories?post=2418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.migrate2cloud.com\/blog\/wp-json\/wp\/v2\/tags?post=2418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}