Thursday, July 12, 2007

Feature '75a0fea7-12fe-4cad-a1b2-525fa776c07e' is not installed in this farm, and can not be added to this scope.

I got this error today while attempting to add a new site to a WSS 3.0 Site collection. I was attempting to add the Knowledge Base application template, but found quickly that the issue was applying to all application templates. You know, all the .wsp files. I've seen a few people asking how to fix this but no one found a solution, what ended up working was actually quite simple. This error comes up when the ApplicationTemplateCore.wsp(ATC) does not install correctly.
When I installed all the .wsp's I in my infinite amounts of laziness created a batch file, which I must admit made installing all 20 of them much easier. I'm sure I'm not the only one who did it that way, and the problem with that is that if you don't watch while its executing you'll miss any problems that come up. I copied the syntax for creating the ATC from the readme they supplied, is there no bounds to my usage of shortcuts? It turns out that it contains a character someplace thats pretending to be something else. The command looks right but when you execute it you'll get a command line error. The rest of the .wsp's will install, and you'll be able to select them, but without the ATC installed you will get the "Feature '75a0fea7-12fe-4cad-a1b2-525fa776c07e' is not installed in this farm, and can not be added to this scope." error. Simply go back, and do this:

stsadm -o addsolution -filename c:\"template directory"\ApplicationTemplateCore.wsp
stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment -immediate

(that syntax should have all the correct characters)

Saturday, June 30, 2007

Sharepoint: How did i get here and where are my pants?

Well, I have been tasked with my first sharepoint upgrade job. I tested on our staging server and was actually able to get a WSS 2.0 site running on sharepoint 2007, sort of. It was the "I can see the homepage, but why am I locked out of everything else" sort of running. My initial instinct was that WSS was tied closely enough into Active Directory so that when I imported the Database into a new domain it didnt set the permissions correctly. I still don't know if that hypothesis is correct, but my fingers are tightly crossed.

So the client gave me his server for the weekend, no one could access it and I had free reign to get clunky old WSS 2.0 upgraded to the mean machine of MOSS 2007. Free reign turned more into a nightmare with many virtual pointy objects causing me much pain. Nothing went smoothly. At all. The upgrade began poorly when WSS 3.0 refused to configure correctly. I used the stsadm to force the configuration. Configuration is odd, it fails because WSS 2.0 is missing a feature of 3.0, well, yeah, thats why they made 3.0. So I had to force the upgrade so I could add the feature in manually. That got me a few feet, and opened the door to the second level of hell. Nothing seemed to work properly, and the IIS structure from 2.0 to 3.0 is totally different, with no mention of this from Microsoft I really am getting concerned.

My next magic trick was surely an interesting one. I kicked off the next upgrade to sharepoint server 2007. This actually went rather well, requiring a manual forced upgrade of course, but otherwise ok. At this point with some tweaking of IIS I got the original site to come up. But not really. I would just get an error "Invalid List Template". Well a whole lotta good that did. Unfortunately I couldnt get anywhere to actually change that list, and was more or less at a standstill. Until my next decision. The one that made it worse. I decided I would go ahead and uninstall all semblances of Sharepoint 3.0. That turned into a disaster. Sharepoint is less than friendly when it comes to uninstalling. I found that actually removing the physical files under the /12 folder i was then able to remove sharepoint 2007 and then WSS 3.0 soon followed.

With a nonfunctional sharepoint 2.0 application as well, I finally today found a solution. I installed WSS 3.0 as a side by side installation to WSS 2.0. I'm finding that this will interfere with a alot less and also allow you to get a functional WSS 3.0 server going. At this point I was able to create a new application using the backed up database as its content DB. WSS 3.0 successfully made all the changes necessary and the site functions well.

Lessons Learned.

1. In place upgrades are a monster, so many things can simply go wrong. I would stay away from these in the future. I think my stress level would have been much lower if i knew that I had an untouched working 2.0 site still there in case my efforts turned futile by deadline. At least then there would have been something up and running. So the best bet is actually to have more than one server to do this on, but if you are like me and stuck on one server, do a side-by-side.

2. Uninstalling is a nightmare. The uninstaller will do things like uninstall halfway, rollback because of a failure, but only sort of rollback. It will not recreate the configuration database it destroyed. If you need to uninstall but it fails, simply remove the files and run it, it should work then.

3. SharePoint is domain picky. Extremely. My original hypothesis turned out correct. When i was able to upgrade the DB to WSS 3.0 on the server which sat on the correct AD, everything worked, all my lists were accessible. When doing the database migration upgrade make sure your computers are on the same domain, or you'll have lots of fluky behavior.

I've blocked out more that I've learned about IIS and how sharepoint interacts with it. As I go further I'll try to flesh out more of how this works, but right now i'm not really sure what I did some of the times, which is scary.

Next... Upgrading to full MOSS 2007

Thursday, June 28, 2007

.NET and NHibernate, where do i begin?

So I've begun my foray into the world of NHibernate as an Ormapper. I've found it takes quite a learning curve, and as I'm not one to usually take a shortcut I found that using a code generator to create all the NHibernate files was really less of a shortcut and more of a good learning tool. It turns out that the documentation over at while being rather extensive is less than inviting to new users. It lays out a basic mapping, and then jumps right into the jargon. Leaving you easily confused of what to do next.

This is where a code generator came in rather handy. I first attempted codesmith as I've used it in the past and felt it is a well built product. Luckily I only used the demo as at this time the templates for NHibernate are rather shoddy and it would have not been prudent to purchase it. A friend of mine who is also trudging through this mud with me found MyGenerator, a java based code generator with some nice NHibernate templates built for it. We got this running and found that the template worked rather well. At this point simply examining the code and mappings generated gave more insight into what we should learn about than simply reading the documentation.

So now I find myself knee deep in NHibernate muck. Add that to my experimentation and study of Sharepoint 2007 and I've got enough .NET to keep me happy, or rather at least busy for some time. If you are actually reading this blog, i'm impressed, somehow I crawled out of the dark shadows of the internet into someones eyesight. Hopefully my writing will get more insightful and maybe a little humours... It will help if I don't post in the wee hours. So from here on in we'll adventure through the wonderful world of whatever I fancy.