Closed chenejac closed 6 years ago
Jon Corson-Rikert said:
This then triggers an InvocationTargetException in the PropertyRetryController:
HTTP Status 500 - doPost() encountered InvocationTargetException while invoking PropertyRetryController
type Exception report
message doPost() encountered InvocationTargetException while invoking PropertyRetryController
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.RuntimeException: doPost() encountered InvocationTargetException while invoking PropertyRetryController edu.cornell.mannlib.vedit.controller.EditFrontController.doPost(EditFrontController.java:73) javax.servlet.http.HttpServlet.service(HttpServlet.java:647) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet.service(VitroHttpServlet.java:70) edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doNonDisplayPage(PageRoutingFilter.java:110) edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doFilter(PageRoutingFilter.java:101) edu.cornell.mannlib.vitro.webapp.filters.RequestModelsPrep.doFilter(RequestModelsPrep.java:115) edu.cornell.mannlib.vitro.webapp.filters.URLRewriterFilter.doFilter(URLRewriterFilter.java:38) edu.cornell.mannlib.vitro.webapp.filters.JSessionStripFilter.doFilter(JSessionStripFilter.java:60) edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.produceBasicResponse(CachingResponseFilter.java:322) edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.doFilter(CachingResponseFilter.java:115) edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionFilter.doFilter(LocaleSelectionFilter.java:62) edu.cornell.mannlib.vitro.webapp.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:25) edu.cornell.mannlib.vitro.webapp.filters.SessionTimeoutLimitingFilter.doFilter(SessionTimeoutLimitingFilter.java:39) edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.doFilter(StartupStatusDisplayFilter.java:64)
root cause
java.lang.reflect.InvocationTargetException sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) edu.cornell.mannlib.vedit.controller.EditFrontController.doPost(EditFrontController.java:63) javax.servlet.http.HttpServlet.service(HttpServlet.java:647) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) edu.cornell.mannlib.vitro.webapp.controller.VitroHttpServlet.service(VitroHttpServlet.java:70) edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doNonDisplayPage(PageRoutingFilter.java:110) edu.cornell.mannlib.vitro.webapp.filters.PageRoutingFilter.doFilter(PageRoutingFilter.java:101) edu.cornell.mannlib.vitro.webapp.filters.RequestModelsPrep.doFilter(RequestModelsPrep.java:115) edu.cornell.mannlib.vitro.webapp.filters.URLRewriterFilter.doFilter(URLRewriterFilter.java:38) edu.cornell.mannlib.vitro.webapp.filters.JSessionStripFilter.doFilter(JSessionStripFilter.java:60) edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.produceBasicResponse(CachingResponseFilter.java:322) edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter.doFilter(CachingResponseFilter.java:115) edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionFilter.doFilter(LocaleSelectionFilter.java:62) edu.cornell.mannlib.vitro.webapp.filters.CharsetEncodingFilter.doFilter(CharsetEncodingFilter.java:25) edu.cornell.mannlib.vitro.webapp.filters.SessionTimeoutLimitingFilter.doFilter(SessionTimeoutLimitingFilter.java:39) edu.cornell.mannlib.vitro.webapp.filters.StartupStatusDisplayFilter.doFilter(StartupStatusDisplayFilter.java:64)
root cause
java.lang.RuntimeException: com.hp.hpl.jena.query.QueryParseException: Encountered " "<" "< "" at line 2, column 1. Was expecting one of: (as above)
Jon Corson-Rikert said:
Jim -- I've reproduced it in a new Vitro by adding a space after the ontology URI when adding a new ontology. "http://www.w3.org/2004/02/skos/core#" works, but not "http://www.w3.org/2004/02/skos/core " -- so trimming the string and/or trapping for what the last character is and adding a / or if it's not either * or /, as well ensuring that it's a valid URI without spaces, would likely solve this.
This is undoubtedly not new to 1.6.1 but prevents listing ontologies or doing any property editing, so is a serious bug.
Jim Blake said:
Modified OntologyDaoJena so it will trim leading and trailing blanks from the Ontology URI, at the same time that it removes a final #.
Also, check for URISyntaxException before creating the ontology, so an invalid character will be caught with a reasonable error message.
Jon Corson-Rikert (Migrated from VIVO-705) said:
After trying to enter the SKOS ontology as a new ontology in a Vitro instance, using the URL http://www.w3.org/2004/02/skos/core#, I see the following error -- due to the #, or an extra space after the #? --
HTTP Status 500 - Encountered " "<" "< "" at line 2, column 1.
type Exception report
message Encountered " "<" "< "" at line 2, column 1.
description The server encountered an internal error that prevented it from fulfilling this request.
exception
com.hp.hpl.jena.query.QueryParseException: Encountered " "<" "< "" at line 2, column 1. Was expecting one of: