Free Support Forum - groupdocs.com

Error when trying to view a file located a specified URL


#1

I am trying out the GroupDocs.Viewer for Java 2.2.0 and I have downloaded the sample project. I am working through the ‘spring’ sample project. I ran the project in a Tomcat 7 instance and navigated to http://127.0.0.1:8080/document-viewer and was able to see the viewer widget. I tried passing the URL of a pptx file to the ‘HomeController’ class so that the document located at the URL would show up in the viewer however instead I get an error that says “Format [DIRECTORY_TYPE] is not supported yet!” and the document was not loaded in the viewer.


What does this error mean? Is there a way I can give the URL of a file and have that file show up in the viewer?

Thanks,
Peter

PS: I tried viewing the public document located at https://www.krannert.purdue.edu/centers/dcmme_gscmi/05_Events/01_2014CaseComp/presentations/GR/GR_Team3Fish-1.pptx

#2
Hello, Peter!

Thank you for the interest in GroupDocs.Viewer for Java. The error "Format [DIRECTORY_TYPE] is not supported yet!" in most cases mean that you incorrectly specified path to the file (file name) or the base path to the files folder (in the configuration). But in your case situation is a bit different.
Unfortunately, we reproduced this bug. The problem is that current version does not support https links, it will be fixed in the new version.
By the way, link http://www.krannert.purdue.edu/centers/dcmme_gscmi/05_Events/01_2014CaseComp/presentations/GR/GR_Team3Fish-1.pptx works as intended. If it is not critical for you, you can use simple (http) links before new version release.

#3

Ok thanks for looking into it, Ihor.


-Peter

#4

Ok, I’m having another issue. I’m getting this error when trying to view the document at http://www.krannert.purdue.edu/centers/dcmme_gscmi/05_Events/01_2014CaseComp/presentations/GR/GR_Team3Fish-1.pptx in the viewer:


Jun 27, 2014 11:01:49 AM com.groupdocs.viewer.d.a b
Call generateHtml() or getHtmlContent(int page) method first.
SEVERE: null
java.io.FileNotFoundException: /Users/pznameroski/groupdocs/temp/R1JfVGVhbTNGaXNoLTEucHB0eA==/0/GR_Team3Fish-1_files/style.css (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:97)
at com.groupdocs.viewer.d.a.a(ViewingService.java:169)
at com.groupdocs.viewer.d.a.b(ViewingService.java:76)
at com.groupdocs.viewer.handlers.ViewerHandler.viewDocument(ViewerHandler.java:398)
at com.groupdocs.viewer.handlers.ViewerHandler.viewDocumentHandler(ViewerHandler.java:341)
at com.groupdocs.HomeController.viewDocumentHandler(HomeController.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.groupdocs.filter.CorsFilter.doFilterInternal(CorsFilter.java:23)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)


I can see the document but some images are missing and black boxes replace them. I see in my ‘temp’ folder that there is no “0/” directory. Any idea what might be going on?

Thanks,
Peter




#5
Hello, Peter!

Don't worry about 0 page error, it does not affect the functionality, we work to remove it entirely.
What about black boxes. Thank you, we reproduced this bug and work on it. We will inform you asap when there will be some progress.
Meanwhile, as a temporary solution you can use image-based rendering mode (set groupdocs.viewer.useHtmlBasedEngine parameter to false).

UPDATE:
I've got new information from our developers. This issue does not have to influence all type of documents, you can try to open other types - they, probably, will be rendered correctly.