GMOD / Apollo

Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.
http://genomearchitect.readthedocs.io/
Other
124 stars 85 forks source link

Tomcat8: Error when loading page #447

Closed cmdcolin closed 9 years ago

cmdcolin commented 9 years ago

I get this error on page load with tomcat8

2015-06-18 17:14:05,817 [http-nio-8082-exec-2] ERROR errors.GrailsExceptionResolver  - GroovyRuntimeException occurred when processing request: [GET] /apollo_release/jbrowse/index.html
Ambiguous method overloading for method java.io.File#<init>.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
    [class java.lang.String]
    [class java.net.URI]. Stacktrace follows:groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.
at org.bbop.apollo.JbrowseController.indexRouter(JbrowseController.groovy:43)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)

I think getRealPath is deprecated in it's usage in Jbrowsedataservlet, e.g.

File file = new File(servletContext.getRealPath("jbrowse/index.html"))
nathandunn commented 9 years ago

I just checked this with tomcat 8 and I didn't get this. Does the same web-app installation work on Tomcat 7?

I'm just wondering if JBrowse wasn't install properly or was removed.

cmdcolin commented 9 years ago

I cleared web browser cache, recompiled the war file, and then deployed the same war to both tomcat7 and tomcat8, and it only errors out on tomcat8. it doesn't appear to be due to missing jbrowse either (it is in the webapps directory as usual)

tomcat 8 specs (doesn't work)

Server Information Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture Hostname IP Address Apache Tomcat/8.0.20 1.7.0_51-b13 Oracle Corporation Mac OS X 10.9.5 x86_64 Colins-MacBook-Pro.local 192.168.2.6

tomcat 7 specs (does work)

Server Information Tomcat Version JVM Version JVM Vendor OS Name OS Version OS Architecture Hostname IP Address Apache Tomcat/7.0.61 1.7.0_51-b13 Oracle Corporation Mac OS X 10.9.5 x86_64 Colins-MacBook-Pro.local 192.168.2.6

nathandunn commented 9 years ago

What happens if you do realpath in other directories or for ".", for example. I'm wondering if its returning null (and is thus ambiguous), because the servlet context path is some-how mangled.

cmdcolin commented 9 years ago

I pushed a fix. The part that i said about this being deprecated might be false (i.e. it is ok when it is part of the servletcontext)