Problem deploying BAM from VS 2010

Topics: General Questions, Server Deployment, Visual Studio Integration
Mar 23, 2011 at 10:30 PM

Hi there

I am having some troubles deploying my biztalk solution in my local environment using the VS2010 plug-in , the problem starts when the framework tries to deploy the BAM files, first it performs an export from the Excel and later it takes the generated XML file to perform the deploy, the problem I am having is the exported file is bad formed:

 ERROR: The given BAM definition file does not contain a valid XML.
  Unexpected end of file while parsing Name has occurred. Line 507, position 12.

when I checked the XML file, effectively, the XML is bad formed:

...........................................................................................................................................................................................................

<Alias Name="MessageID" ID="IDB8152812463C4C62B4D6D5563FBEB92A">
                <CheckpointRef>ID8289F90E2D4B4DFE9E8758B65E29BC32</CheckpointRef>
            </Alias>
            <Alias Name="Placed" ID="ID2BDED681004A492E9FDDA22DE983D3F0">
                <CheckpointRef>ID14D3B4FCA08D48FD897DDDBFBCC4221B</CheckpointRef>
            </Alias>
            <Alias N   <--- the XML ends here

.................................................................................................................................................................................................................

the executed lines below generates the XML which is used by the btdf to perform the deploy:

**********************************************

ExportBAMXMLFromXLS:
  "C:\Program Files\Deployment Framework for BizTalk\5.0\Framework\DeployTools\ExportBamDefinitionXml.exe" "H:\Projects\AW\Deployment\SE\BizTalk\CapGemini.Adecco.AW.Bts.SE\CapGemini.Adecco.AW.Bts.SE\BAM\BAMSE.xlsx" "..\CapGemini.Adecco.AW.Bts.SE\BAM\\BAMSE.xml"
  BizTalk BAM Definition XML Exporter 2.1.0
  [http://GenerateTypedBamApi.codeplex.com/]
  Copyright (C) 2007-08 Darren Jefford and 2008-10 Thomas F. Abraham
 
  Exporting BAM XML Definition from the Excel Spreadsheet... Success
 
  Wrote BAM XML to '..\CapGemini.Adecco.AW.Bts.SE\BAM\\BAMSE.xml'.

**********************************************

I Opened the excel file and I performed the exportation manually and the resulted file is well formed, what could be the problem ? the file contains several activities linked to only one single view. We are using VS2010 with excel 2010 ( .xlsx extension).

Any help with this is welcome !

Thanks

Julian R Berlin

Coordinator
Mar 25, 2011 at 6:39 AM

Hi Julian,

Sorry it took a while to reply.  I imagine this is your issue.

For now you could override the default export implementation in your .btdfproj:

 <Target Name="ExportBAMXMLFromXLS" Condition="'$(IncludeBAM)' == 'true' and '$(Configuration)' != 'Server'">
   <Exec Command="&quot;$(DeployTools)\ExportBamDefinitionXml.exe&quot; &quot;%(BamDefinitionsQualified.FullPath)&quot; &quot;@(BamDefinitions->'%(LocationPath)\%(Filename).xml')&quot; True" />
 </Target>

I've added "True" at the end to cause the export to occur using OLE automation of Excel instead of OLE DB (just slower and more overhead, and requires Excel to be installed).

I'll see if it can be fixed for the final 5.0 release, though currently I have no sample BAM models big enough to overflow into a second cell, so I'll have to try to create one.

Thanks,
Tom

Mar 28, 2011 at 1:45 PM

Hi Tom

Thanks a lot for your answer, I'll try what you mentioned above !

Julian

Mar 28, 2011 at 8:46 PM

Hi Tom

I followed your recommendations, but it didn't work ,in wich section of the BTDFProj file should put that tarjet ?

thanks a lot again !

Julian

Mar 28, 2011 at 9:09 PM

Hi again,

It worked but I modified the original file of the framework, the override didn't work out. perhaps i put in a wrong section. I attached my btdfproj file below:

<?xml version="1.0" encoding="utf-8"?>
<!--
  Deployment Framework for BizTalk 5.0
  Copyright (C) 2008-2010 Thomas F. Abraham and Scott Colestock
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Deploy">
 
  <PropertyGroup>
    <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
    <Platform Condition="'$(Platform)' == ''">x86</Platform>
    <SchemaVersion>1.0</SchemaVersion>
    <ProjectName>CapGemini.Adecco.AW.Bts.SE</ProjectName>
    <ProjectVersion>1.0</ProjectVersion>
    <IncludeSchemas>false</IncludeSchemas>
    <IncludeOrchestrations>true</IncludeOrchestrations>
    <IncludeSSO>true</IncludeSSO>
    <IncludeBAM>true</IncludeBAM>
    <IncludeTransforms>false</IncludeTransforms>
    <IncludePipelines>false</IncludePipelines>
    <IncludeComponents>true</IncludeComponents>
    <IncludePipelineComponents>false</IncludePipelineComponents>
    <IncludeCustomFunctoids>false</IncludeCustomFunctoids>
    <IncludeVocabAndRules>false</IncludeVocabAndRules>
    <IncludeVirtualDirectories>false</IncludeVirtualDirectories>
    <IncludeMessagingBindings>true</IncludeMessagingBindings>
    <IncludeDeploymentTest>false</IncludeDeploymentTest>
    <Includelog4net>false</Includelog4net>
    <SkipIISReset>true</SkipIISReset>
  </PropertyGroup>
 
  <PropertyGroup>
    <!-- Properties related to building an MSI for server deployments -->
    <ProductId>bf57f68f-3006-4c8c-b721-e3e2f9431ebb</ProductId>
    <ProductUpgradeCode>c8660ab9-a75d-4d48-94f2-ccdbc8e74734</ProductUpgradeCode>
    <ProductName>CapGemini.Adecco.AW.Bts.SE</ProductName>
    <ProductVersion>1.0.0</ProductVersion>
    <Manufacturer>Capgemini</Manufacturer>
    <PackageDescription>CapGemini.Adecco.AW.Bts.SE</PackageDescription>
    <PackageComments>CapGemini.Adecco.AW.Bts.SE</PackageComments>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <OutputPath>bin\Debug\</OutputPath>
    <DeployPDBsToGac>false</DeployPDBsToGac>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <OutputPath>bin\Release\</OutputPath>
    <DeployPDBsToGac>false</DeployPDBsToGac>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Server'">
    <DeploymentFrameworkTargetsPath>Framework\</DeploymentFrameworkTargetsPath>
    <!-- Get our PDBs into the GAC so we get file/line number information in stack traces. -->
    <DeployPDBsToGac>false</DeployPDBsToGac>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)' == 'Development'">
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <OutputPath>bin\Release\</OutputPath>
    <DeployPDBsToGac>false</DeployPDBsToGac>
  </PropertyGroup>


 
  <!--Orchestrations that must be deployed -->

  <ItemGroup>
    <Orchestrations Include="$(ProjectName).dll">
      <LocationPath>..\$(ProjectName)\bin\$(Configuration)</LocationPath>
    </Orchestrations>
  </ItemGroup>

  <!--Assemblies/interops that must be deployed in the GAC-->
 

  <!--Assemblies/interops that must be deployed in the GAC-->
   <ItemGroup>
     <Components Include="Interop.BizTalkNO.dll">
      <LocationPath>..\..\..\..\..\GAC_Assemblies</LocationPath>
    </Components>
  </ItemGroup>

  <ItemGroup>
    <Components Include="Interop.NordicsBizTalkIEMV01.dll">
      <LocationPath>..\..\..\..\..\GAC_Assemblies</LocationPath>
    </Components>
  </ItemGroup>

  <!--BAM definitions and other related files-->

  <ItemGroup>
    <BamDefinitions Include="BAMSE.xlsx">
      <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
    </BamDefinitions>
  </ItemGroup>

  <ItemGroup>
    <BamTrackingProfiles Include="BAMSE_ExportAssociate.btt">
      <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
    </BamTrackingProfiles>
  </ItemGroup>

  <ItemGroup>
    <BamTrackingProfiles Include="BAMSE_ExportVacancy.btt">
      <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
    </BamTrackingProfiles>
  </ItemGroup>

  <ItemGroup>
    <BamTrackingProfiles Include="BAMSE_ImportAssociate.btt">
      <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
    </BamTrackingProfiles>
  </ItemGroup>

  <ItemGroup>
    <BamTrackingProfiles Include="BAMSE_ImportExternalRelation.btt">
      <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
    </BamTrackingProfiles>
  </ItemGroup>

    <ItemGroup>
        <BamTrackingProfiles Include="BAMSE_ImportTimeSheet.btt">
            <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
        </BamTrackingProfiles>
    </ItemGroup>

    <ItemGroup>
        <BamTrackingProfiles Include="BAMSE_ImportTimeSheet_LOG.btt">
            <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
        </BamTrackingProfiles>
    </ItemGroup>

  <ItemGroup>
    <BamTrackingProfiles Include="BAMSE_ImportTimeSheet_ACK.btt">
      <LocationPath>..\$(ProjectName)\BAM\</LocationPath>
    </BamTrackingProfiles>
  </ItemGroup>
 
 

  <!--References to other biztalk applications-->

  <ItemGroup>
    <AppsToReference Include="Capgemini.Adecco.AW.Bts.TA" />
  </ItemGroup>

 
  <!--Vocabularies and policies, note you first have to import the vocabularies and rules -->


  <ItemGroup>
    <!-- We are asking the Deployment Framework to create MSBuild properties from the values
        in our environment settings file that are named here. ssoAppUserGroup and ssoAppAdminGroup
        should be supplied if they need to be different for SSO app creation than the defaults
        specified in BizTalkDeploymentFramework.targets -->
    <PropsFromEnvSettings Include="ssoAppUserGroup;ssoAppAdminGroup;BAMViewsAndAccounts" />
  </ItemGroup>

  <Target Name="ExportBAMXMLFromXLS" Condition="'$(IncludeBAM)' == 'true' and '$(Configuration)' != 'Server'">
    <Exec Command="&quot;$(DeployTools)\ExportBamDefinitionXml.exe&quot; &quot;%(BamDefinitionsQualified.FullPath)&quot; &quot;@(BamDefinitions->'%(LocationPath)\%(Filename).xml')&quot; True" />
  </Target>

  <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.targets" />
  <!--
    The Deployment Framework automatically packages most files into the server install MSI.
    However, if there are special folders or files that you need to include in the MSI, you can
    copy them to the folder $(RedistDir) in the CustomRedist target.
  -->
  <Target Name="CustomRedist">
  </Target>
</Project>

 

Any help is welcome!

Thanks a lot !!

Coordinator
Mar 28, 2011 at 10:53 PM

Hi Julian,

You were very close to the right spot...  it should go after the <Import> element, otherwise the matching base target has not been defined yet during parsing.  The CustomRedist target is basically the same principle; it is defined as an empty target in the imported file and you are overriding it.

Thanks,
Tom

Mar 30, 2011 at 5:35 PM

hi tom

thanks a lot, it worked out !!

Julian

Coordinator
Mar 30, 2011 at 5:43 PM

OK, great.  Hopefully I can find time to create a huge BAM model for testing and get the default export method working properly before the final 5.0 release.

Thanks,
Tom