Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56D0C10440 for ; Tue, 2 Dec 2014 21:26:40 +0000 (UTC) Received: (qmail 45163 invoked by uid 500); 2 Dec 2014 21:26:39 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 45109 invoked by uid 500); 2 Dec 2014 21:26:39 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 45098 invoked by uid 99); 2 Dec 2014 21:26:39 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Dec 2014 21:26:39 +0000 Received: from mail-yh0-f53.google.com (mail-yh0-f53.google.com [209.85.213.53]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 4C24C1A037A for ; Tue, 2 Dec 2014 21:26:17 +0000 (UTC) Received: by mail-yh0-f53.google.com with SMTP id i57so6407428yha.26 for ; Tue, 02 Dec 2014 13:26:37 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.170.153.135 with SMTP id u129mr2326031ykc.21.1417555597005; Tue, 02 Dec 2014 13:26:37 -0800 (PST) Received: by 10.170.56.9 with HTTP; Tue, 2 Dec 2014 13:26:36 -0800 (PST) In-Reply-To: References: Date: Tue, 2 Dec 2014 23:26:36 +0200 Message-ID: Subject: Re: Getting InvalidItemStateException when invoking a simple SQL2 query From: Robert Munteanu To: users@jackrabbit.apache.org Content-Type: text/plain; charset=UTF-8 Hi, On Tue, Dec 2, 2014 at 7:17 AM, Behrang Saeedzadeh wrote: > final Query query = queryManager.createQuery("", Query.JCR_SQL2); Is this the actual query invocation? You probably want something like final Query query = queryManager.createQuery(statement, Query.JCR_SQL2); Robert