none
error MSB4018: The "Ant" task failed unexpectedly : System.NullReferenceException: Object reference not set to an instance of an object.

    Question

  • Hello All,

    Here we are using VS/TFS 2008 SP1. I am using TFS Build extension tool March 2011 release to compile and deploy JDeveloper Java applications to WebLogic server.

    when I invoke Ant task more than one time to be able to deploy to multiple servers, I am getting below exception even though it is deploying fine to all servers. If just deploy to one server by invoking Ant for one time, everything is going fine. Please let me know how we can fix this?

    I tried TeamPrise build extensions too, but got the same exception.

    Part of build script:

    <Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" />
      <Import Project="$(MSBuildExtensionsPath)\ExtensionPack\MSBuild.ExtensionPack.tasks" />
      <Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
      <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\BuildExtensions\Microsoft.TeamFoundation.Build.Extensions.Ant.targets" />
    ...

    ...

    <Target Name="AfterCompile" Condition=" '$(IsREGRorPRODdeploy)'=='true'">
        <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Message="CM Tasks - Deploying to $(REGRorPROD) Servers... ">
          <Output TaskParameter="Id" PropertyName="StepId" />
        </BuildStep>
        <Message Text="******************************* CM Tasks - (TARGET DEF:  AfterCompile) *******************************" />
        <CreateProperty Condition="'$(TestBuild)' == 'true'" Value="clean-all">
          <Output TaskParameter="Value" PropertyName="AntTarget" />
        </CreateProperty>
        <CreateProperty Condition="'$(TestBuild)' != 'true' and '$(EmailDeployEnvironment)' == 'Production' and '$(BuildEnvironment)' == 'Production' and '$(REGRorPROD)' == 'PROD'   and '$(IsStandardJavaProject)' == 'false'" Value="no-compile-deploy">
          <Output TaskParameter="Value" PropertyName="AntTarget" />
        </CreateProperty>
        <CreateProperty Condition="'$(TestBuild)' != 'true' and '$(EmailDeployEnvironment)' == 'Regression Test' and '$(BuildEnvironment)' == 'Regression Test' and '$(REGRorPROD)' == 'REGR'   and '$(IsStandardJavaProject)' == 'false'" Value="no-compile-deploy">
          <Output TaskParameter="Value" PropertyName="AntTarget" />
        </CreateProperty>
        <Message Text="******************** Removing Readonly $(SolutionRoot)\*.* *****************" />
        <Exec Command="ATTRIB -R /S $(SolutionRoot)\*.*" />
        <Ant TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildFile="$(SolutionRoot)\$(ApplicationName)\build-tfs-$(REGRorPROD).xml" BuildUri="$(BuildUri)" AntHome="C:\apache-ant-1.7.1" JavaHome="C:\Program Files\Java\jdk1.6.0_07" Flavor="%(ConfigurationToBuild.FlavorToBuild)" Platform="%(ConfigurationToBuild.PlatformToBuild)" Target="$(AntTarget)" Properties="BinariesRoot=$(BinariesRoot);BuildDefinitionName=$(BuildDefinitionName);BuildDefinitionUri=$(BuildDefinitionUri);BuildDirectory=$(BuildDirectory);BuildNumber=$(BuildNumber);DropLocation=$(DropLocation);LogLocation=$(LogLocation);SourceGetVersion=$(SourceGetVersion);TestResultsRoot=$(TestResultsRoot);TeamProject=$(TeamProject);WorkspaceName=$(WorkspaceName);WorkspaceOwner=$(WorkspaceOwner)" Condition="'$(REGRorPRODServer01)' == 'true'" />
        <Ant TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildFile="$(SolutionRoot)\$(ApplicationName)\build-tfs-$(REGRorPROD)02.xml" BuildUri="$(BuildUri)" AntHome="C:\apache-ant-1.7.1" JavaHome="C:\Program Files\Java\jdk1.6.0_07" Flavor="%(ConfigurationToBuild.FlavorToBuild)" Platform="%(ConfigurationToBuild.PlatformToBuild)" Target="$(AntTarget)" Properties="BinariesRoot=$(BinariesRoot);BuildDefinitionName=$(BuildDefinitionName);BuildDefinitionUri=$(BuildDefinitionUri);BuildDirectory=$(BuildDirectory);BuildNumber=$(BuildNumber);DropLocation=$(DropLocation);LogLocation=$(LogLocation);SourceGetVersion=$(SourceGetVersion);TestResultsRoot=$(TestResultsRoot);TeamProject=$(TeamProject);WorkspaceName=$(WorkspaceName);WorkspaceOwner=$(WorkspaceOwner)" Condition="'$(REGRorPRODServer02)' == 'true'" />
        <Ant TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildFile="$(SolutionRoot)\$(ApplicationName)\build-tfs-$(REGRorPROD)03.xml" BuildUri="$(BuildUri)" AntHome="C:\apache-ant-1.7.1" JavaHome="C:\Program Files\Java\jdk1.6.0_07" Flavor="%(ConfigurationToBuild.FlavorToBuild)" Platform="%(ConfigurationToBuild.PlatformToBuild)" Target="$(AntTarget)" Properties="BinariesRoot=$(BinariesRoot);BuildDefinitionName=$(BuildDefinitionName);BuildDefinitionUri=$(BuildDefinitionUri);BuildDirectory=$(BuildDirectory);BuildNumber=$(BuildNumber);DropLocation=$(DropLocation);LogLocation=$(LogLocation);SourceGetVersion=$(SourceGetVersion);TestResultsRoot=$(TestResultsRoot);TeamProject=$(TeamProject);WorkspaceName=$(WorkspaceName);WorkspaceOwner=$(WorkspaceOwner)" Condition="'$(REGRorPRODServer03)' == 'true'" />
        <Ant TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildFile="$(SolutionRoot)\$(ApplicationName)\build-tfs-$(REGRorPROD)-int.xml" BuildUri="$(BuildUri)" AntHome="C:\apache-ant-1.7.1" JavaHome="C:\Program Files\Java\jdk1.6.0_07" Flavor="%(ConfigurationToBuild.FlavorToBuild)" Platform="%(ConfigurationToBuild.PlatformToBuild)" Target="$(AntTarget)" Properties="BinariesRoot=$(BinariesRoot);BuildDefinitionName=$(BuildDefinitionName);BuildDefinitionUri=$(BuildDefinitionUri);BuildDirectory=$(BuildDirectory);BuildNumber=$(BuildNumber);DropLocation=$(DropLocation);LogLocation=$(LogLocation);SourceGetVersion=$(SourceGetVersion);TestResultsRoot=$(TestResultsRoot);TeamProject=$(TeamProject);WorkspaceName=$(WorkspaceName);WorkspaceOwner=$(WorkspaceOwner)" Condition="'$(REGRorPRODIntServer01)' == 'true'" />     
        <Ant TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildFile="$(SolutionRoot)\$(ApplicationName)\build-tfs-$(REGRorPROD)-int02.xml" BuildUri="$(BuildUri)" AntHome="C:\apache-ant-1.7.1" JavaHome="C:\Program Files\Java\jdk1.6.0_07" Flavor="%(ConfigurationToBuild.FlavorToBuild)" Platform="%(ConfigurationToBuild.PlatformToBuild)" Target="$(AntTarget)" Properties="BinariesRoot=$(BinariesRoot);BuildDefinitionName=$(BuildDefinitionName);BuildDefinitionUri=$(BuildDefinitionUri);BuildDirectory=$(BuildDirectory);BuildNumber=$(BuildNumber);DropLocation=$(DropLocation);LogLocation=$(LogLocation);SourceGetVersion=$(SourceGetVersion);TestResultsRoot=$(TestResultsRoot);TeamProject=$(TeamProject);WorkspaceName=$(WorkspaceName);WorkspaceOwner=$(WorkspaceOwner)" Condition="'$(REGRorPRODIntServer02)' == 'true'" />
        <Ant TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildFile="$(SolutionRoot)\$(ApplicationName)\build-tfs-$(REGRorPROD)-int03.xml" BuildUri="$(BuildUri)" AntHome="C:\apache-ant-1.7.1" JavaHome="C:\Program Files\Java\jdk1.6.0_07" Flavor="%(ConfigurationToBuild.FlavorToBuild)" Platform="%(ConfigurationToBuild.PlatformToBuild)" Target="$(AntTarget)" Properties="BinariesRoot=$(BinariesRoot);BuildDefinitionName=$(BuildDefinitionName);BuildDefinitionUri=$(BuildDefinitionUri);BuildDirectory=$(BuildDirectory);BuildNumber=$(BuildNumber);DropLocation=$(DropLocation);LogLocation=$(LogLocation);SourceGetVersion=$(SourceGetVersion);TestResultsRoot=$(TestResultsRoot);TeamProject=$(TeamProject);WorkspaceName=$(WorkspaceName);WorkspaceOwner=$(WorkspaceOwner)" Condition="'$(REGRorPRODIntServer03)' == 'true'" />
        <BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" Id="$(StepId)" Status="Succeeded" />
        <OnError ExecuteTargets="MarkBuildStepAsFailed" />
        <OnError ExecuteTargets="SendEmailForREGRorPRODdeployError;EmailOnTestBuildError;FailPartiallySucceededBuild;" />
      </Target>

    ...

    ...

     

    Here is the build log:

     Command:
      ATTRIB -R /S D:\Builds\Messaging\NewJavaBuildDefinition\Sources\*.*
    Done executing task "Exec".
    Task "Ant" skipped, due to false condition; ('$(REGRorPRODServer01)' == 'true') was evaluated as ('false' == 'true').
    Task "Ant" skipped, due to false condition; ('$(REGRorPRODServer02)' == 'true') was evaluated as ('false' == 'true').
    Task "Ant" skipped, due to false condition; ('$(REGRorPRODServer03)' == 'true') was evaluated as ('false' == 'true').
    Using "Ant" task from assembly "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\BuildExtensions\Microsoft.TeamFoundation.Build.Extensions.Tasks.dll".
    Task "Ant"
      JavaHome set to "C:\Program Files\Java\jdk1.6.0_07"
      Team Foundation Server 2008 MSBuild Ant Task v10.0.0.0
      Reseting the case of envionment variable "igw_loc" with "IGW_LOC"
      Reseting the case of envionment variable "cashcomp" with "CASHCOMP"
      Reseting the case of envionment variable "inoculan" with "INOCULAN"
      Reseting the case of envionment variable "comspec" with "ComSpec"
      Reseting the case of envionment variable "number_of_processors" with "NUMBER_OF_PROCESSORS"
      Reseting the case of envionment variable "processor_revision" with "PROCESSOR_REVISION"
      Reseting the case of envionment variable "temp" with "TEMP"
      Reseting the case of envionment variable "os" with "OS"
      Reseting the case of envionment variable "processor_architecture" with "PROCESSOR_ARCHITECTURE"
      Reseting the case of envionment variable "fp_no_host_check" with "FP_NO_HOST_CHECK"
      Reseting the case of envionment variable "itmthirdparty" with "ITMTHIRDPARTY"
      Reseting the case of envionment variable "path" with "Path"
      Reseting the case of envionment variable "pathext" with "PATHEXT"
      Reseting the case of envionment variable "vs90comntools" with "VS90COMNTOOLS"
      Reseting the case of envionment variable "processor_identifier" with "PROCESSOR_IDENTIFIER"
      Reseting the case of envionment variable "vs100comntools" with "VS100COMNTOOLS"
      Reseting the case of envionment variable "uatdata" with "UATDATA"
      Reseting the case of envionment variable "username" with "USERNAME"
      Reseting the case of envionment variable "itmlicense" with "ITMLICENSE"
      Reseting the case of envionment variable "processor_level" with "PROCESSOR_LEVEL"
      Reseting the case of envionment variable "tmp" with "TMP"
      Command:
      C:\Program Files\Java\jdk1.6.0_07\bin\java.exe -jar C:\apache-ant-1.7.1\lib\ant-launcher.jar -buildfile D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\build-tfs-REGR-int.xml -DBinariesRoot=D:\Builds\Messaging\NewJavaBuildDefinition\Binaries -DBuildDefinitionName=NewJavaBuildDefinition -DBuildDefinitionUri=vstfs:///Build/Definition/1368 -DBuildDirectory=D:\Builds\Messaging\NewJavaBuildDefinition -DBuildNumber=NewJavaBuildDefinition_1.0.0.0.16 -DDropLocation=\\CM-TFSBUILD\Staging\Messaging\SoaSuite\hl7 -DLogLocation= -DSourceGetVersion=C35616 -DTestResultsRoot=D:\Builds\Messaging\NewJavaBuildDefinition\TestResults -DTeamProject=Messaging -DWorkspaceName=CM-TFSBUILD_1368_ -DWorkspaceOwner=TMHP\TFSService run-deploy
      The "Ant" task is using "java.exe" from "C:\Program Files\Java\jdk1.6.0_07\bin\java.exe".
      Buildfile: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\build-tfs-REGR-int.xml
     
      clean:
     
      clean-reports:
     
      clean-all:
     
      pre-compile:
     
      compile-source:
          [mkdir] Created dir: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\classes
          [javac] Compiling 64 source files to D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\classes
          [javac] Note: Some input files use unchecked or unsafe operations.
          [javac] Note: Recompile with -Xlint:unchecked for details.
     
      prep-jar:
          [mkdir] Created dir: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy
          [mkdir] Created dir: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\import
           [copy] Copying 4 files to D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\import
     
      copy:
           [copy] Copying 2 files to D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\import
     
      jar:
            [jar] Building jar: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar
     
      deploy:
       [wldeploy] weblogic.Deployer -debug -verbose -upload -usenonexclusivelock -noexit -name MemberService -source D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar -targets wdCORC21int1 -adminurl t3://MyServer:14001 -user weblogic -password ******** -deploy
       [wldeploy] weblogic.Deployer invoked with options:  -debug -verbose -upload -usenonexclusivelock -noexit -name MemberService -source D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar -targets wdCORC21int1 -adminurl t3://MyServer:14001 -user weblogic -deploy
       [wldeploy] [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE version V1_4 deployments
       [wldeploy] [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at MyServer:14001, as user weblogic
       [wldeploy] [ServerConnectionImpl.getEnvironment():286] : setting environment
       [wldeploy] [ServerConnectionImpl.getEnvironment():289] : getting context using t3://MyServer:14001
       [wldeploy] [ServerConnectionImpl.getMBeanServer():237] : Connecting to MBeanServer at service:jmx:t3://MyServer:14001/jndi/weblogic.management.mbeanservers.domainruntime
       [wldeploy] [ServerConnectionImpl.getMBeanServer():237] : Connecting to MBeanServer at service:jmx:t3://MyServer:14001/jndi/weblogic.management.mbeanservers.runtime
       [wldeploy] [DomainManager.resetDomain():36] : Getting new domain
       [wldeploy] [DomainManager.resetDomain():39] : Using pending domain: true
       [wldeploy] [MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.TargetCache@76458f
       [wldeploy] [MBeanCache.addNotificationListener():103] : Added notification listener for weblogic.deploy.api.spi.deploy.mbeans.TargetCache@76458f
       [wldeploy] [MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@3c37f4
       [wldeploy] [MBeanCache.addNotificationListener():103] : Added notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@3c37f4
       [wldeploy] [ServerConnectionImpl.initialize():169] : Connected to WLS domain: wdCOR
       [wldeploy] [ServerConnectionImpl.setRemote():480] : Running in remote mode
       [wldeploy] [ServerConnectionImpl.init():159] : Initializing ServerConnection : weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl@5878d2
       [wldeploy] [BasicOperation.dumpTmids():706] : Incoming tmids:
       [wldeploy] [BasicOperation.dumpTmids():708] :   {Target=wdCORC21int1, WebLogicTargetType=server, Name=MemberService}, targeted=true
       [wldeploy] [BasicOperation.deriveAppName():140] : appname established as: MemberService
       [wldeploy] <Apr 12, 2011 4:41:50 PM CDT> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, MemberService [archive: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar], to wdCORC21int1 .>
       [wldeploy] [ServerConnectionImpl.upload():849] : Uploaded app to D:\Oracle\Middleware\user_projects\domains\wdCOR\servers\AdminServer\upload\MemberService
       [wldeploy] [BasicOperation.dumpTmids():706] : Incoming tmids:
       [wldeploy] [BasicOperation.dumpTmids():708] :   {Target=wdCORC21int1, WebLogicTargetType=server, Name=MemberService}, targeted=true
       [wldeploy] [BasicOperation.loadGeneralOptions():623] : Delete Files:false
       [wldeploy] Timeout :3600000
       [wldeploy] Targets:
       [wldeploy] wdCORC21int1
       [wldeploy] ModuleTargets={}
       [wldeploy] SubModuleTargets={}
       [wldeploy] }
       [wldeploy] Files:
       [wldeploy] null
       [wldeploy] Deployment Plan: null
       [wldeploy] App root: D:\Oracle\Middleware\user_projects\domains\wdCOR\servers\AdminServer\upload\MemberService
       [wldeploy] App config: D:\Oracle\Middleware\user_projects\domains\wdCOR\servers\AdminServer\upload\MemberService\plan
       [wldeploy] Deployment Options: {isRetireGracefully=true,isGracefulProductionToAdmin=false,isGracefulIgnoreSessions=false,rmiGracePeriod=-1,retireTimeoutSecs=-1,undeployAllVersions=false,archiveVersion=null,planVersion=null,isLibrary=false,libSpecVersion=null,libImplVersion=null,stageMode=null,clusterTimeout=3600000,altDD=null,altWlsDD=null,name=MemberService,securityModel=null,securityValidationEnabled=false,versionIdentifier=null,isTestMode=false,forceUndeployTimeout=0,defaultSubmoduleTargets=true,timeout=0,deploymentPrincipalName=null,useExpiredLock=false}
       [wldeploy]
       [wldeploy] [BasicOperation.execute():440] : Initiating deploy operation for app, MemberService, on targets:
       [wldeploy] [BasicOperation.execute():442] :    wdCORC21int1
       [wldeploy] Task 4 initiated: [Deployer:149026]deploy application MemberService on wdCORC21int1.
       [wldeploy] Operation is pending and will be activated or cancelled when the ongoing edit session is activated or cancelled.
       [wldeploy] [ServerConnectionImpl.close():332] : Closing DM connection
       [wldeploy] [ServerConnectionImpl.close():352] : Unregistered all listeners
       [wldeploy] [ServerConnectionImpl.closeJMX():372] : Closed JMX connection
       [wldeploy] [ServerConnectionImpl.closeJMX():384] : Closed Runtime JMX connection
       [wldeploy] [ServerConnectionImpl.closeJMX():396] : Closed Edit JMX connection
     
      run-deploy:
     
      BUILD SUCCESSFUL
      Total time: 6 seconds
    Done executing task "Ant".
    Task "Ant"
      JavaHome set to "C:\Program Files\Java\jdk1.6.0_07"
      Team Foundation Server 2008 MSBuild Ant Task v10.0.0.0
      Command:
      C:\Program Files\Java\jdk1.6.0_07\bin\java.exe -jar C:\apache-ant-1.7.1\lib\ant-launcher.jar -buildfile D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\build-tfs-REGR-int02.xml -DBinariesRoot=D:\Builds\Messaging\NewJavaBuildDefinition\Binaries -DBuildDefinitionName=NewJavaBuildDefinition -DBuildDefinitionUri=vstfs:///Build/Definition/1368 -DBuildDirectory=D:\Builds\Messaging\NewJavaBuildDefinition -DBuildNumber=NewJavaBuildDefinition_1.0.0.0.16 -DDropLocation=\\CM-TFSBUILD\Staging\Messaging\SoaSuite\hl7 -DLogLocation= -DSourceGetVersion=C35616 -DTestResultsRoot=D:\Builds\Messaging\NewJavaBuildDefinition\TestResults -DTeamProject=Messaging -DWorkspaceName=CM-TFSBUILD_1368_ -DWorkspaceOwner=TMHP\TFSService run-deploy
      The "Ant" task is using "java.exe" from "C:\Program Files\Java\jdk1.6.0_07\bin\java.exe".
      Buildfile: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\build-tfs-REGR-int02.xml
     
      clean:
         [delete] Deleting directory D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\classes
         [delete] Deleting directory D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy
         [delete] Deleting directory D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\import
     
      clean-reports:
     
      clean-all:
     
      pre-compile:
     
      compile-source:
          [mkdir] Created dir: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\classes
          [javac] Compiling 64 source files to D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\classes
          [javac] Note: Some input files use unchecked or unsafe operations.
          [javac] Note: Recompile with -Xlint:unchecked for details.
     
      prep-jar:
          [mkdir] Created dir: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy
          [mkdir] Created dir: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\import
           [copy] Copying 4 files to D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\import
     
      copy:
           [copy] Copying 2 files to D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\import
     
      jar:
            [jar] Building jar: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar
     
      deploy:
       [wldeploy] weblogic.Deployer -debug -verbose -upload -usenonexclusivelock -noexit -name MemberService -source D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar -targets wdCORC21int2 -adminurl t3://MyServer:14001 -user weblogic -password ******** -deploy
       [wldeploy] weblogic.Deployer invoked with options:  -debug -verbose -upload -usenonexclusivelock -noexit -name MemberService -source D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar -targets wdCORC21int2 -adminurl t3://MyServer:14001 -user weblogic -deploy
       [wldeploy] [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE version V1_4 deployments
       [wldeploy] [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at MyServer:14001, as user weblogic
       [wldeploy] [ServerConnectionImpl.getEnvironment():286] : setting environment
       [wldeploy] [ServerConnectionImpl.getEnvironment():289] : getting context using t3://MyServer:14001
       [wldeploy] [ServerConnectionImpl.getMBeanServer():237] : Connecting to MBeanServer at service:jmx:t3://MyServer:14001/jndi/weblogic.management.mbeanservers.domainruntime
       [wldeploy] [ServerConnectionImpl.getMBeanServer():237] : Connecting to MBeanServer at service:jmx:t3://MyServer:14001/jndi/weblogic.management.mbeanservers.runtime
       [wldeploy] [DomainManager.resetDomain():36] : Getting new domain
       [wldeploy] [DomainManager.resetDomain():39] : Using pending domain: false
       [wldeploy] [MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.TargetCache@76458f
       [wldeploy] [MBeanCache.addNotificationListener():103] : Added notification listener for weblogic.deploy.api.spi.deploy.mbeans.TargetCache@76458f
       [wldeploy] [MBeanCache.addNotificationListener():96] : Adding notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@3c37f4
       [wldeploy] [MBeanCache.addNotificationListener():103] : Added notification listener for weblogic.deploy.api.spi.deploy.mbeans.ModuleCache@3c37f4
       [wldeploy] [ServerConnectionImpl.initialize():169] : Connected to WLS domain: wdCOR
       [wldeploy] [ServerConnectionImpl.setRemote():480] : Running in remote mode
       [wldeploy] [ServerConnectionImpl.init():159] : Initializing ServerConnection : weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl@5878d2
       [wldeploy] [BasicOperation.dumpTmids():706] : Incoming tmids:
       [wldeploy] [BasicOperation.dumpTmids():708] :   {Target=wdCORC21int2, WebLogicTargetType=server, Name=MemberService}, targeted=true
       [wldeploy] [BasicOperation.deriveAppName():140] : appname established as: MemberService
       [wldeploy] <Apr 12, 2011 4:41:57 PM CDT> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, MemberService [archive: D:\Builds\Messaging\NewJavaBuildDefinition\Sources\MemberService\deploy\MemberService.jar], to wdCORC21int2 .>
       [wldeploy] [ServerConnectionImpl.upload():849] : Uploaded app to D:\Oracle\Middleware\user_projects\domains\wdCOR\servers\AdminServer\upload\MemberService
       [wldeploy] [BasicOperation.dumpTmids():706] : Incoming tmids:
       [wldeploy] [BasicOperation.dumpTmids():708] :   {Target=wdCORC21int2, WebLogicTargetType=server, Name=MemberService}, targeted=true
       [wldeploy] [BasicOperation.loadGeneralOptions():623] : Delete Files:false
       [wldeploy] Timeout :3600000
       [wldeploy] Targets:
       [wldeploy] wdCORC21int2
       [wldeploy] ModuleTargets={}
       [wldeploy] SubModuleTargets={}
       [wldeploy] }
       [wldeploy] Files:
       [wldeploy] null
       [wldeploy] Deployment Plan: null
       [wldeploy] App root: D:\Oracle\Middleware\user_projects\domains\wdCOR\servers\AdminServer\upload\MemberService
       [wldeploy] App config: D:\Oracle\Middleware\user_projects\domains\wdCOR\servers\AdminServer\upload\MemberService\plan
       [wldeploy] Deployment Options: {isRetireGracefully=true,isGracefulProductionToAdmin=false,isGracefulIgnoreSessions=false,rmiGracePeriod=-1,retireTimeoutSecs=-1,undeployAllVersions=false,archiveVersion=null,planVersion=null,isLibrary=false,libSpecVersion=null,libImplVersion=null,stageMode=null,clusterTimeout=3600000,altDD=null,altWlsDD=null,name=MemberService,securityModel=null,securityValidationEnabled=false,versionIdentifier=null,isTestMode=false,forceUndeployTimeout=0,defaultSubmoduleTargets=true,timeout=0,deploymentPrincipalName=null,useExpiredLock=false}
       [wldeploy]
       [wldeploy] [BasicOperation.execute():440] : Initiating deploy operation for app, MemberService, on targets:
       [wldeploy] [BasicOperation.execute():442] :    wdCORC21int2
       [wldeploy] Task 5 initiated: [Deployer:149026]deploy application MemberService on wdCORC21int2.
       [wldeploy] Task 5 completed: [Deployer:149026]deploy application MemberService on wdCORC21int2.
       [wldeploy] Target state: deploy completed on Server wdCORC21int2
       [wldeploy]
       [wldeploy] Target Assignments:
       [wldeploy] + MemberService  wdCORC21int2
       [wldeploy] [ServerConnectionImpl.close():332] : Closing DM connection
       [wldeploy] [ServerConnectionImpl.close():352] : Unregistered all listeners
       [wldeploy] [ServerConnectionImpl.closeJMX():372] : Closed JMX connection
       [wldeploy] [ServerConnectionImpl.closeJMX():384] : Closed Runtime JMX connection
       [wldeploy] [ServerConnectionImpl.closeJMX():396] : Closed Edit JMX connection
     
      run-deploy:
     
      BUILD SUCCESSFUL
      Total time: 12 seconds
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018: The "Ant" task failed unexpectedly.
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Client.BuildInformationNode.GetRequests()
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Client.BuildInformationNode.GetRequests()
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Client.BuildInformationNode.Save()
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Client.ConfigurationSummary.Save()
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Extensions.Tasks.TeamBuildToolTask.AfterExecute(Boolean success)
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Extensions.Tasks.Ant.AfterExecute(Boolean success)
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Extensions.Tasks.TeamBuildToolTask.Execute()
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.TeamFoundation.Build.Extensions.Tasks.Ant.Execute()
    D:\Builds\Messaging\NewJavaBuildDefinition\BuildType\TFSBuild.proj(242,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
    Done executing task "Ant" -- FAILED.
    Done building target "AfterCompile" in project "TFSBuild.proj" -- FAILED.





     


    Thursday, April 14, 2011 5:15 PM

Answers