Problems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems

James Blackshaw
Hi,
There's a problem with the Perl API. Although it's possible to use
underscores, for attribute names, the Perl API refuses to accept an
attribute name with an underscore in it. Could the validation be changed
to allow underscores here?

Webservice::InterMine does not allow the querying of a attribute with an underscore. You get the following error:

Attribute (view) does not pass the type constraint because: Validation failed for 'InterMine::Model::Types::PathList' with value ARRAY(0xd004a20) at native delegation method Webservice::InterMine::Query::Core::_add_views (push) of attribute view (defined at /usr/local/share/perl/5.10.1/Webservice/InterMine/Query/Core.pm line 223) line 21
        Webservice::InterMine::Query::Core::_add_views('Protein.UniProt_accession') called at /usr/local/share/perl/5.10.1/Webservice/InterMine/Query/Core.pm line 312
        Webservice::InterMine::Query::Core::add_views('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 56
        Class::MOP::Method::Wrapped::__ANON__('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91
        Webservice::InterMine::Query::Core::add_views('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 56
        Class::MOP::Method::Wrapped::__ANON__('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91
        Webservice::InterMine::Query::Core::add_view('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 56
        Class::MOP::Method::Wrapped::__ANON__('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91
        Webservice::InterMine::Query::add_view('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at perlAPItest.pl line 32


Additionally, in both MitoMiner and the Intermine tutorial, we get the
following error when trying to change the number of results displayed on
each page:

There has been an internal error while processing your request. The problem has been logged and will be investigated. You may also send us an email describing how you encountered this error. The problem may be temporary in which case you might wish to go back and try your request again or you might want to go to the home page.

       java.lang.NumberFormatException: For input string:"NaN"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:481)
        at java.lang.Integer.parseInt(Integer.java:514)
        at org.intermine.web.struts.TableController.execute(TableController.java:131)
        at org.apache.struts.tiles.actions.TilesAction.execute(TilesAction.java:75)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.apache.struts.tiles.UrlController.execute(UrlController.java:91)
        at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:873)
        at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
        at org.apache.jsp.layout_jsp._jspx_meth_tiles_005fget_005f1(layout_jsp.java:860)
        at org.apache.jsp.layout_jsp._jspService(layout_jsp.java:204)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
        at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
        at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237)
        at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
        at org.intermine.web.struts.InterMineRequestProcessor.processForwardConfig(InterMineRequestProcessor.java:210)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:636)

Any idea what this is and how we might fix it?

-James

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Problems

Alex Kalderimis-2

On Tue, Aug 09, 2011 at 11:15:07AM +0100, James Blackshaw wrote:
> Hi,
> There's a problem with the Perl API. Although it's possible to use
> underscores, for attribute names, the Perl API refuses to accept an
> attribute name with an underscore in it. Could the validation be
> changed to allow underscores here?

Yes indeed it can. This has been changed. You can get the update
by running "cpan InterMine::Model" to get version 0.9803. This should
be visible on the cpan mirrors within a couple of hours.

>
> Webservice::InterMine does not allow the querying of a attribute with an underscore. You get the following error:
>
> Attribute (view) does not pass the type constraint because: Validation failed for 'InterMine::Model::Types::PathList' with value ARRAY(0xd004a20) at native delegation method Webservice::InterMine::Query::Core::_add_views (push) of attribute view (defined at /usr/local/share/perl/5.10.1/Webservice/InterMine/Query/Core.pm line 223) line 21
> Webservice::InterMine::Query::Core::_add_views('Protein.UniProt_accession') called at /usr/local/share/perl/5.10.1/Webservice/InterMine/Query/Core.pm line 312
> Webservice::InterMine::Query::Core::add_views('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 56
> Class::MOP::Method::Wrapped::__ANON__('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91
> Webservice::InterMine::Query::Core::add_views('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 56
> Class::MOP::Method::Wrapped::__ANON__('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91
> Webservice::InterMine::Query::Core::add_view('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 56
> Class::MOP::Method::Wrapped::__ANON__('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at /usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm line 91
> Webservice::InterMine::Query::add_view('Webservice::InterMine::Query=HASH(0x4fa0538)', 'Protein.UniProt_accession') called at perlAPItest.pl line 32
>
>
> Additionally, in both MitoMiner and the Intermine tutorial, we get
> the following error when trying to change the number of results
> displayed on each page:
>
> There has been an internal error while processing your request. The problem has been logged and will be investigated. You may also send us an email describing how you encountered this error. The problem may be temporary in which case you might wish to go back and try your request again or you might want to go to the home page.
>
>       java.lang.NumberFormatException: For input string:"NaN"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:481)
> at java.lang.Integer.parseInt(Integer.java:514)
> at org.intermine.web.struts.TableController.execute(TableController.java:131)
> at org.apache.struts.tiles.actions.TilesAction.execute(TilesAction.java:75)
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
> at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
> at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
> at org.apache.struts.tiles.UrlController.execute(UrlController.java:91)
> at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:873)
> at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:460)
> at org.apache.jsp.layout_jsp._jspx_meth_tiles_005fget_005f1(layout_jsp.java:860)
> at org.apache.jsp.layout_jsp._jspService(layout_jsp.java:204)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
> at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
> at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
> at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
> at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
> at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
> at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237)
> at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
> at org.intermine.web.struts.InterMineRequestProcessor.processForwardConfig(InterMineRequestProcessor.java:210)
> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
> at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> at java.lang.Thread.run(Thread.java:636)
>
> Any idea what this is and how we might fix it?

Julie mentioned that this has been fixed in a recent update. Updating
to the latest code on trunk should fix this error.

>
> -James
>

All best,

Alex

> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev

----- End forwarded message -----

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev