You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 12 Members of 9401 |
| Forum: Seam Users |
07. Jul 2009, 14:03 America/New_York | Link |
Hello, I'm using SSL to protect my application and it works well. But if I try to download PDF files, created by Seam PDF (worked fine before), with scheme="https" I'll get an error saying:
ExceptionConverter: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
If I change to scheme="http" it works fine, but how to enable SSL support for generated PDF files?
Where/when do you get this exception? A full stack trace is more useful. Also, is it specific to PDFs? If so, something is odd - the SSL handshake happens way before any consideration about the resource type is relevant.
Thanks for the fast response, here are the relevant informations. The error occurs only downloading the Seam generated PDFs. Other SSL secured pages are working well.
Page Configuration:
<page view-id="/pdf/paddialog/pdf-journal-overview.xhtml" scheme="https"> <action execute="#{HelperCalendarService.queryJournalPeriodBegin}" /> <action execute="#{HelperCalendarService.queryJournalPeriodEnd}" /> <action execute="#{PaddialogJournalService.queryJournalList}" /> </page>The configured action are executed successfully, as visible in the log file.
Exception:
Hmm.. something is going on with the SSL configuration. Normally that exception is thrown when a certificate cannot be validated (see here for some details.
Are you hitting the same server when you access /pdf/... (i.e. is there a load balancer or something else in between that redirects the request to another server that has not been configured correctly for SSL)?
Use a command line utility like curl (make sure to use the version compiled with SSL support) to see the details of what's going on during the request. Or a sniffer like WireShark, you can debug the SSL handshake there.
Or, more quickly, add -Djavax.net.debug=all and see from there.
I had no problem setting scheme= on PDF links in the seam-itext example app.
Maybe you haven't set up SSL correctly.
I found this useful link: SSL in JBoss
My blog
I think I found the problem.
SSL was set up correctly and works fine for my application. I used images in my PDF's and seam somehow loads additional content over http.
Maybe i find a proper solution to fix that issue or use iText directly, because I am absolutly unsatisfied with the build in PDF mechanism.
Thanks for your help.
Consider using JodConverter to create your pdf documents and serve them as byte array from the database. This works fine for us.
My blog
Ok I will take a look at it, but it seems like a convert only tool and I need dynamic generated content. iText would be fine too, but thanks for the hint.
I can take html too.
My blog