SLAM configuration issues

Feb 9, 2009 at 3:56 PM
Hello Slammers

Hard to believe I will be the first to post something on these board, I certainly hope that this doesn't mean this tool is not functioning because by concept alone its the single most useful thing I have ever seen for SharePoint.

I have a fairly simple issue, basicaly I have not been able to establish a connection to my database using the Slam config file.

Just for reference.

I'm using MOSS 2007 with SQL server 2008.

I'm pretty familiar with connection strings and connecting to database's so I don't believe the issue is that my connection string is incorrect.  There appears to be some sort of other issue, however the only error I'm getting is

Database connection could not be established.

Unmatched Types
Sharepoint - Customer Contact (Could not open Site)

The configuration file looks like this (see below) (I have changed user ID and password for the database for security reasons).

The question is are there any issues with using this under SQL 2008?  I also noted that on this site http://itbloggen.se/cs/blogs/diaznet/archive/2009/02/01/sharepoint-list-association-manager-slam.aspx there is a note by one of the bloggers that there was a known issue with the installation of SLAM.  Coincidenly I'm using version 1.1.1 (the current release version).

Any help would be greatly apprciated.

Regards

Chris

<?

 

xml version="1.0" encoding="utf-8" ?>

 

<

 

Configuration>

 

<

 

ConnectionStrings Default="SLAM">

 

<

 

add Name="SLAM" ConnectionString="Database=slam;Data Source=MA-MOSS01;User Id=myID;Password=Mypassword" />

 

</

 

ConnectionStrings>

 

<

 

DataMapping DataSchema="SLAM">

 

<

 

List Site="Sharepoint" Name="Customer Contact" ActivationOrder="1">

 

<

 

Fields>

 

<

 

Field Name="Company Name" SqlType="varchar(255)" SPType="Text" Required="true"></Field>

 

</

 

Fields>

 

</

 

List>

 

</

 

DataMapping>

 

</

 

Configuration>


 

Developer
Feb 9, 2009 at 5:39 PM
Edited Feb 9, 2009 at 5:39 PM
We have improved the installation process quite a bit in the last week but your particular issue doesn’t appear to be an error per se.  SLAM Control Panel's Validate Configuration in release 1.1.2 was displaying a message after simply calling DataContext.DatabaseExists(). So, in your case, it was clearly not able to open the database. This call of course just returns a boolean, which is obviously not as helpful as it could be. In response to your issue we have changed this test to not simply check if it can open the database but instead try to run a query against it. Any resulting exceptions are displayed if any are thrown with the connection error message. This will tell you right away what the underlying issue is, whether you might have a login problem, database doesn't exist etc. Hopefully this will reveal right away how to resolve your issue.  In either case please let us know how you make out.

Please download Release 1.1.3 and run the setup to repair/update it. The Source is also up to date under Release and in SVN.

Thanks especially for your feedback,
-Brian


Feb 11, 2009 at 9:23 AM
Edited Feb 11, 2009 at 9:25 AM
Thanks Brian for the quick response and extremly helpful fix.

You were correct, as soon as I saw the error messages provided in the 1.1.3 version I found a problem with the user ID permissions (it was an authentication issue that was causing the database connection to fail).  Just for the record, it doesn't appear to be possible to use NT (windows) authentication ID's, you must have a SQL ID´, not sure if thats mentioned anywhere but its worth noting.

Now I've got my database connection but I still seem to be having a problem setting up the list/table matching. 

I'm doing really simple matching here, my config file looks like this

<?

 

xml version="1.0" encoding="utf-8" ?>
<
Configuration>
<
ConnectionStrings Default="SLAM">
<
add Name="SLAM" ConnectionString="Database=slam;Data Source=MA-MOSS01;User Id=sa;Password=mypassword" />
</
ConnectionStrings>
<
DataMapping DataSchema="SLAM">
<
List Site="Home/Sales" Name="Customer Contact" ActivationOrder="1">
<
Fields>
<
Field Name="Company Name" SqlType="varchar(255)" SPType="Text" Required="true"></Field>
</
Fields>
</
List>
</
DataMapping>
</
Configuration>

 

 


I have tried a couple of variations but I always get the same error (below).  the issue seems to be finding the site, I believe the List Site field is the culprit.  I have tried just sales, just home etc.. and I cant seem to find it.  The list name, and field information is all correct, I mean most of this stuff is pretty straightforward I think so there may be another problem here I just can see.

Unmatched Types
Home/Sales/ - Customer Contact (Could not open Site)

Just as a note if I do remove the List Site field all together the error message reporting (below) as followed.  This seems to say that the 'Type' is not correct.  I'm assuming its refering to the type of list (aka in this case just a simple custom).  I have tried variations here as well with little luck.  It refers to 'Value' does not fall within expected range, I guess the question specificaly what is a expected range look like, I mean what the expectation since this is supposed to just be a name of a particular MOSS list?

Thanks again for any help Brian, maybe you can shed some light here.  This might be a good way to express additional information for future users trying to get setup with SLAM.

 
Type: Customer Contact
Exception: System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPListCollection.GetListByName(String strListName, Boolean bThrowException) at Microsoft.SharePoint.SPListCollection.get_Item(String strListName) at AWS.SLAM.Administration.SLAMControlPanel.<>c__DisplayClass3.<onvalidate />b__0()
Unmatched Types
Customer Contact


Developer
Feb 11, 2009 at 8:06 PM
I just tried using a connection string with Integrated Security=SSPI instead of a user id and password and it worked just fine for me, in the end SLAM is not doing something unique with connection strings so valid connection strings in other circumstances in context of your SharePoint site should work with SLAM.

Just to be clear, in SLAM the term Type generally refers to the "configured type" which can either be a List or a Content Type.  It is really just a general term for things that can be managed by SLAM.  So in the error you receive it first shows the type it was processing when it ran into the error then it gives the actual error.  If you remove the Site attribute altogether SLAM looks for the List in the root site of the site collection.  In this case it cannot find the "Customer Contact" list in the root site.  The value of the Site attribute contains a Site name like "Home" if Home is a site in your site collection or "Home/Sales" if Sales is a site under the "Home" site which is under the root site.  So if the site in your example is correct when navigating to it you would be going to "http://mysharepointsite.com/Home/Sales/".  If that is not the case then Home/Sales isn't the right name.  If it is, try it without the trailing slash.

I also recommend downloading SLAM v1.1.4 if you have no already.  We are continually making improvements especially to the control panel to make this process easier.

Thanks,
-Brian
Feb 12, 2009 at 12:53 PM
I apologize if I come off a bit slow, but I'm just not getting this and I'm generaly considered pretty clever.  Perhaps if I give you more information you might be better able to break this down for me.

I've tried every combination I could think of to match things up with the sharepoint site in the configuration file but either Im doing something wrong (most likely) or there might actually be a problem here. 

I'm simply not finding the site.  I have tried every concievable comibination for the Site field, including removing it completetly and I continue to get a 'Unmatched Type" Customer Contact

The Sites location is

http://ma-moss01/sites/sharepoint/sales/default.aspx

Which leads me to believe that this line

<

 

List site="sales" Name="Customer Contact" ActivationOrder="1">

Should be either sales or sharepoint/sales or sites/sharepoint/sales or some combination of which I have tried every one I could think of and it always returns the same error.

I'm not sure what else it could be, are there any other parameters or assumptions that SLAM makes?

Not really sure where to go from here, the config file is pretty straightforward, I find it hard to believe that what I have tried isnt working.

Any suggestions?

Feb 12, 2009 at 2:58 PM
Edited Feb 12, 2009 at 2:59 PM
I also wanted to mention that at some point it actually created the tables in the SLAM database for which I recieved errors for matching when validating.  The tables had no data in them and when I added data to the list it did not sync (no data in the table).  I realized later that the act of de-activating and re-activating was the cause of that table being created.  The synchranization is not there however.  I don't know if thats helpful but I suppose its hard to tell what information might be helpful.

Developer
Feb 12, 2009 at 5:39 PM
From the site URL you gave it looks like you are using managed paths.  We have never tried to set up SLAM under managed paths so I would like to try to reproduce your situation on my end as best as possible.  Is "sites" the default wildcard inclusion path?  And is "sharepoint" then just a site collection under?  If so I would expect Site="sales" to work, but I do not know how managed paths affects getting SPWeb references.  I know you tried this but what you last pasted has "site=..."  Unfortunately XML is case-sensitive and while I do not know if that has been causing a problem either, it's possible you tried the right value but without the right casing for the attribute.  I know this sort of issue has caused me grief many many times in the past. 

For guidance, in the end SLAM is using the value in Site to open an SPWeb from the AllWebs collection of the SPSite it is in.  So basically the value that goes in Site is the same value you would use if you were getting an SPWeb object for that site from the site collections AllWebs collection.  What values you can use here can also be seen if you were to check SPSite.AllWebs.Names.  After setting up a site similar to your environment this will be the first thing I will check.

Sorry you are still running into problems, hopefully this is an issue with using SLAM under managed paths and we can figure out how to deal with them.

Thanks,
-Brian
Feb 13, 2009 at 2:11 PM
Thank you so much for all your help Brian.  Honestly I think this application is absoutly worth the trouble to try to get going, I can't say enough about the amount of problems this will resolve for me if I can get it working.

I assumed case sensitivity and always verified it so I don't think this is the issue.

You have it correct, Site is the default inclusion path and SharePoint is the Site collection under it.  There are two seperate sites (HOME & SALES), Home is the first and sales is the subsite.  I have tried the paths in every conceivable way always verifying case sensitivity so I don't think this is the issue.

It may in fact be an issue with managed paths, but this is a common way to use SharePoint (internal) so if that is the issue its definitly worth looking into.

However I suspect a permissions issue.

I know that the connection string is working fine, verified by the fact that when I do an re-activation of SLAM it takes the configuration file, makes the connection and generates the tables as shown in the configuration file.  However the data is not transfered over which means it either didn't find the sharepoint site (as you mentioned possibily a managed path related issue) or the ID I'm using is not able to log into the sharepoint site.  That really shouldn't be the problem but I will verify it and get back to you probobly on Monday (because its about beer:30 here in Sweden so I will be vanishing very soon).

Thanks again for all your help Brian, really appriciate it and keep up the great work, I'm sure I speak for the entire sharepoint community that what you are doing is pushing this application forward by leaps and bounds.

Regards

Chris
Developer
Feb 13, 2009 at 4:23 PM
I tried some things on my end and noticed at least one issue right away.  Our feature that sets up the link to the SLAM Control Panel on site settings sets the link to be "/_layouts/..".  I had set upon a site collection under /sites/, went to site settings, hit the SLAM Control Panel link and instead of going to /sites/sitecollection/_layouts/... it went to /_layouts/ as expected with the URL set as it is.  On my environment I have many types configured in the root site collection and when I click the link to go to the Control Panel all of the types in the root show as matching with the one I added under the new site collection not matching.  I changed the link for the SLAM Control Panel to "_layouts/..", did it again and saw that it was matching the one from the new site collection and none for the root.  I suggest checking to see when you click the link if it goes to the layouts under the right site collection.  If it does you can try going to /sites/sharepoint/_layouts/SLAM/SLAMControlPanel.aspx and see if it will finally match it when the config has Site="Sales" for your List.  I will certainly be fixing this soon in the SLAM release so that the link goes to the relative _layouts location and not the root, which obviously causes problems when setting up SLAM under a non-root site collection.

Thanks,
-Brian
Feb 16, 2009 at 2:57 PM
Hi Brian

Great News!!!

You where right on the money, it does appear their was an issue with linking to the correct control panel.  The default panel for SLAM at the moment takes you to your personal  MY SITE area even if you enter the panel from the Top Level of the Site.  I found that when I validated the configuration from the appropriate link, in my case    sites/sharepoint/sales/_layouts/SLAM/SLAMControlPanel.aspx it immediatly matched my configuration.

I did have issues authenticating to the site via Windows Authentication, but I'm certain thats a permission issue which I will be able to resolve, but I was able to complete the creation of tables and the data is there so the link is complete.

You have no idea how much I'm looking forward to FINALY creating related tables/lists.  That solves a lot of problems for me in particular as it effects various forms.

Just a quick question regarding the tables it creates.

I noticed that after the link was established that the records that already existed in the list did not appear.  It appears that the data cannot be reverse engineered.  How would you suggest syncing the data with the SQL table's data? 

I know that you can do it record by record by simply saving each records but some of the data I'm migrating that Im hoping to use SLAM with is substantial so manually updating each record would be pretty time consuming.

Regards

Chris
Developer
Feb 25, 2009 at 10:02 PM
About the tables created by SLAM not containing data after creation: SLAM creates tables on activation and it also does so on synchronization if tables for configured types are missing.  Synchronization is a new feature included in the 1.1.5 release.  You will see that the Control Panel is reorganized a bit but if you click on Activation on the Control Panel you will see the options to Activate, Deactivate, and Synchronize.  Activate does the same thing that Activate/Reactivate did in previous releases and synchronization does the resync of data in SharePoint with SLAM's database.

If you have a substantial amount of data you would like to get into SLAM then I highly suggest getting the latest release.

Thanks again for your feedback,
-Brian