Skip to main content
Participating Frequently
April 14, 2025
Answered

CF2021 Patch to 19 - htmltopdf now failing constantly

  • April 14, 2025
  • 7 replies
  • 3190 views

Just patched to CF2021 patch 19 and now htmltopdf does not work.

 

In the logs I am seeing 

Caused by: java.lang.ClassNotFoundException: coldfusion.document.DocumentScope not found by htmltopdf [37]
 
I've tried downgrading back to patch 18.
Uninstalling and reinstalling htmltopdf package.
Uninstalling and reinstalling all the packages.
Upgrading back to patch 19.
and numerous reboots.
 
The patch notes include
  • Sometimes, you are unable to create a PDF due to PDFg service authentication failure. As a workaround, update the service manager and retry creating the PDF.

What does this mean? What service manager and how do I update it?

Correct answer Byron Byron_756

@Byron Byron_756 We have a workaround; you don't need to reinstall the Add-on component. Please contact us at cfsup@adobe.com.


The new errata posted on "ColdFusion (2023 release) Update 13 release notes" 

("ColdFusion is unable to register PDFg service manager") does not work for my installation.  (thank you @Vikram_Kumar_M for the customer support on it though!)

 

What worked for me

 

Uninstall htmltopdf

 

Stop cf and addon services

 

Uninstall addon service (mine was installed in jetty, so I used the uninstaller there)

 

Clear felix-cache

 

Run the proper addon service installer for my CF version that I downloaded fromhttps://helpx.adobe.com/coldfusion/kb/coldfusion-downloads.html#download0
It was in the developer tools section. (thank you @BKBK !)

 

Told addon installer to install to the jetty location, and use to same java location as what my CF uses

 

Start CF and Addon services

 

Reinstall htmltopdf

 

Update and Enable the pdf service manager (the enable step is easy to overlook, button is very tiny, and htmltopdf will fail if not enabled!)

 

7 replies

Charlie Arehart
Community Expert
Community Expert
April 30, 2025

Hey, everyone. Good news on this front: note that today Adobe has added both an acknowledgement of this problem and a simpler workaround, listed as the new last item in the "known issues" section of the update technotes for CF2023 update 13 and CF2021 update 19. They also offer a zip file from which to extract the needed files (versus the helpful workaround offered to find and extract some or all of the files from the full add-on installer). Note that there's a different zip for each CF version--also, there's none for CF2025 update 1 as it already incorporated this and some other changes  which were introduced in the April updates.

 

Time will tell if the solution suits everyone with regard to this problem discussed here. If anyone tries it and can report, I'm sure many would apprecaite it. (I'm traveling today, driving several hours to the IntotheBox conference in DC, so I'm afraid I cannot. But I wanted to share the word ASAP.)

 

And since the current "answer" focuses on that other workaround, I will go ahead and mark this one as another "answer" (I don't like to do that for my own post, but folks seeing the problem may not read all the way to the bottom to see this as a possible solution.)

/Charlie (troubleshooter, carehart. org)
BKBK
Community Expert
Community Expert
April 21, 2025

Hi @stephen_5711 ,

Do you still need help with this?

Or did you finally resolve the issue?

 

Participating Frequently
April 21, 2025

I've been working with the Adobe install team to diagnose and fix it (slowed down a bit by the fact the problem was on our Production machine so I had to wait for off-hours to test fixes).

 

In the end the step that seems to have worked is to uninstall the Add-On services program, then reinstall from a fresh download of the Add-On services from the Adobe website.

 

After the reinstall everything seems to be working. I applied the patch Friday night so fingers crossed it holds up to actual users starting today.

BKBK
Community Expert
Community Expert
April 21, 2025

Hi @stephen_5711 , Thank you for the update.

 

I find it instructive that you, @Aaron Trice and @Patrick33329465ay6d identify the Add-On Services as the culprit.

Participating Frequently
April 18, 2025

See my reply at the bottom --> uninstall and reinstall add on services.

Participating Frequently
April 17, 2025

I'm seeing the same behavior. PDF Generation fails after the update is applied. In looking at the Jetty logs I did notice an error "10:14:32.013 [main] ERROR org.apache.solr.core.SolrCore - null:org.apache.solr.common.SolrException: solr.xml does not exist in C:\ColdFusion2021\cfusion\jetty\multicore cannot start Solr"
This file exisist in C:\ColdFusion2021\cfusion\jetty\solr, not mutlicore. I tried copying the file over and this error went away, but did not resolve our issue. Attempting to modify the service manager removes it completely and requires a removal/reinstall of the package. Similarly to the original post if I just test the PDF service in CFAdmin it returns an OK. 

Participating Frequently
April 18, 2025

Had the same issue after updating to 19. This worked for me on 5 seperate servers.

 

1) uninstall CF add on services -- I ran the unistaller in the add on service dir. I htink you can also use the one in the jetty unistall dir.

 
2) Download the latest add on services here
 
Install on your server.

3) REBOOT your server.
 
4) once the server boots, run your test pdf generator, (mine is below) should work now.
 
 
<cftry>
 
    <cfhtmltopdf marginTop='.25' marginbottom='.10' marginright='.25' marginleft='.25' unit='in'  >
PDF Generation works!
            Congratulations dude or sorry that happened.
</cfhtmltopdf>
 
<cfcatch type="any"><cfdump var="#cfcatch#"></cfcatch></cftry>
 
 
Participating Frequently
April 15, 2025

We have the same exact problem. We managed to get this running with patch 17 and 18, but no longer with patch 19.

Vikram_Kumar_M
Adobe Employee
Adobe Employee
April 15, 2025

@Sireex, please contact our support team at cf.install@adobe.com. We want to investigate further to isolate the issue.  

 

Thanks,

 Vikram

 

 

Charlie Arehart
Community Expert
Community Expert
April 14, 2025

Stephen, I think you'll find this is covered in the update technote, where it says:

 

'If you encounter the error message, "java.lang.NoClassDefFoundError: coldfusion/document/DocumentScope" while publishing a document to PDF using PDF Engine 1, then clear the Felix cache and restart ColdFusion.'

 

That said, you could be forgiven not readily connecting those dots: that's not exactly the same as what you got, "java.lang.NoClassDefFoundError: coldfusion/document/DocumentScope", but they do refer to the same class ultimately. 

 

Further, they don't explain what that entails. It's discussed with a (slightly) longer sentence in the update 17 technote: "As a workaround, clear the Felix cache (<cf_home>/cfusion/bin/felix-cache).".   Even then, one could ask, "what does 'clear' mean?" It means DELETE that folder.

 

More specifically:

  1.  Stop cf
  2. Delete that felix-cache folder (no need to save or rename it)
  3. Start cf

 

That last point (clearing the felix-cache) is something I'd recommend everyone should just do after any cf update that entails any package updates (including not just as listed in the technote of the update being done, but any you are skipping).

 

So even if somehow some other aspect of that original message I quoted doesn't seem to apply to you, do try the last step anyway. 

 

Let us know if that works. 

/Charlie (troubleshooter, carehart. org)
Participating Frequently
April 14, 2025

Well, I removed that felix-cache folder. restarted, and used wsconfig to remove and re-add the connectors.

 

In the exception log I see: "coldfusion.document.webkit.PDFgServiceManagerSetupException: Error while registering/unregistering Service manager."

 

Nothing initially in the the colfusion-out.log. But when I hit my test PDF page it now says "PDFg service manager http://127.0.0.1:8993/PDFgServlet/ registered." which does seem like a mixed message but it is still giving me a server error on the PDF page.

 

Error occurred while generating PDF.
Reason: SERVER ERROR
 
The error occurred in PATH/testpdf.cfm: line 2

 

 

For good measure I went through the above again (delete things and restart service) with the same result.

 

For reference, my test PDF page is bare simple:

 

<cfhtmltopdf>
    This is a test of PDF <cfoutput>#now()#</cfoutput>
</cfhtmltopdf>

 

 

Vikram_Kumar_M
Adobe Employee
Adobe Employee
April 14, 2025

@stephen_5711  Please try this:

 

1. Uninstall the "htmltopdf" package from the CF admin console.

2. Stop the ColdFusion service and clear the Felix-cache folder.

3. Restart the ColdFusion service and install the "htmltopdf" package.

 

Thanks,

Vikram

 

 

Participant
April 14, 2025

There were changes in update 19. Check out the updates page at https://helpx.adobe.com/coldfusion/kb/coldfusion-2021-update-19.html  and there's some info on the PDF Service Manager at https://www.cfguide.io/coldfusion-administrator/data-services-pdf-service/  . Hope they help.

Participating Frequently
April 14, 2025

In the PDF Service panel the service verifies ok, but still seeing errors.

 

Reading the new PDF2 updates it warns that I need to configure jetty-ipaccess.xml, I tried whitelisting 127.0.0.1 with no change.

Error occurred while generating PDF.
Reason: SERVER ERROR

Logs are not being helpful, they are just repeating the above error without giving me any information on what server error it is seeing.