Problem with documentation of GroupDocs.Viewer

On GroupDocs.Viewer for Java page to integrate GroupDocs.Viewer with Spring I had a problem:

  1. I created HomeControllerBase class based with code on that page
  2. When I created HomeController class extending the first class, the many overrided methods weren’t recognized (they’re not on the superclass) and the method writeOutput(Object, HttpServlerResponse) used on HomeController couldn’t be find.

Should I really create HomeControllerBase extending com.groupdocs.viewer.resources.GroupDocsViewer?

I tried to use the source-code available on GitHub at https://github.com/groupdocs/groupdocs-viewer-java-spring-sample but I had other problems with this code:

  1. On HomeControllerBase, line 180, is said that ICustomConnector.setEnvironmentCreator is not applicable for argument AnnotationHandler
  2. On HomeControllerBase, line 183, is said that AnnotationHandler has no method setCollaboratorCallback

Thank you.

Hello Rafael,

Sorry to see you get this problem. Unfortunately we were unable to reproduce this error on our side. Can you give us more detail? – What library version do you use? What is your environment (OS, Maven, Java, application server, etc.)? What file you are trying to open?

By the way, there are no lines with number higher than 66 here https://github.com/groupdocs/groupdocs-viewer-java-spring-sample/blob/master/src/main/java/com/groupdocs/HomeControllerBase.java. Please, check error details.

P.S. On our side project https://github.com/groupdocs/groupdocs-viewer-java-spring-sample is building and running ok with the 2.9.1 GroupDocs.Viewer for Java library. The only thing that should be specified correctly is the groupdocs.viewer.filePath option in the application.properties file.

Hi, Ihor.

I confused the links and source-code. My intention is to install the GroupDocs.Annotations for Java. The link for the documentation I were reading to create the HomeController was http://groupdocs.com/docs/display/annotationjava/GroupDocs.Annotation+for+Java+-+Integrating+with+Spring.

On this code occurs the problem I first mentioned:
I created HomeControllerBase class based with code on that page
When I created HomeController class extending the first class, the many overrided methods weren't recognized (they're not on the superclass) and the method writeOutput(Object, HttpServlerResponse) used on HomeController couldn't be find.

I tried to use the code provided on https://github.com/groupdocs/groupdocs-annotation-java-spring-sample, too. The problemas are the following:
On HomeControllerBase, line 180, is said that ICustomConnector.setEnvironmentCreator is not applicable for argument AnnotationHandler
On HomeControllerBase, line 183, is said that AnnotationHandler has no method setCollaboratorCallback

I'm using version 1.9.0 of groupdocs-annotation like on pom.xml at GitHub sample project.
Here's my environment:
- MS Windows 8.1 (6.3.9600)
- Apache Maven 3.2.3
- Java version: 1.7.0_45 (JDK), vendor: Oracle Corporation
- Application Server: JBoss AS Community 7.1.0

Thank you.
Hello Rafael,

Strange, but I was not able to reproduce this bug even with the GroupDocs.Annotation for Java library Spring sample. Try to load a clean sample from the GitHub (https://github.com/groupdocs/groupdocs-annotation-java-spring-sample), download the library from the archive (http://groupdocs.com/Community/files/9/java-libraries/groupdocs_annotation_for_java/entry5576.aspx) and install it into the local maven repo (http://groupdocs.com/docs/display/annotationjava/GroupDocs.Annotation+for+Java+-+Installation).

Before running the sample, make sure you correctly configuredgroupdocs.annotation.basePath and groupdocs.annotation.cachePath(you can set this one to “null” and it by default will store cache in the temp subdirectory of the groupdocs.annotation.basePath). These options you can find in the src/main/resources/application.properties.

If this will not help, can you package your project and attach to this forum thread so we can investigate it.

Ihor, I downloaded the code from zip file, deleted GroupDocs.Annotations from my local Maven repository and reinstalled it again. The same problem ocurred.


I’m attaching prints from my workspace showing the errors and the project.
Hello Rafael,

Just downloaded your project, changed base and cache path configuration. Tried to run it – everything seems ok. The project started without problems. Let me clarify few things. Are you building the project into war file and then deploy it in the JBoss server?

Can you try to execute the run.bat file provided with the sample and tell if there are some problems in this case?

Ihor, I was worried about this compilation problems. But until now it doesn’t interfere with my project.
I first tried to execute run.bat. The project starts OK, but when I opened url http://127.0.0.1:8080/document-annotation
I received an com.groupdocs.annotation.exception.AnnotationException. I attached the stacktrace on this message.
After some adjusts I could run the project on Tomcat an on JBoss AS. I’m using Eclipse IDE to deploy on these web containers. I had to configure the property ‘groupdocs.annotation.applicationPath’ to match the app name and web ports on these web containers and the value of ‘groupdocs.annotation.defaultFileName’.
I debugged the app to see if it would work on those problematic lines that I told you (compilation problems), but it passes OK there and the demo app worked fine. I think I’m with problems on Eclipse IDE to see the correct version of classes and libraries referenced on these lines of code.

Hello Rafael,

Nice to see that the problem is fixed and the project runs ok.
The AnnotationException appeared there because, as you mentioned, of the default file name option – it should be one of the existing file names.

In case of other questions feel free to contact us.