You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Erik-Berndt Scheper (JIRA)" <ji...@apache.org> on 2008/06/16 12:53:45 UTC

[jira] Commented: (IVY-843) NPE in Ivy:install task if a file cannot be resolved

    [ https://issues.apache.org/jira/browse/IVY-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605257#action_12605257 ] 

Erik-Berndt Scheper commented on IVY-843:
-----------------------------------------

Further investigation shows that this problem occurs if the repository cache dir has been cleared.
The jars are found using the resolver, but the corresponding ivy file can no longer be found and an NPE is produced.

As long as the ivy file exists in the repository cache, the ivy:install task runs fine. Once the ivy file is removed from the cache the NPE occurs.

> NPE in Ivy:install task if a file cannot be resolved
> ----------------------------------------------------
>
>                 Key: IVY-843
>                 URL: https://issues.apache.org/jira/browse/IVY-843
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0-RC1
>            Reporter: Erik-Berndt Scheper
>             Fix For: 2.0-RC1
>
>
> In the latest version from trunk a NPE in the ivy:install task can occur if a file cannot be resolved.
> Stack trace:
> {noformat}
> java.lang.NullPointerException
>         at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:109)
>         at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
>         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)
> Caused by: java.lang.NullPointerException
>         at org.apache.ivy.plugins.repository.sftp.SFTPRepository.put(SFTPRepository.java:144)
>         at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
>         at org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:214)
>         at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:204)
>         at org.apache.ivy.core.install.InstallEngine.install(InstallEngine.java:150)
>         at org.apache.ivy.Ivy.install(Ivy.java:526)
>         at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:101)
>         ... 17 more
> --- Nested Exception ---
> java.lang.NullPointerException
>         at org.apache.ivy.plugins.repository.sftp.SFTPRepository.put(SFTPRepository.java:144)
>         at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
>         at org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:214)
>         at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:204)
>         at org.apache.ivy.core.install.InstallEngine.install(InstallEngine.java:150)
>         at org.apache.ivy.Ivy.install(Ivy.java:526)
>         at org.apache.ivy.ant.IvyInstall.doExecute(IvyInstall.java:101)
>         at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
>         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)
> {noformat}
> Complete output of ant-verbose (without stack trace:
> {noformat}
> repository-copy:
> [ivy:install] :: installing org.junit#junit;3.8.1 ::
> [ivy:install] :: resolving dependencies ::
> [ivy:install] resolving dependencies for configuration 'default'
> [ivy:install] == resolving dependencies for apache#ivy-install;1.0 [default]
> [ivy:install] == resolving dependencies apache#ivy-install;1.0->org.junit#junit;3.8.1 [default->*]
> [ivy:install] integration.chained.resolver: Checking cache for: dependency: org.junit#junit;3.8.1 {default=[*]}
> [ivy:install]           tried D:\ws\eclipse-3.3.1\AAD\build\ivy-repository-copy/../../ivy-cache/integration/org.junit/junit/ivy-junit-3.8.1.xml
> [ivy:install]   integration: found md file for org.junit#junit;3.8.1
> [ivy:install]           => D:\ws\eclipse-3.3.1\AAD\build\ivy-repository-copy\..\..\ivy-cache\integration\org.junit\junit\ivy-junit-3.8.1.xml (3.8.1)
> [ivy:install]   [NOT REQUIRED] org.junit#junit;3.8.1!ivy.xml(ivy.original)
> [ivy:install]   found org.junit#junit;3.8.1 in integration
> [ivy:install] :: downloading artifacts to cache ::
> [ivy:install]   [NOT REQUIRED] org.junit#junit;3.8.1!junit.jar
> [ivy:install] :: installing in external-publish-repository ::
> [ivy:install] installing org.junit#junit;3.8.1
> [ivy:install] :: SSH :: connecting to 172.30.247.68...
> [ivy:install] :: SSH :: connected to 172.30.247.68!
> [ivy:install] :: SFTP :: connected to 172.30.247.68!
> [ivy:install]   published junit to IVY-repositories/01-IVY-external-repository/org.junit/junit/jars/junit-3.8.1.jar
> BUILD FAILED
> D:\ws\eclipse-3.3.1\AAD\build\ivy-repository-copy\build.xml:20: impossible to install org.junit#junit;3.8.1: java.lang.NullPointerException
> <<stack trace removed>>
> Total time: 5 seconds
> D:\ws\eclipse-3.3.1\AAD\build\ivy-repository-copy>
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.