Well after some search SPMarcel (short for SharePoint Marcelleke) has found a solution to a problem that we had.
I’m currently working with a client that needed a parser that parsed all kinds of different files and retrieve the information accordingly. While defining the site structure with a colleague is where the problems began.
They need a lookup in the same site BUT also needing a lookup to the parentsite.
Needless to say that this is quite hard to realize. When building an STP the lookup is to the document library of the site where you pulled the STP from. Also building the solution via Code or CAML didn’t prove a solution so we had to make descissions cancelling a few lookups.
So on we went building the site. We used Solution Generator which proved to be a great tool.
We are now at the point that we create a blank site via code BUT after that activating a feature so that all the lists/document libraries with the list content types and columns is generated.
Here is where it goes wrong.
In my parser I automatically upload all the files to the correct document library.
And suddenly my parser uploaded one file and crashes after that (not when uploading my file but adding the metadata), where in the old (read created via gui) solution it could parse 3000 files.
So after some debugging the error was found: ” The URL ’FileName’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web” .
Well good luck hunting 🙂
After a while of making google our best friend we found a blog (http://yasirbutt.spaces.live.com/blog/cns!A8677D5751E6B4DA!958.entry) also describing the same error but with a twist.
In this blog they are doing a migration from SPS 2003 to MOSS 2007 , not quite the same but the world isn’t perfect.
The key phrase in the blog however is “The problem is with SharePoint Solution Generator”.
This is interesting, no? The Sharepoint world says that this is one of the best tools out there, but it seems that this has a big flaw in my eyes.
I mean ok, nobody is going to make a schema.xml on his own, a tool that generates it is good enough.
It seems that the solution generator automatically assigns colname=”nvarchar” and colname=”ntext” fields (n is for a incremental number) to the schema.xml. Why this is I don’t have a clue (if somebody can explain to my why it’s added but when removed you don’t see a difference?) .
But this is where my solution comes from. After removing ALL the fields with colname=”nvarchar” and “ntext” in the Fields tag and rebuilding my WSP and installing it. Everything workes fine.
So many thanks to jerry for this one.