Cannot get Ant Tasks to work after Vault 8 upgrade
Moderator: SourceGear
Cannot get Ant Tasks to work after Vault 8 upgrade
We just upgraded to 8 and I got the 8 Ant tasks, installed them, and when I go to use them I keep getting a Null Pointer exception.
I've rebooted, verified files, etc.
The error occurs when I call vaultsetloginoptions and yes all the parameters have values so the Null Pointer exception doesn't make much sense.
I've changed nothing in this environment other than installing Vault 8 so this was all working prior to the upgrade.
The exact error info is:
java.lang.NullPointerException
at com.sourcegear.ant.tasks.VaultSetLoginOptions.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Thanks,
J
I've rebooted, verified files, etc.
The error occurs when I call vaultsetloginoptions and yes all the parameters have values so the Null Pointer exception doesn't make much sense.
I've changed nothing in this environment other than installing Vault 8 so this was all working prior to the upgrade.
The exact error info is:
java.lang.NullPointerException
at com.sourcegear.ant.tasks.VaultSetLoginOptions.execute(Unknown Source)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.Main.runBuild(Main.java:851)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Thanks,
J
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
Can you tell me the version from which you upgraded?
Did you upgrade in one step or through multiple versions?
Did you upgrade in one step or through multiple versions?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
We were on 7.1.0 and upgraded to 8.0.1.
It was just a straight upgrade to 8.0.1.
It was just a straight upgrade to 8.0.1.
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
When you upgraded, did you switch machines at all, or was this an in-place upgrade?
Did you upgrade the Ant tasks to what was compiled with Vault 8? If using Vault Standard, this is what you would want: http://download.sourcegear.com/Vault/8. ... _1_299.zip.
Did you upgrade the Ant tasks to what was compiled with Vault 8? If using Vault Standard, this is what you would want: http://download.sourcegear.com/Vault/8. ... _1_299.zip.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
No it's the same system and I can use Vault fine via command line, UI Client, even via Jenkins plugin that uses the command line.
The Ant task isn't having a problem connecting as I have had those errors before and they are different, unless that was changed.
This is like it can't find part of the Vault Ant libs but I've verified they are all there and yes they are the Standard version as that is what we have. Or at least that is the package I used.
Just to let you know I tried using Ant's debug and verbose but it doesn't give me any additional useful info.
The Ant task isn't having a problem connecting as I have had those errors before and they are different, unless that was changed.
This is like it can't find part of the Vault Ant libs but I've verified they are all there and yes they are the Standard version as that is what we have. Or at least that is the package I used.
Just to let you know I tried using Ant's debug and verbose but it doesn't give me any additional useful info.
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
Some info I kept forgetting to post, this occurs with both Ant 1.9.2 and Ant 1.9.6.
It also is happening on multiple systems.
It also is happening on multiple systems.
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
My concern is that you have the Vault 8 version of the Ant libraries. With the error being on vaultsetloginoptions, I would question whether it really is completing a login.
Can you take the exact options you have set for vaultsetloginoptions, and try them in either a Vault GUI client or a Vault CLC?
Can you take the exact options you have set for vaultsetloginoptions, and try them in either a Vault GUI client or a Vault CLC?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
I've done that already. As I said it works from these systems via CLC, same credentials, same everything.
Also the GUI client also works fine again with the same everything.
Also the GUI client also works fine again with the same everything.
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
btw, I dont't think it ever completes a login. I believe the error I'm getting looks to me like either a Vault lib isn't being found or is misconfigured somehow.
Can you take the same zip, the Vault 8 Standard Ant Tasks, with Ant 1.9.2 or 1.9.6 and have it work correctly there?
Can you take the same zip, the Vault 8 Standard Ant Tasks, with Ant 1.9.2 or 1.9.6 and have it work correctly there?
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
I'll get an environment together with Ant.
Could you send me your Vault server log found on the Vault server at %windir%\temp\sgvault\sgvault.log? You can either post it here or send it in an email to support at sourcegear.com (attn: Beth) with a link to this forum thread.
Could you send me your Vault server log found on the Vault server at %windir%\temp\sgvault\sgvault.log? You can either post it here or send it in an email to support at sourcegear.com (attn: Beth) with a link to this forum thread.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
I can get it but it shows nothing. The server is never reached.
I even ran it again just now to verify and there isn't even a login acknowledgment.
I even ran it again just now to verify and there isn't even a login acknowledgment.
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
Can you post (obfuscate if necessary) a quick Ant script we could use for testing? It would save us some steps for implementing a script trying to create a script in the same task order your script uses.
Jeff Clausius
SourceGear
SourceGear
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
The piece I use is for Labeling and it's a small target(function) in a large Ant script so here is that part.
<target name="LabelBuild" description="Labeling source with label">
<vaultsetloginoptions user="${vault_user}" password="${vault_user_pd}" URL="${env.VAULT_SERVER_URL}" repository="${env.VAULT_REPO}" />
<echo>Labeling $/${vault_branch1} with label - v${build_major_number}.${build_minor_number}.${build_revision_number}.${build_build_number}</echo>
<vaultlabel objectPath="$/${vault_branch1}" versionID="-1" labelName="v${build_major_number}.${build_minor_number}.${build_revision_number}.${build_build_number}"/>
</target>
I've echoed out, just before the set login options task, the variables used and they are all valid and again they are all the same as was used prior to Vault 8 upgrade and also the same values I can use from the CLC or UI without issue.
<target name="LabelBuild" description="Labeling source with label">
<vaultsetloginoptions user="${vault_user}" password="${vault_user_pd}" URL="${env.VAULT_SERVER_URL}" repository="${env.VAULT_REPO}" />
<echo>Labeling $/${vault_branch1} with label - v${build_major_number}.${build_minor_number}.${build_revision_number}.${build_build_number}</echo>
<vaultlabel objectPath="$/${vault_branch1}" versionID="-1" labelName="v${build_major_number}.${build_minor_number}.${build_revision_number}.${build_build_number}"/>
</target>
I've echoed out, just before the set login options task, the variables used and they are all valid and again they are all the same as was used prior to Vault 8 upgrade and also the same values I can use from the CLC or UI without issue.
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
Thanks.
As you may have guessed, nothing was changed in the foundation classes from Vault 7 to Vault 8 in regards to Ant. We're trying to set up an environment as close as we can to yours ( first with Vault 7 and then upgrading to Vault 8 ) to recreate the behavior.
Thanks for your patience.
As you may have guessed, nothing was changed in the foundation classes from Vault 7 to Vault 8 in regards to Ant. We're trying to set up an environment as close as we can to yours ( first with Vault 7 and then upgrading to Vault 8 ) to recreate the behavior.
Thanks for your patience.
Jeff Clausius
SourceGear
SourceGear
Re: Cannot get Ant Tasks to work after Vault 8 upgrade
Seeing the same behavior with Vault 7. You're saying Vault 7 worked in your case, correct?
Jeff Clausius
SourceGear
SourceGear