I posted the same question in Atlassian forum. Then I solved it by myself but I want to know now if am I doing something wrong with dependencies.
I created a standalone application using docx4j and all was working.
Then I needed to insert in into Jira and I created my plugin.
After some environment problems (I had to exclude xml-apis) to let the plugin start, I had problems in context declaration: It was always null and I got
- Code: Select all
org.docx4j.openpackaging.exceptions.InvalidFormatException: Bad [Content_Types].xml
Then I put in my pom.xml
- Code: Select all
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1.3</version>
</dependency>
and all was ok. Now I'm using Java 7 and in docx4j pom.xml these two dependencies are commented and there is a note to uncomment them if using Java 5
Where is the problem? Am I doing something wrong? And why the standalone application worked without these dependencies?
Thank you in advance