ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <>
Subject Re: Classloading issue
Date Sun, 11 May 2014 23:34:59 GMT
Hello Nicolas,

I have tried your test case and it is failing as you except :

/Users/antoine/dev/asf/ivyde-trunk/test/ssh-resolver/build.xml:27: java.lang.NoClassDefFoundError:
	at org.apache.ivy.plugins.repository.ssh.AbstractSshBasedRepository.getSession(
	at org.apache.ivy.plugins.repository.ssh.SshRepository.resolveResource(
	at org.apache.ivy.plugins.repository.ssh.SshResource.resolve(

The line 108 in AbstractSsshBasedRepository contains this :

       return SshCache.getInstance().getSession(host, port, user, userPassword, getKeyFile(),
           getKeyFilePassword(), getPassFile(), isAllowedAgentUse());

getSession is a method which calls attemptAgentUse.

Does this explain why an attempt to load AgentProxyException happens at that time ?



On May 11, 2014, at 5:41 PM, Nicolas Lalevée <> wrote:

> Hi,
> I need some help to understand a bug around classloading (nothing that particular to
> I was looking into IVY-1471 [1] and I don't understand why it is failing that way. In
the classpath there are both Ivy and Jsch, but not the optional jar related to managing the
ssh agent via jsch. And it is failing because a class in that optional jar is not found. But
I don't understand why the classloader is looking for it in the first place.
> The error is raised is AbstractSshBasedRepository, on the call of SshCache.getInstance()
[2]. But as far as I can tell, nothing in the loading of the SshCache [3] class requires AgentProxyException.
The class is only needed by the function SshCache#attemptAgentUse() [4], which will be called
at runtime, if the end user actually want ssh agent support, in which case it would naturally
fail. But here it fails very earlier.
> I have made a test case you can test with its build.xml, no IvyDE required there [5].
> Am I missing something ? Is there a special treatment for the loading of Exception classes
> Nicolas
> [1]
> [2]
> [3]
> [4]
> [5]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message