Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 40321 invoked from network); 14 Dec 2008 17:22:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Dec 2008 17:22:18 -0000 Received: (qmail 64761 invoked by uid 500); 14 Dec 2008 17:22:29 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 64741 invoked by uid 500); 14 Dec 2008 17:22:29 -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 64730 invoked by uid 99); 14 Dec 2008 17:22:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Dec 2008 09:22:29 -0800 X-ASF-Spam-Status: No, hits=-0.8 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gcaju-users@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Dec 2008 17:22:06 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LBuf2-0007Qy-5T for users@jackrabbit.apache.org; Sun, 14 Dec 2008 17:21:44 +0000 Received: from e178171038.adsl.alicedsl.de ([85.178.171.38]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Dec 2008 17:21:44 +0000 Received: from mpeach by e178171038.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Dec 2008 17:21:44 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: users@jackrabbit.apache.org From: Martin Pietsch Subject: Files uploaded by WebDAV not accessible via OCM queries Date: Sun, 14 Dec 2008 18:21:34 +0100 Lines: 47 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178171038.adsl.alicedsl.de User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) Sender: news X-Virus-Checked: Checked by ClamAV on apache.org Hi, my problem is close to "Plain JCR XPATH queries" by Edgar Merino (http://article.gmane.org/gmane.comp.apache.jackrabbit.user/9748) but not the same: I read and followed the instructions from http://jackrabbit.apache.org/5-with-jackrabbit-ocm.html (and related) to set up OCM for Jackrabbit and i'm using the POJOs from the JUnit tests to set up the mapping for Files and Folders. After solving that issue with the ocm_classname discussed in http://www.nabble.com/OCM-ocm:discriminator-NodeType-td20701910.html http://www.nabble.com/OCM-Annotations-constraint-error-td20493710.html everything is working except one thing: Files that are uploaded via WebDAV do not contain that ocm_classname discriminator, which means that these files cannot not be found by queries like: Filter filter = queryManager.createFilter(File.class); Query query = qm.createQuery(filter); contentManager.getObjects(query); which is desirable. Using a basic search query like: contentManager.getObjects("/*[jcr:primaryType='nt:file']", javax.jcr.query.Query.XPATH) results in an exception: org.apache.jackrabbit.ocm.exception.ObjectContentManagerException: Class 'org.mycompany.model.jcr.File' has not a discriminator property. The question: Is there a chance ... 1) to tell the WebDAV-Servlet to set the discriminator properties for uploaded Files and Folders or 2) that OCM recognized nodes as files or folders even without that discriminator property? Any suggestions? Thanks, Martin