Free Support Forum -

Problem integrating with JavaServer Faces + Maven

I'm with difficulties integrating GroupDocs.Annotation with JavaServer Faces. I'm doing it with help of the source-code of GroupDocs.Annotation for Java Web sample project. I decided to use it, besides my project have Spring framework and Maven, because I don't use Spring MVC and don't want to add another framework in my project.

So, I'm using Maven project with some Servlets to integrate GroupDocs.Annotations with my project.

First, I make my GroupDocs.Annotation for Java Web sample project work alone with Tomcat. Then, I migrate most of the code to my personal project were I'm using JSF an XHTML on the frontend. I am getting AnnotationException when I open my XHTML wich contains the reference to show the Javascript code for header and body (initialization) to render the build-in viewer of GroupDocs.

What I've changed from the original Java Web sample project:
  • The main package of the servlets and another files; so, on web.xml the servlet, servlet-mappings and AmosphereServlet configuration (Jersey base package) were changed
  • Renamed to
  • I'm using a XHTML to render the viewer, not a JSP
  • All library dependencies comes from Maven integration (pom.xml)
  • The base AnnotationServlet (base of all servlets) were modified to be a service (but it is initialized with class instantiation, not a Spring servce)
  • I'm not using IndexServlet to go to initial page. Instead, I'm changing the URL to http://localhost:8080/docflow/xhtml/docflow/visualizador/exemploGroupDocs.jsf, wich points to my exemploGroupDocs.xhtml file
  • From my XHTML file, I call a JSF managed bean which instantiates AnnotationServlet and returns the Annotation Script and Header script.
  • I'm getting com.groupdocs.annotation.exception.AnnotationException (with null cause) when trying to render a PDF for the first time.

My environment is:
  • GroupDocs.Annotation 1.9.0
  • Java JDK 1.7.0_45
  • MS Windows 8.1
  • JBoss AS 7.1.0
I'm attaching some files to give some information about how I coded it.

Hello Rafael,

We are really sorry that you have such issue. We have started investigation of your issue, but seems this will take more time than we expected. When we will have some result we notify you.

Best regards
Evgen Efimov
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


Hello Rafael,

Sorry for the delay. We have investigated your issue and seems that the issue associated with the application path, which you configured in the file. You should understand that if you configured the application path, then the GroupDocs.Viewer front-end will send the requests to this URL (application path) and if on this URl will not be runned the application you will get an error.
Could you please share with us your build.xml and web.xml files, that we can investigate the issue more carefully.

Best regards
Evgen Efimov
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+