Return-Path: Delivered-To: apmail-incubator-ivy-user-archive@locus.apache.org Received: (qmail 61508 invoked from network); 16 Aug 2007 18:38:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Aug 2007 18:38:02 -0000 Received: (qmail 48421 invoked by uid 500); 16 Aug 2007 18:38:00 -0000 Delivered-To: apmail-incubator-ivy-user-archive@incubator.apache.org Received: (qmail 48280 invoked by uid 500); 16 Aug 2007 18:37:59 -0000 Mailing-List: contact ivy-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ivy-user@incubator.apache.org Delivered-To: mailing list ivy-user@incubator.apache.org Received: (qmail 48271 invoked by uid 99); 16 Aug 2007 18:37:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 11:37:59 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xavier.hanin@gmail.com designates 64.233.162.239 as permitted sender) Received: from [64.233.162.239] (HELO nz-out-0506.google.com) (64.233.162.239) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 18:37:53 +0000 Received: by nz-out-0506.google.com with SMTP id o37so149601nzf for ; Thu, 16 Aug 2007 11:37:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FsCUOrTfQVZuqbnE1StUmBJEf6QFWQjtkTJKXzKkzt4D++RUJt5ZPMkRX6Y7h+x+cYArU0uXkJE7+UipxRe4JElHOkWFy3PPdNIRZQhWgeIBPMc3gik1tI3ri4kplhZULjl3vVjDVjfhBS75Bjg6wxChWIL1Tqe9i3qzpuTsoew= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=kWjQNDqdIjVXfN2l1n+PAlu29abQF6JbnHStfBpa8W18XuGHZHp1vl3+tzmL2UEvjn2w5arc5u+HOnxARSbqAmdSgzNW2y+mUruAPLwYj57W90Wft/n7xQY2fEETHrTd74OQ05F0kId+tALVsAmaHIzNI9MV784pehXqddTYmbY= Received: by 10.114.168.1 with SMTP id q1mr2217636wae.1187289451744; Thu, 16 Aug 2007 11:37:31 -0700 (PDT) Received: by 10.114.120.20 with HTTP; Thu, 16 Aug 2007 11:37:31 -0700 (PDT) Message-ID: <635a05060708161137u3e3bfdc6n369442b8295edf21@mail.gmail.com> Date: Thu, 16 Aug 2007 20:37:31 +0200 From: "Xavier Hanin" To: ivy-user@incubator.apache.org Subject: Re: NPE whilst resolving transitive configurations. In-Reply-To: <46C48C17.2000208@oracle.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_52646_11678209.1187289451705" References: <46C2CD21.5060004@oracle.com> <46C2D063.3040908@oracle.com> <635a05060708150904q549da481p2ad8ffde3b4197d3@mail.gmail.com> <46C34D79.2030207@oracle.com> <46C48C17.2000208@oracle.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_52646_11678209.1187289451705 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/16/07, Ross Clewley wrote: > > Hi > > I also see the following NullPointerException under similar conditions > whilst resolving transitive configurations and can also be influenced by > the order of the dependencies. > > java.lang.NullPointerException > at > org.apache.ivy.core.resolve.ResolveEngine.downloadArtifacts( > ResolveEngine.java:310) > at > org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:271) > at > org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:193) > at org.apache.ivy.Ivy.resolve(Ivy.java:256) > at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:212) > at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:281) > > I can't find that stack in jira. Do you think this is a related to the > previous issue or needing it's own issue? I think another stack deserves its own issue, with a link to the other one. We'll mark all of them as resolved if fix them at once. Thanks for reporting, Xavier thanks > > Ross > > Ross Clewley wrote: > > Hi Xavier > > > > Thanks for taking a look. I've logged IVY-590. > > > > thanks > > > > Ross > > > > Xavier Hanin wrote: > > > >> On 8/15/07, Ross Clewley wrote: > >> > >> > >>> Hi > >>> > >>> I should also say that this is with 1.4.1. I've tried with 2.0-alpha2 > >>> and I still get the NPE. > >>> > >>> > >> I can't easily browse the 1.4.1 source right now, so I've just given a > >> glance at the trunk, and you've found a pretty big issue: in > >> ResolveEngine.java:523 we call mark evicted with a null collection of > >> selected module revisions, which is passed down to the EvictionData > >> constructor which causes the NPE. This is pretty easy to solve though > >> (adding a check for nullity in the constructor). Could you open an > issue for > >> that? > >> > >> Besides finding the problem in 2.x, this may also help to narrow down > the > >> problem in 1.4. Indeed we have no unit test testing the case handled by > >> ResolveEngine.java:523, so it may be a cause of the NPE in 1.4 too. > >> > >> Xavier > >> > >> The stack this time is > >> > >> > >>> java.lang.NullPointerException > >>> at > >>> org.apache.ivy.core.resolve.IvyNodeEviction$EvictionData.( > >>> IvyNodeEviction.java:48) > >>> at > >>> org.apache.ivy.core.resolve.IvyNodeEviction.markEvicted( > >>> IvyNodeEviction.java:266) > >>> at > >>> org.apache.ivy.core.resolve.IvyNode.markEvicted(IvyNode.java:1101) > >>> at > >>> org.apache.ivy.core.resolve.ResolveEngine.getDependencies( > >>> ResolveEngine.java:523) > >>> at > >>> org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java > :236) > >>> at > >>> org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java > :194) > >>> at org.apache.ivy.Ivy.resolve(Ivy.java:256) > >>> at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java > :207) > >>> at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:281) > >>> at > >>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > >>> at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) > >>> at > >>> sun.reflect.DelegatingMethodAccessorImpl.invoke( > >>> DelegatingMethodAccessorImpl.java:25) > >>> at java.lang.reflect.Method.invoke(Method.java:585) > >>> at > >>> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java > >>> :105) > >>> at org.apache.tools.ant.Task.perform(Task.java:348) > >>> at org.apache.tools.ant.Target.execute(Target.java:357) > >>> at org.apache.tools.ant.Target.performTasks(Target.java:385) > >>> at > >>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) > >>> at org.apache.tools.ant.Project.executeTarget(Project.java > :1298) > >>> at > >>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets( > >>> DefaultExecutor.java:41) > >>> at org.apache.tools.ant.Project.executeTargets(Project.java > :1181) > >>> at org.apache.tools.ant.Main.runBuild(Main.java:698) > >>> at org.apache.tools.ant.Main.startAnt(Main.java:199) > >>> at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) > >>> at org.apache.tools.ant.launch.Launcher.main(Launcher.java > :104) > >>> > >>> However, there is a slight difference in the behaviour. With > 2.0-alpha2, > >>> if I do the resolve a second time without cleaning the cache it works. > >>> If I clean the cache again and do the resolve I get the NPE again. > With > >>> 1.4.1 I get it every time, regardless of whether the cache is clean or > >>> not. > >>> > >>> regards > >>> > >>> Ross > >>> > >>> Ross Clewley wrote: > >>> > >>> > >>>> Hi > >>>> > >>>> I need some help sorting out a NullPointerException that I'm getting > >>>> during resolution. The stack looks like this. > >>>> > >>>> java.lang.NullPointerException > >>>> at fr.jayasoft.ivy.IvyNode.isEvicted(IvyNode.java:367) > >>>> at fr.jayasoft.ivy.IvyNode.loadData(IvyNode.java:590) > >>>> at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:1417) > >>>> at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:1443) > >>>> at fr.jayasoft.ivy.Ivy.doFetchDependencies(Ivy.java:1492) > >>>> at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:1424) > >>>> at fr.jayasoft.ivy.Ivy.doFetchDependencies(Ivy.java:1492) > >>>> at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:1424) > >>>> at fr.jayasoft.ivy.Ivy.doFetchDependencies(Ivy.java:1492) > >>>> at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:1433) > >>>> at fr.jayasoft.ivy.Ivy.doFetchDependencies(Ivy.java:1476) > >>>> at fr.jayasoft.ivy.Ivy.fetchDependencies(Ivy.java:1424) > >>>> at fr.jayasoft.ivy.Ivy.getDependencies(Ivy.java:1343) > >>>> at fr.jayasoft.ivy.Ivy.resolve(Ivy.java:1136) > >>>> at fr.jayasoft.ivy.Ivy.resolve(Ivy.java:1093) > >>>> at fr.jayasoft.ivy.ant.IvyResolve.execute(IvyResolve.java:167) > >>>> > >>>> I'd like to be able to figure out a minimal testcase to reproduce > this > >>>> so I can log a Jira issue and also hopefully work around it. The > >>>> trouble is I'm having problems figuring out what that minimal > testcase > >>>> is. The problem occurs with certain sets of dependencies and can go > >>>> away again when those dependencies are changed, or even when the > >>>> dependencies are re-ordered. I'm hoping someone may be able to give > me > >>>> some pointers about what to look at to help nail this down a bit more > >>>> firmly. > >>>> > >>>> The problem occurs whilst resolving transitive configurations. We > have > >>>> a build systems comprising 170 or so modules, each of which have the > >>>> following configurations > >>>> > >>>> > >>>> >>>> transitive="false"/> > >>>> >>>> transitive="true"/> > >>>> > >>>> > >>>> These modules declare dependencies amongst themselves or third party > >>>> dependencies in their own filesystem repository with Ivy files that > >>>> just have the default conf. Incase it's relevant the > >>>> defaultconfmapping used throughout is "compile->default(*);*->@(*)". > >>>> > >>>> It's when resolving the transitive runtime of test configurations > that > >>>> the NPE occurs. > >>>> > >>>> It's difficult for me to give you a selection of the modules and > their > >>>> dependencies that cause the problem as there would be too many. That > >>>> is why I want to try to understand the issue better and produce that > >>>> minimal testcase. Any ideas? > >>>> > >>>> thanks > >>>> > >>>> Ross > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >> > >> > > > > > > > > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://incubator.apache.org/ivy/ http://www.xoocode.org/ ------=_Part_52646_11678209.1187289451705--