Ako alat radi stvari koje ne razumiju, a onda ne uspije u koraku n nepoznatog broja koraka, ste mrtvi u vodu…
</kraj>
Ako alat radi stvari koje ne razumiju, a onda ne uspije u koraku n nepoznatog broja koraka, ste mrtvi u vodu…
</kraj>
Bio sam jednom lukavost BDC ADF datoteke rukom (tako da mogu izgraditi my "Silazim moj travnjak!" Ja) i pogodio ovu lijepu pogreške:
"Application definition import failed. Sljedeća greška:"
Kao što možete vidjeti, postoji greška, ali … to ne ide mi reći što je to.
U mom slučaju, the issue turned out that I had started off with a functional ADF for a different project that connected to a database and executed a SQL query against a view. In this new project, I am calling a method on a web service. I had stripped out the DB specific stuff and added my web service stuff, , ali nije uspio ažurirati <LobSystem>’s Type attribute. I switched it to "WebService" i ja rado preselio na novije i uzbudljivije uvoznih pogrešaka, koje su obrađene u dogledno vrijeme.
Ovdje je u krivu LobSystem:
<LobSystem
xmlns:Rebel =http://www.w3.org/2001/XMLSchema-instance
Rebel:schemaLocation =http://schemas.microsoft.com/office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Type="Database"
Version="1.0.0.0" Name="xyzzy"
xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
To je ispravan:
<LobSystem
xmlns:Rebel =http://www.w3.org/2001/XMLSchema-instance
Rebel:schemaLocation =http://schemas.microsoft.com/office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Type="WebService"
Version="1.0.0.0" Name="xyzzy"
xmlns="http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
</kraj>
UPDATE: Ovaj MSDN objavljivanja ima neke zanimljive primjedbe iz JXJ na temelju njegove, uglavnom negativno, Iskustva ide dolje ovaj put: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2623565&SiteID=1
We have a business scenario where we need to link two documents libraries via a common "document ID" polje.
We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, od kojih su tri:
Potpomognuti BDC, we can use a "business data" column type and it provides a superior search and even allows multiple columns of data to appear in list views.
Ja sam imao neke preliminarne uspjeh s ovom pristupu, a planiramo pisati više o tome.
Ako ste radili ovaj kut prije i imate bilo kakve komentare, molimo udjela!
</kraj>
Radio sam s BDC danas, coding ADF files by hand and generating myself some errors. One such error:
Primjena definicija uvoz nije uspio. Sljedeća greška: Ne mogu učitati Vrsta opisao TypeDescriptor je TypeName. Naziv parametra: typeName Greška je naišao na ili neposredno prije Line: '35’ i pozicija: ’20’.
MOSS prikazuju ovu pogrešku kada sam pokušao uvesti datoteku ADF XML.
Ja istraživao internets i utvrdili da sam bio s pozivom na ime LOB instance (od <LobSystemInstance>) u mom <TypeDescriptor> čvora kad sam trebala upućuje uspijeva samo ime (od <LobSystem>).
Pogrešno:
<TypeDescriptor TypeName="Conchango.KeyValue, LOB Ime instance" Name="KeyValue">
Ispravite:
<TypeDescriptor TypeName="Conchango.KeyValue, LOB Ime" Name="KeyValue">
Nadam se da ovo netko štedi sat ili dva vremena.
</kraj>
I was working on a feature last week that would add some event receivers to a specific list instance. (I blogged nešto o tom popisu primatelja ovdje).
Korištenje naredbenog retka, Sam mogao instalirati tu značajku bez pogreške (ali vidi dolje za skrivene greške). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" pogreška. This blog entry describes how I solved it.
To je pogreška koja MOSS mi je pokazao u web pregledniku:
Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" Neuspjela: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ ili jedan od njegovih ovisnosti. Sustav ne može pronaći navedenu datoteku.
Naziv datoteke: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName filename, Gudački codebase, Dokazi assemblySecurity, Skupština locationHint, StackCrawlMark& stog tlo, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Dokazi assemblySecurity, StackCrawlMark& stog tlo, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(Gudački assemblyString, Dokazi assemblySecurity, StackCrawlMark& stog tlo, Boolean forIntrospection)
at System.Reflection.Assembly.Load(Gudački assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Skupština obvezujuća bilježenje isključeno.
Da biste omogućili sastavljanje prijave kvara vezanja, postavite vrijednost registra [HKLM Software Microsoft Fusion!EnableLog] (DWORD) na 1.
Primijetiti: Tu je neke performanse kazna povezana s montažnim prijave vezanje neuspjeh.
Da biste isključili tu značajku, izvadite vrijednost registra [HKLM Software Microsoft Fusion!EnableLog].
Znam kako namjerno izazvati tu pogrešku: don’t install the assembly in the GAC. Ali, it was in the GAC. I normally install assemblies into the GAC by dragging them into the c:\windows\assembly folder using windows explorer. I’ve never felt 100% ugodno, jer sam uvijek mislio da je postojala gacutil s razlogom … so I tried that. It made no difference.
Tražila sam internets i pronašao ovaj post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1
Plakat se dogodilo da se koristi isti korijen malo koda (iznutra WSS knjige iz ovog popisa) so that was a hopeful sign. Međutim, Prijedlog o ukrašavanju skupštine s [montaža: ] directive didn’t make sense to me. I tried it anyway and I was right. It made no difference.
Then I noticed that my class definition was not public. I made it public and that made no difference.
Sljedeći, I went to the trouble of enabling the "assembly bind failure log" (nakon korisne i točne upute koje) and this is where things started to get interesting. That log shows me that the runtime is searching everywhere on that server for my assembly. It even appears to be searching for it in my medicine cabinet. Ali … neće ga potražiti u GAC.
I put on my winter jacket and go searching the Internets again and find that someone has had this problem too. The lengthy discussion in that posting peters off into nothing and I can’t find a solution.
I move my assembly into one of the places the log claims it’s searching and I make a little more progress. I’m rewarded with a new error in the browser when I try to activate the feature:
Failed to create feature receiver object from assembly "xyzzyFeatureReceiver_0", type "Conchango.xyzzyFeatureReceiver" za lice b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Vrijednost ne može biti nula.
Naziv parametra: tip
at System.Activator.CreateInstance(Tip putovanja, Boolean nisu za javnost)
at System.Activator.CreateInstance(Tip putovanja)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
Vrijeme je za jedan posljednji izlet na internets!
Ovaj put saznam, predvidivo dovoljno, that MOSS issues this error because the assembly is not in GAC.
Želim da se nešto pozitivno iz ovog i pokušajte osjetiti malo ponosan što sam stvorio Bjegunac od MSIL skupštinama, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" ispod glasa.
I finally decide to punt. I create an entirely new project and copy/paste the code from the incredible-cloaked-from-the-GAC-assembly non-working project over to this new project. (I look for a build flag called something like "hide from assembly binding if installed in the GAC" ali ne mogu naći jedan).
Ja instalirajte značajku i aktivirali i … to radi! Tako, nakon svega što, I had to basically ‘reboot’ my project. To je još jedan razlog zašto mrzim računala.
I did learn something useful from this. I had been installing features using the stsadm command line all day long and been using the "-force" option out of habit. Iz nekog razloga, I did not use the -force option when I installed the new project. Ovaj puta, Ja sam zapravo, truly forget to copy this new project’s assembly into the GAC. Kao rezultat toga, I received that "FielNotFoundException" pogreška. Ovaj puta, Dobio sam to od stsadm, not when I tried to activate the feature via the web browser. Tako, -force actually plays two roles. It allows you to re-install an existing feature. It also allows you to install a buggy feature that cannot work at runtime by suppressing the error. It probably says as much in the help somewhere but I never noticed it.
</kraj>
===
Bonus wife joke:
Two male co-workers go out to lunch. One of them tells the other, "I let loose an embarrassing Freudian slip the other night."
"A Freudian slip? What’s that?"
"Well, when we finished eating, the waitress came by and asked how we liked our meals. I meant say, ‘I loved the chicken breast’ but instead I said ‘I loved your breasts’. I was so embarrassed."
"Ah," his co-worker replied. "I had the same thing happen to me this weekend with my wife. We were eating breakfast I meant to ask her to pass the butter, but instead I screamed at her, ‘You ruined my life!'"
</kraj>
UPDATE (04/08/08): I seem to have solved this problem. From the command line, I ran "c:\windows system32 lodctr / R" po upis InstallShield govori o problemima i da se čini da su to riješiti za mene.
Primjetio sam da u zadnje vrijeme, my desktop/server fan never turns off. I know it used to turn off. I took a moment to check it out noticed that the a VMware process was running a consistent 20% utilization on one of the CPU’s. I checked the event log and saw these errors in the application log happening dozens of times per minute:
Windows ne može učitati Extensible Counter UGatherer DLL, Prvi DWORD u odjeljku podataka je kod Windows pogreške.
Windows ne može učitati Extensible Counter UGTHRSVC DLL, Prvi DWORD u odjeljku podataka je kod Windows pogreške.
Windows ne može učitati brojač extensible MSSCNTRS DLL, Prvi DWORD u odjeljku podataka je kod Windows pogreške.
Ako sam izbušiti u detalje jednom od tih poruka, JA dobiti to:
Izvor: Perflib
Tip: Pogreška
Kategorija: Nijedan
Event ID 1023
I did some research and there was some indication it could be a permission problem in terms of access to the DLLs in question. I played around with that stuff but could not affect things in a positive way so I gave up on that.
VMware su me prigovaralo o obavljanju update za neko vrijeme, pa sam upisao verziju sam instaliran (apparently "1.0.1 build 29996") and did the update. This upgraded me to v1.04. Nažalost, to nije riješila problem.
I can stop the insane number of messages going to my application log if I shut down a service named "VMware Authorization Service". This prevents me from using the VMware software, tako … not such a great option.
Domaćin operativni sustav Windows XP 64 bit.
Ja ne mislim da je ovo oduvijek bilo, , ali ne sjećam se da je bilo koji određeni događaj mogao dovesti do toga.
To je razlog zašto mrzim računala.
</kraj>
UPDATE: This works but there are significant limitations which are described in the comments. This may still be useful in some cirumstances.
UPDATE 2: U mom trenutnom projektu, users always upload documents. Kao rezultat toga, I don’t run into a problem where MS Word is running and thinks that the file was renamed on it. I did run into a problem, "the file was modified by someone else" and solved this via a simple semaphore type flag. Users need to change a meta data field from its default value to something else. The itemupdated() prijemnik traži valjane vrijednosti tamo prije nego što zapravo obavljanje preimenovati i od tada, I have not had any problems. Your mileage may vary.
I have a client requirement to change the name of files uploaded to a specific document library to conform with a particular naming convention. The API does not provide a "rename()" način. Umjesto toga, koristimo "MoveTo(…)". Here is a minimal bit of code to accomplish this:
javni nadjačati poništiti ItemAdded(SPItemEventProperties Svojstva) { SPFile f = properties.ListItem.File; f.MoveTo(properties.ListItem.ParentList.RootFolder.Url + "/xyzzy.doc"); f.Update(); } |
The only tricky bit is the "properties.ListItem.ParentList.RootFolder.Url". The MoveTo() method requires a URL. That mashed up string points me to the root folder of my current document library. This allows me to avoid any hard coding in my event receiver.
To je više koristan verzija koja čini istu stvar, but assigns the name of the file to "Title":
javni nadjačati poništiti ItemAdded(SPItemEventProperties Svojstva) { DisableEventFiring(); // Dodjela naslov ove točke na naziv datoteke sama. // NAPOMENA: Ovaj zadatak se mora dogoditi prije izmijeniti datoteku. // Pozivanje ažuriranje() na SPFile čini se izgubiti u svojstvima // neki osjećaj. Updates to "Title" nije do tog promjene (i ažuriranje() pozvati) // su se preselili ispred promjenu naziva datoteke. properties.ListItem["Title"] = Properties.ListItem.File.Name; properties.ListItem.Update(); SPFile f = properties.ListItem.File; // Uzmite produljenje datoteke. Trebamo kasnije. niz spfileExt = novi FileInfo(f.Name).Produžetak; // Promijenite naziv datoteke u popisu stavke ID i koristiti ekstenziju zadržati // da je dio njega netaknuti. f.MoveTo(properties.ListItem.ParentList.RootFolder.Url + "/" + properties.ListItem["ID"] + spfileExt); // Obvezati na potez. f.Update(); EnableEventFiring(); } |
Kolega, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" za 35,000 upute za okoliš.
Rasprava je ovdje: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6
Pop na više i doprinose!
</kraj>
I’m still in the habit of crafting my feature XML files by hand since it’s all quite new to me. I don’t want to rely on a front-end tool that does stuff I don’t understand (kazao je kako je napisao blog zapis koristeći alat on ne razumije).
Danas, I was trying to add a custom action to the site settings but it just wouldn’t show up. I could install the feature and see it in the site features, ali kad sam ga aktivirati (bez greške) to jednostavno ne bi se pojaviti na padajućem izborniku.
I finally realized that I misspelled "SharePoint" Mjesto u atribut <CustomAction> čvor. This is the bad elements.xml file:
<?xml verzija="1.0" kodiranje="UTF-8" ?> <Elementi xmlns="http://schemas.microsoft.com / SharePoint /"> <CustomAction Id="SiteActionsToolbar" GroupId="SiteActions" Lokacija="Microsoft.Sharepoint.StandardMenu" Slijed="100" Naslov="Bok!" Opis="Custom izborniku Akcija dodao putem značajke." ImageUrl="_izgledi / slike / menuprofile.gif"> <UrlAction Url="http://www.xyzzy.com"/> </CustomAction> </Elementi> |
Dobro:
<?xml verzija="1.0" kodiranje="UTF-8" ?> <Elementi xmlns="http://schemas.microsoft.com / SharePoint /"> <CustomAction Id="SiteActionsToolBar" GroupId="SiteActions" Lokacija="Microsoft.SharePoint.StandardMenu" Slijed="100" Naslov="Bok!" Opis="Custom izborniku Akcija dodao putem značajke." > <UrlAction Url="http://www.xyzzy.com"/> </CustomAction> </Elementi> |
That one took me a good two hours to figure out 🙂
Ja utjehu u činjenici da su neki dan u budućnosti, Ja ću biti u mogućnosti reći s uvjerenjem, "back in the day, Morao sam hodati tri milje do brda u snijegu (bos!) in order to deploy a custom feature to MOSS. You kids, ne znam kako se lako ga imate! Get off my lawn!"
Jedva čekam.
</kraj>