Thanks for the reply, Tim.

I am executing "mvn install", not "mvn deploy".

Also, I tried using scpext, but got following error:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Unsupported Protocol: 'scpext': Cannot find 
wagon which supports the requested protocol: scpext
Component descriptor cannot be found in the component repository: 
org.apache.maven.wagon.Wagonscpext.

Regards,
Mukta Jindal



-----Original Message-----
From: Tim Kettler [mailto:[EMAIL PROTECTED]
Sent: 04 June 2008 12:16
To: Maven Users List
Subject: Re: Need help | Getting NPE while using "mvn install"

JINDAL, Mukta, IDC schrieb:
> Hi All,

Hi,

>
> I am getting following error while using "mvn install" though "mvn package" 
> is working fine.

Judging from the stacktrace below you ran 'mvn deploy', not 'mvn install' (see 
the reference to the deploy mojo). As the deploy phase is executed after the 
install phase, install seems to work just fine.

> I did entire cleanup, restarted machine too.
>
> What could be the possible reasons ?
>

The deploy tries to upload your artifact via SCP (JCrafts JSCH is the SSH 
library used by maven) to the remote repository you have configured in the 
<distributionManagement/> section of your POM and fails doing this.

You have to investigate why exactly it is failing for you. I would start trying 
to test if uploading something manually via commandline scp does work and then 
double check the maven ssh configuration. Another option is to try to switch 
from scp: to scpext: protocol in <distributionManagemnt>, so maven don't uses 
JSCH but the commandline scp application.

>
>
> [INFO]
> ----------------------------------------------------------------------
> --
> [ERROR] FATAL ERROR
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] null
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] Trace
> java.lang.NullPointerException
>         at com.jcraft.jsch.Session.disconnect(Unknown Source)
>         at 
> org.apache.maven.wagon.providers.ssh.jsch.AbstractJschWagon.closeConnection(AbstractJschWagon.java:207)
>         at 
> org.apache.maven.wagon.AbstractWagon.disconnect(AbstractWagon.java:153)
>         at 
> org.apache.maven.artifact.manager.DefaultWagonManager.disconnectWagon(DefaultWagonManager.java:675)
>         at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:551)
>         at 
> org.apache.maven.artifact.manager.DefaultWagonManager.getArtifactMetadata(DefaultWagonManager.java:363)
>         at 
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:364)
>         at 
> org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.resolveAlways(DefaultRepositoryMetadataManager.java:318)
>         at 
> org.apache.maven.artifact.transform.SnapshotTransformation.resolveLatestSnapshotBuildNumber(SnapshotTransformation.java:161)
>         at 
> org.apache.maven.artifact.transform.SnapshotTransformation.transformForDeployment(SnapshotTransformation.java:100)
>         at 
> org.apache.maven.artifact.transform.DefaultArtifactTransformationManager.transformForDeployment(DefaultArtifactTransformationManager.java:78)
>         at 
> org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:71)
>         at 
> org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:162)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>
> Thanks,
> Mukta Jindal.
>

-Tim

> **********************************************************************
> ************* The Royal Bank of Scotland plc. Registered in Scotland
> No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
> Authorised and regulated by the Financial Services Authority
>
> This e-mail message is confidential and for use by the addressee only.
> If the message is received by anyone other than the addressee, please
> return the message to the sender by replying to it and then delete the
> message from your computer. Internet e-mails are not necessarily
> secure. The Royal Bank of Scotland plc does not accept responsibility
> for changes made to this message after it was sent.
>
> Whilst all reasonable care has been taken to avoid the transmission of
> viruses, it is the responsibility of the recipient to ensure that the
> onward transmission, opening or use of this message and any
> attachments will not adversely affect its systems or data. No
> responsibility is accepted by The Royal Bank of Scotland plc in this
> regard and the recipient should carry out such virus and other checks
> as it considers appropriate.
> Visit our websites at:
> www.rbs.com
> www.rbs.com/gbm
> www.rbsgc.com
> **********************************************************************
> *************
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to