Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C2F89D0D for ; Fri, 25 May 2012 06:38:10 +0000 (UTC) Received: (qmail 30386 invoked by uid 500); 25 May 2012 06:38:09 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 30323 invoked by uid 500); 25 May 2012 06:38:08 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 30293 invoked by uid 99); 25 May 2012 06:38:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 06:38:06 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kanwarmanish@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-ob0-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 06:38:01 +0000 Received: by obfk16 with SMTP id k16so1997251obf.16 for ; Thu, 24 May 2012 23:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=809VaTbRFrEOR3MPIyhVRhhm+p841+OX6IBqEZRPMzI=; b=BotEEPDePCeLDUiT3p539k8lnse6DGC4iGJui2xp5w6XwNCI9LxtFN4I3VEydWJcT1 oEXiWnttkX52JIpo6TXw7+dFoKJ61KU6ctoflDqpERNmUpbVQKO2ZRsUx50FztQsImq3 yBI/3fxRJITcC9awqp36wr10rNdxzAYeyQnUcUj74DYaWdXjU4f6gHhEf2hxk/fkUSnl OTxo4KpRHQ4PnQZRu0/BlGcPMEgqRh+zJ2/FUUHS4MBAYRespUjc4Wqmv6NDkjjlfr8u Olb9NvqvH9JAdanBBQ+VInB26NOQ+KpsoWk3d1/KbJ/grGO1fR3hsiYwbbly/eGHsLHx J+6A== MIME-Version: 1.0 Received: by 10.60.14.41 with SMTP id m9mr2037373oec.57.1337927860922; Thu, 24 May 2012 23:37:40 -0700 (PDT) Received: by 10.182.62.130 with HTTP; Thu, 24 May 2012 23:37:40 -0700 (PDT) In-Reply-To: References: Date: Fri, 25 May 2012 12:07:40 +0530 Message-ID: Subject: Re: Domain configuration file "cayenne.xml" is not found. From: Kanwar Manish To: user@cayenne.apache.org Content-Type: multipart/alternative; boundary=e89a8fb1fac0e2ab2004c0d69adf X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb1fac0e2ab2004c0d69adf Content-Type: text/plain; charset=ISO-8859-1 Worked - Possible Bug? [Not Solved - because I don't understand how it worked. Two approaches below] Question is - if the postgres jdbc jar is missing - why should the error be - "....cayenne.xml not found...". Please read for details. Thanks Guys for all the help. Please remember that I am a .NET specialist and a Java newbie [phew - talk about being deadly ;-)] Here is what I did - 1st approach 1. Moved to conf files to the default package. 2. Stepped through lot of errors for dependencies like Commons-Collections, Ashwood and JDBC driver not found. 3. Used code below - and it worked. " DefaultConfiguration conf = new DefaultConfiguration(); conf.addClassPath("mypackage"); Configuration.initializeSharedConfiguration(conf); DataContext context = DataContext.createDataContext(); return context; " 2nd Approach To test out Michael's suggestion of keeping the ' section before and ', I moved back the config files to the locations as per the original post below [basically moved back to the same state in which I had raised the query] Bummer - it works without a problem. Curious about how this is possible - I just removed the postgres jdbc jar out of curiosity - and the error is back. And I can replicate this without any problems. Hint - To save from banging head again and again make sure that Ashwood, commons collection, jdbc and any required dependencies are in place and well referred. Error is cryptic. There are references of using cayenne.jar that has all the dependencies - I couldn't find it though. Thanks for all the help. KM On Thu, May 24, 2012 at 9:03 PM, Mike Kienenberger wrote: > Yes, dependent on your servlet version, context-param definitely has > to be the first section in the file. > > Also, make sure that you're including the files in your war/ear. > Obvious, but sometimes still the cause :) > > On Thu, May 24, 2012 at 8:54 AM, Michael Gentry > wrote: > > Hi there, > > > > I'm not a servlet guru (I know enough to get by and have my Tapestry > > apps run), but I always put my section before > > and . May not make a difference, but worth trying. I > > haven't looked through the source extensively, but you seem to be on > > the right path from what the JavaDocs say. > > > > mrg > > > > > > On Thu, May 24, 2012 at 3:13 AM, Kanwar Manish > wrote: > >> Sorry guys, I am posting this bugger again. > >> > >> But it has turned out to be a bummer for me. > >> > >> I am using NetBeans 7.1.1 > >> JDK 1.7 > >> > >> cayenne files are in the folder - "/WEB-INF/config/cayenne-files". Total > >> three files cayenne.xml, map and node files. > >> > >> Error: > >> "[v.3.0.2 Jun 11 2011 09:26:09] Error during Configuration > initialization. > >> [v.3.0.2 Jun 11 2011 09:26:09] > >> [org.apache.cayenne.conf.DefaultConfiguration] : Domain configuration > file > >> "cayenne.xml" is not found." > >> > >> My XML File section for cayenne: > >> " > >> > >> CayenneFilter > >> > >> > org.apache.cayenne.conf.WebApplicationContextFilter > >> > >> > >> CayenneFilter > >> /* > >> > >> > >> cayenne.configuration.path > >> /WEB-INF/config/cayenne-files > >> > >> " > >> > >> Thanks in Advance > >> > >> I have searched this where I can - but not able to find a solution. > >> > >> Thanks > >> KM > --e89a8fb1fac0e2ab2004c0d69adf--