Bug 953195 - HQL query exception while trying to filter strings
Summary: HQL query exception while trying to filter strings
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Deployment
Version: 2.2
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Carlos Munoz
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
: 970855 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-17 15:31 UTC by dtnghia90
Modified: 2013-07-26 00:38 UTC (History)
4 users (show)

Fixed In Version: 2.3.1-SNAPSHOT (20130501-0011)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-26 00:38:32 UTC
Embargoed:


Attachments (Terms of Use)

Description dtnghia90 2013-04-17 15:31:42 UTC
Description of problem:
I have installed Zanata Server 2.2.2 on an Ubuntu 12.04.2 LTS and am trying to test it. I have uploaded some sample pot file to test the online translation interface. But as I click on one of the 3 possible state of a string, I receive an error notification and can't perform the filtering operation.

Version-Release number of selected component (if applicable):
Zanata Server 2.2.2

java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)


How reproducible:
I have tried it on Windows 7 and the problem is reproducible.


Steps to Reproduce:
1. Create a project, upload sample pot file as a source document.
2. Enter the translation interface
3. Click on "Translated", "Need Review" or "Untranslated"
  
Actual results:
"Failed to load data from server" notification on the right sidebar.

Expected results:
The strings should be correctly filtered according to the filter option.

Additional info:
14:51:59,144 ERROR [SeamDispatch] Error dispatching action: org.hibernate.hql.ast.InvalidWithClauseException: with-clause expressions did not reference from-clause element to wh
ich the with-clause was associated [SELECT distinct tf FROM org.zanata.model.HTextFlow tf LEFT JOIN tf.targets tfts WITH index(tfts)=:locale WHERE (tf.obsolete=0 AND tf.document
.id=:docId AND  EXISTS ( FROM org.zanata.model.HTextFlowTarget WHERE (textFlow=tf and locale=:locale AND state in (:contentStateList)))) ORDER BY tf.pos]

I've also noticed that once this exception is raised, I can't use other functionalities such as the arrows at the bottom to change pages (which then provoke the same notification error). Have I not tried to filter the strings, the arrows would have worked just fine.

Comment 1 Patrick Huang 2013-04-26 00:30:22 UTC
What hibernate version and jboss version are you using? And possibly what DBMS and version do you use? The HQL works for us so just want to check first. We are in the release phase now so will pull in the patch a bit later.
p.s. I already found one HQL works in mysql but not in h2 so maybe worth finding out.

Comment 2 dtnghia90 2013-04-26 08:01:53 UTC
(In reply to comment #1)
> What hibernate version and jboss version are you using? And possibly what
> DBMS and version do you use? The HQL works for us so just want to check
> first. We are in the release phase now so will pull in the patch a bit later.
> p.s. I already found one HQL works in mysql but not in h2 so maybe worth
> finding out.

I'm using Zanata Server 2.2.2, so according to the Zanata Download page, it's based on JBoss AS 5.1.0. As for hibernate, the server logs say that I'm using hibernate 3.3.1.GA.
On the database side, I have tried mySQL 5.5.24 on Windows and mySQL 5.5.30 on Ubuntu without success.

Comment 3 Patrick Huang 2013-04-29 01:19:02 UTC
merged into master:
https://github.com/zanata/zanata/commit/88a03a8290cddcc39fc211bdee74624ef91b0fa9

Comment 5 Ding-Yi Chen 2013-05-01 00:30:47 UTC
I have reproduced the error with zanata-server-2.2.2.zip on zanata.org.
And Zanata version 2.3.1-SNAPSHOT (20130501-0011) seems to fix the error.

VERIFIED with 2.3.1-SNAPSHOT (20130501-0011).

Comment 7 Sean Flanigan 2013-05-10 01:48:56 UTC
This bug doesn't manifest on JBoss EWP 5.1.2, only on JBoss AS, as packaged in the standalone server.

The fix will be in the next release of the Zanata standalone server.

Comment 8 Sean Flanigan 2013-06-07 01:43:26 UTC
*** Bug 970855 has been marked as a duplicate of this bug. ***

Comment 9 Carlos Munoz 2013-07-26 00:38:32 UTC
The latest released standalone server contains this fix.
Closing as it's already verified.


Note You need to log in before you can comment on or make changes to this bug.