{"id":271,"date":"2011-02-03T12:46:43","date_gmt":"2011-02-03T17:46:43","guid":{"rendered":"http:\/\/www.cfchimp.com\/wordpress\/?p=271"},"modified":"2024-12-05T19:53:04","modified_gmt":"2024-12-06T00:53:04","slug":"coldfusion-solr-error-orgapachepdfboxpdmodelpddocument-null","status":"publish","type":"post","link":"https:\/\/csimmons.dev\/blog\/2011\/02\/coldfusion-solr-error-orgapachepdfboxpdmodelpddocument-null\/","title":{"rendered":"ColdFusion SOLR error: org\/apache\/pdfbox\/pdmodel\/PDDocument null"},"content":{"rendered":"<p>I got the following pretty obscure error the other day from a cfscheduler job that runs nightly to index documents uploaded to our site:<\/p>\n<p><code>org\/apache\/pdfbox\/pdmodel\/PDDocument null<\/code><\/p>\n<p>Turns out that the error is caused by a file having the extension of .PDF instead of .pdf.\u00a0 No, really.  Luckily I only had one offending file, but what if I had many?  Also, what if users uploaded more after I renamed the problematic one?  There are two parts to &#8220;future proofing&#8221; my situation.  The first part it to address the .PDF extensions in the uploads.  The second part, and what I&#8217;m going to pass on to you, is a custom tag that will look in a directory you specify and rename all .PDF extensions to .pdf.<\/p>\n<p>To implement:<\/p>\n<ul>\n<li><a href=\"https:\/\/csimmons.dev\/blog\/wp-content\/uploads\/2011\/02\/pdf_cleanup.cfm_.zip\">Download the pdf_cleanup custom tag<\/a><\/li>\n<li>Unzip it to whatever directory you keep you custom tags in<\/li>\n<li>Call it using the following syntax just before you run your &lt;cfindex&gt; operation(s):<br \/>\n<code>&lt;cf_pdf_cleanup dirToClean=\"C:\\mysuperdocs\"&gt;<\/code><\/li>\n<\/ul>\n<p>Be forewarned I take no responsibility for your use of the tag \ud83d\ude09<\/p>\n<p><a href=\"https:\/\/csimmons.dev\/blog\/wp-content\/uploads\/2011\/02\/pdf_cleanup.cfm_.zip\">Download the pdf_cleanup custom tag<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got the following pretty obscure error the other day from a cfscheduler job that runs nightly to index documents uploaded to our site: org\/apache\/pdfbox\/pdmodel\/PDDocument null Turns out that the error is caused by a file having the extension of .PDF instead of .pdf.\u00a0 No, really. Luckily I only had one offending file, but what &#8230; <a title=\"ColdFusion SOLR error: org\/apache\/pdfbox\/pdmodel\/PDDocument null\" class=\"read-more\" href=\"https:\/\/csimmons.dev\/blog\/2011\/02\/coldfusion-solr-error-orgapachepdfboxpdmodelpddocument-null\/\" aria-label=\"Read more about ColdFusion SOLR error: org\/apache\/pdfbox\/pdmodel\/PDDocument null\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_cloudinary_featured_overwrite":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[68],"tags":[48],"class_list":["post-271","post","type-post","status-publish","format-standard","hentry","category-developer","tag-coldfusion"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pbVg43-4n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/comments?post=271"}],"version-history":[{"count":0,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/271\/revisions"}],"wp:attachment":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/media?parent=271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/categories?post=271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/tags?post=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}