You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Dave Thorn <da...@fysh.org> on 2015/11/06 10:01:17 UTC
Fop2, Java8, Tomcat7 and Bouncy Castle
Hi,
The page at
https://xmlgraphics.apache.org/fop/2.0/pdfencryption.html
says "The PDF encryption implemented in FOP does not need
external libraries to perform encryption. A recent JDK (1.5+) is
sufficient. "
Yet I deployed my fop-using webapp to centos7, tomcat7,
java8(Oracle jdk) and it complained:
java.lang.NoClassDefFoundError:
org/bouncycastle/jce/provider/BouncyCastleProvider
org.apache.pdfbox.pdmodel.encryption.PDEncryption.<init>(PDEncryption.java:96)
org.apache.pdfbox.pdfparser.PDFParser.prepareDecryption(PDFParser.java:263)
org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:196)
org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:230)
org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:972)
org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:876)
It's fixed easily enough with
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.53</version>
</dependency>
but I thought I'd enquire into the discrepancy.
ta,
--
dave thorn
Bad to the bone.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Fop2, Java8, Tomcat7 and Bouncy Castle
Posted by Dave Thorn <da...@fysh.org>.
On Fri, Nov 06, 2015 at 10:03:37AM +0100, Luis Bernardo wrote:
> You are using PDFBox, maybe because you are using the PDF Plugin, and that
> is why you need BoucyCastle. FOP does not need it.
You read my stacktrace more closely than I did. I am shamefaced.
:)
Thank you.
I was running pdfbox to count the pages of the pdf after
production.
--
dave thorn
Well you know, I have days.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Fop2, Java8, Tomcat7 and Bouncy Castle
Posted by Luis Bernardo <lm...@gmail.com>.
You are using PDFBox, maybe because you are using the PDF Plugin, and that
is why you need BoucyCastle. FOP does not need it.
On Fri, Nov 6, 2015 at 10:01 AM, Dave Thorn <da...@fysh.org> wrote:
> Hi,
>
> The page at
>
> https://xmlgraphics.apache.org/fop/2.0/pdfencryption.html
>
> says "The PDF encryption implemented in FOP does not need
> external libraries to perform encryption. A recent JDK (1.5+) is
> sufficient. "
>
> Yet I deployed my fop-using webapp to centos7, tomcat7,
> java8(Oracle jdk) and it complained:
>
> java.lang.NoClassDefFoundError:
> org/bouncycastle/jce/provider/BouncyCastleProvider
>
> org.apache.pdfbox.pdmodel.encryption.PDEncryption.<init>(PDEncryption.java:96)
> org.apache.pdfbox.pdfparser.PDFParser.prepareDecryption(PDFParser.java:263)
> org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:196)
> org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:230)
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:972)
> org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:876)
>
>
> It's fixed easily enough with
>
> <dependency>
> <groupId>org.bouncycastle</groupId>
> <artifactId>bcprov-jdk15on</artifactId>
> <version>1.53</version>
> </dependency>
>
> but I thought I'd enquire into the discrepancy.
>
> ta,
>
> --
> dave thorn
>
> Bad to the bone.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>