Ticket #446 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

advanced search for template name not correct

Reported by: janneke@… Owned by: janneke@…
Priority: major Milestone: 0.8.3
Component: Query Version: 0.8.1
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

Searching for template (subject) name, for example awl;eg gives all studies (see attachment). The same for template (samples)

Additionally, searching for template (study) gives a runtime error

Grails Runtime Exception

Error Details

Error 500: Executing action [search] of controller [dbnp.query.AdvancedQueryController] caused exception: unexpected token: null near line 1, column 38 [FROM dbnp.studycapturing.Study study null WHERE null and ( study.owner = :sessionUser OR :sessionUser member of study.writers OR ( :sessionUser member of study.readers AND study.published = true ) )]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected token: null near line 1, column 38 [FROM dbnp.studycapturing.Study study null WHERE null and ( study.owner = :sessionUser OR :sessionUser member of study.writers OR ( :sessionUser member of study.readers AND study.published = true ) )]
Servlet: grails
URI: /gscf-0.8.1-ci/grails/advancedQuery/search.dispatch
Exception Message: unexpected token: null near line 1, column 38 [FROM dbnp.studycapturing.Study study null WHERE null and ( study.owner = :sessionUser OR :sessionUser member of study.writers OR ( :sessionUser member of study.readers AND study.published = true ) )] 
Caused by: unexpected token: null near line 1, column 38 [FROM dbnp.studycapturing.Study study null WHERE null and ( study.owner = :sessionUser OR :sessionUser member of study.writers OR ( :sessionUser member of study.readers AND study.published = true ) )] 
Class: AdvancedQueryController 
At Line: [63] 
Code Snippet:
Stack Trace

org.hibernate.hql.ast.QuerySyntaxException: unexpected token: null near line 1, column 38 [FROM dbnp.studycapturing.Study study null  WHERE null and ( study.owner = :sessionUser OR :sessionUser member of study.writers OR ( :sessionUser member of study.readers AND study.published = true ) )]

	at $Proxy15.createQuery(Unknown Source)

	at dbnp.query.Search.executeSearch(Search.groovy:164)

	at dbnp.query.Search.execute(Search.groovy:115)

	at dbnp.query.Search$execute$0.callCurrent(Unknown Source)

	at dbnp.query.Search.execute(Search.groovy:105)

	at dbnp.query.Search$execute.call(Unknown Source)

	at dbnp.query.AdvancedQueryController$_closure2.doCall(AdvancedQueryController.groovy:63)

	at dbnp.query.AdvancedQueryController$_closure2.doCall(AdvancedQueryController.groovy)

	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)

	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)

	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)

	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)

	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)

	at java.lang.Thread.run(Thread.java:662)

Attachments

2011_18mei query.png Download (44.9 KB) - added by janneke@… 3 years ago.

Change History

Changed 3 years ago by janneke@…

Changed 3 years ago by business@…

  • owner changed from work@… to robert@…
  • status changed from new to assigned

Changed 3 years ago by robert@…

  • owner changed from robert@… to janneke@…

I've resolved the issue with the exception coming up. See r1866 and #457.

I can't reproduce your first bug, regarding the strange search criterion and the screenshot. It might have been solved as well with this update.

Please test again whether it works as expected now.

Changed 3 years ago by janneke@…

  • owner changed from janneke@… to robert@…

Can't reproduce that either, but still found runtime error when searching for SampleTemplate?, (contains: urine, and outputtype is studies)

see  http://screencast.com/t/8n5kPTJe

Is it true that searching for Gender, containing male, doesn't give any studies at all? (neither with m, nor Male)

Changed 3 years ago by work@…

  • milestone changed from 0.8.2 to 0.8.3

Changed 3 years ago by robert@…

  • owner changed from robert@… to janneke@…

I've solved the given runtime error in #1902. The error with gender was caused by searching case sensitive (so 'male' didn't match 'Male'). This is solved now (see #1903 and #1904).

Would you test the search to see if it works properly?

Changed 3 years ago by janneke@…

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.