Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 953195 - HQL query exception while trying to filter strings
HQL query exception while trying to filter strings
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Retired
Component: Deployment (Show other bugs)
2.2
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Carlos Munoz
Ding-Yi Chen
:
: 970855 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-17 11:31 EDT by dtnghia90
Modified: 2013-07-25 20:38 EDT (History)
4 users (show)

See Also:
Fixed In Version: 2.3.1-SNAPSHOT (20130501-0011)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-25 20:38:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description dtnghia90 2013-04-17 11:31:42 EDT
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-25 20:30:22 EDT
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 04:01:53 EDT
(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-28 21:19:02 EDT
merged into master:
https://github.com/zanata/zanata/commit/88a03a8290cddcc39fc211bdee74624ef91b0fa9
Comment 5 Ding-Yi Chen 2013-04-30 20:30:47 EDT
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-09 21:48:56 EDT
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-06 21:43:26 EDT
*** Bug 970855 has been marked as a duplicate of this bug. ***
Comment 9 Carlos Munoz 2013-07-25 20:38:32 EDT
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.