[jbosstools-issues] [JBoss JIRA] (JBIDE-12561) if cloning fails because of an non-existing ssh-key file, error dialog only shows a meaningless TargetInvocationException

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Fri Sep 7 03:58:32 EDT 2012


     [ https://issues.jboss.org/browse/JBIDE-12561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andre Dietisheim updated JBIDE-12561:
-------------------------------------

    Steps to Reproduce: 
1. ASSERT: make sure that you have a <home>/.ssh/config that points to an non-existing identity file
{code}
Host *.rhcloud.com
    IdentityFile ~/.ssh/bogus_id_dsa
    VerifyHostKeyDNS yes
    StrictHostKeyChecking no
    UserKnownHostsFile ~/.ssh/libra_known_hosts
{code}

2. ASSERT: make sure you have an application on OpenShift
3. EXEC: launch the *Import OpenShift Application* wizard and try to import this applcation.

Result:
Cloning fails with a TargetInvocationException that does not unveil what really went wrong:

!targetinvocationexception-dialog.png!

The Eclispe log shows the full stracktrace that unveils what went wrong. The FileNotFoundException which caused this is wrapped:  *InvocationTargetException->TransportException->JSchException->FileNotFoundException*

{code}
java.lang.reflect.InvocationTargetException
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:173)
	at org.jboss.tools.openshift.egit.core.EGitUtils.cloneRepository(EGitUtils.java:245)
	at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.AbstractImportApplicationOperation.cloneRepository(AbstractImportApplicationOperation.java:94)
	at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportNewProject.execute(ImportNewProject.java:73)
	at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizardModel.importProject(OpenShiftExpressApplicationWizardModel.java:82)
	at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard$ImportJob.runInWorkspace(OpenShiftExpressApplicationWizard.java:304)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137)
	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:153)
	... 7 more
Caused by: org.eclipse.jgit.errors.TransportException: ssh://28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
	at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1069)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
	... 10 more
Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:98)
	at com.jcraft.jsch.JSch.addIdentity(JSch.java:224)
	at com.jcraft.jsch.JSch.addIdentity(JSch.java:210)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:233)
	at org.eclipse.egit.ui.EclipseSshSessionFactory.createSession(EclipseSshSessionFactory.java:45)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:150)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:109)
	... 17 more
Caused by: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at java.io.FileInputStream.<init>(FileInputStream.java:79)
	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:83)
	... 23 more
{code}

Expected result:
The error dialog should unveil the FileNotFoundException that caused this.

  was:
1. ASSERT: make sure that you have a <home>/.ssh/config that points to an non-existing identity file
{code}
Host *.rhcloud.com
    IdentityFile ~/.ssh/bogus_id_dsa
    VerifyHostKeyDNS yes
    StrictHostKeyChecking no
    UserKnownHostsFile ~/.ssh/libra_known_hosts
{code}

2. ASSERT: make sure you have an application on OpenShift
3. EXEC: launch the *Import OpenShift Application* wizard and try to import this applcation.

Result:
Cloning fails with a TargetInvocationException that does not unveil what really went wrong:

!targetinvocationexception-dialog.png!

The Eclispe log shows the full stracktrace that unveils what went wrong. The FileNotFoundException which caused this is wrapped:  *InvocationTargetException->TransportException->JSchException->FileNotFoundException*

{code}
java.lang.reflect.InvocationTargetException
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:173)
	at org.jboss.tools.openshift.egit.core.EGitUtils.cloneRepository(EGitUtils.java:245)
	at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.AbstractImportApplicationOperation.cloneRepository(AbstractImportApplicationOperation.java:94)
	at org.jboss.tools.openshift.express.internal.ui.wizard.appimport.ImportNewProject.execute(ImportNewProject.java:73)
	at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizardModel.importProject(OpenShiftExpressApplicationWizardModel.java:82)
	at org.jboss.tools.openshift.express.internal.ui.wizard.OpenShiftExpressApplicationWizard$ImportJob.runInWorkspace(OpenShiftExpressApplicationWizard.java:304)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:137)
	at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:178)
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:125)
	at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:153)
	... 7 more
Caused by: org.eclipse.jgit.errors.TransportException: ssh://28852364e2544560944df195f0f1074e@as-openshiftci.rhcloud.com/~/git/as.git/: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:142)
	at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
	at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
	at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
	at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
	at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
	at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1069)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:128)
	... 10 more
Caused by: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:98)
	at com.jcraft.jsch.JSch.addIdentity(JSch.java:224)
	at com.jcraft.jsch.JSch.addIdentity(JSch.java:210)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:233)
	at org.eclipse.egit.ui.EclipseSshSessionFactory.createSession(EclipseSshSessionFactory.java:45)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:150)
	at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:109)
	... 17 more
Caused by: java.io.FileNotFoundException: /home/adietish/.ssh/libra_id_rsa22 (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:120)
	at java.io.FileInputStream.<init>(FileInputStream.java:79)
	at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:83)
	... 23 more
{code}


    
> if cloning fails because of an non-existing ssh-key file, error dialog only shows a meaningless TargetInvocationException
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-12561
>                 URL: https://issues.jboss.org/browse/JBIDE-12561
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 3.3.0.Final
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>             Fix For: 4.0.0.Alpha2
>
>         Attachments: targetinvocationexception-dialog.png
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list