Page 1 of 1

dependencies

PostPosted: Mon Dec 10, 2012 7:53 pm
by tanja
Is there a list of a minimum set of runtime dependencies? I was surprised to have exceptions due to missing xerces/xalan/some signature stuff; I'm still not running. And I thought java 6+ gave us those implementations so we don't need to suffer anymore with separate jars for that...

Don't tell me docx4j needs all the other 25 jars to run?

I hope I can soon try the (seemingly very cool) library...

ps: Also, it would be kind to provide distributions for those that don't use maven/git.

Re: dependencies

PostPosted: Mon Dec 10, 2012 8:10 pm
by jason
What are you trying to do? The dependencies you'll need will obviously depend on that.

http://www.docx4java.org/docx4j/ contains a zip file, and a dir - both have all the dependencies

Re: dependencies

PostPosted: Mon Dec 10, 2012 8:31 pm
by tanja
I try to open a file, update its properties (if necessary), find styles used, find my placeholders, replace them by writing some stuff in it (text, table, figure, captions), update TOCs, save the document and close it. Basically, what one does with a Word document :-)

The documentation (getting started) mentions two jars that must be included if we intend to process images - and I did include them but couldn't even come to processing images. This is already a lot of dependencies for a library.

The first exception I've got was a class not found; I searched the web and found it must be jaxb-xmldsig-core-1.0.0.jar. Shouldn't this be in java 6/7 (I'm using 7u9)?

The second exception I get now is missing xalan and that's where I said I'd better ask. If I'm to spend a week to figure out I'll end up with all the 25 jars required, then I'd better stay with the good old slow COM API and jacob bridge...

Thanks for your support.

ps: From the tiny bit of output I get before the exception, it seems to me that the logging at INFO level is very chatty in docx4j; giving me what I'd rather read at DEBUG/TRACE level; I'd prefer the hide those from my user.

Re: dependencies

PostPosted: Mon Dec 10, 2012 8:59 pm
by tanja
Forgot to thank you for the directory pointer, where to download it all.
Still it's just too many dependencies for a library.

Re: dependencies

PostPosted: Mon Dec 10, 2012 9:09 pm
by jason
jason wrote:ps: From the tiny bit of output I get before the exception, it seems to me that the logging at INFO level is very chatty in docx4j; giving me what I'd rather read at DEBUG/TRACE level; I'd prefer the hide those from my user.


Sounds like you want ERROR level then.

Re: dependencies

PostPosted: Mon Dec 10, 2012 9:27 pm
by jason
tanja wrote:The second exception I get now is missing xalan


Xalan is required for mc:AlternateContent pre-processing of Word 2010 documents.

It would be possible to use the XSLT in Java 6 for this instead, but that XSLT is not sufficient for PDF output (hence Xalan proper).