Se a ferramenta está facendo cousas que non entende e, a continuación, el falla no paso n dun número descoñecido de pasos, está morto na auga…
</final>
Se a ferramenta está facendo cousas que non entende e, a continuación, el falla no paso n dun número descoñecido de pasos, está morto na auga…
</final>
Eu estaba unha vez máis a elaboración arquivos BDC ADF á man (para que eu poida construír o meu "saia do meu gramos!" Eu) e bateu esta linda erro:
"Application definition import failed. Ocorreu o seguinte erro:"
Como se pode ver, hai un erro, pero … non me vai dicir o que é.
No meu caso, 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, pero non puido actualizar o <LobSystem>’s Type attribute. I switched it to "WebService" e eu por sorte mudouse para os erros máis recentes e máis emocionante de importación, que foron tratadas no seu tempo.
Here is the wrong LobSystem:
<LobSystem
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi: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">
This is correct:
<LobSystem
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi: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">
</final>
Actualización: Este MSDN post ten algunhas observacións interesantes de JXJ con base na súa, sobre todo negativo, experiencias indo por este camiño: 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" campo.
We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, tres dos cales son:
Apoiado por 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.
Tiven algún éxito preliminar con esta visión e pretendo escribir máis sobre el.
Se xa traballou este ángulo antes e ten algún comentario, por favor, comparta!
</final>
Eu estou traballando con BDC hoxe, coding ADF files by hand and generating myself some errors. One such error:
Importación de definición de aplicación fallou. Ocorreu o seguinte erro: Non se puido cargar o tipo descrito por NomeTipo de TypeDescriptor. O nome do parámetro: typeName erro se atopou en ou antes de Liña: '35’ e posición: ’20’.
Moss aparece este erro cando intento descargar o arquivo XML ADF.
Eu searched as Internets e penso que eu estaba facendo referencia ao nome da instancia LOB (do <LobSystemInstance>) o meu <TypeDescriptor> nó cando eu debería ter mencionado o nome propio LOB (a partir de <LobSystem>).
Mal:
<TypeDescriptor TypeName="Conchango.KeyValue, LOB Nome da Instancia" Name="KeyValue">
Corrixa:
<TypeDescriptor TypeName="Conchango.KeyValue, Nome LOB" Name="KeyValue">
Espero que isto se salva alguén unha ou dúas horas de tempo.
</final>
I was working on a feature last week that would add some event receivers to a specific list instance. (Eu escribín un pouco sobre esta lista receptor aquí).
Usar a liña de comandos, Podería instalar o recurso sen erro (pero mira abaixo o erro oculto). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" error. This blog entry describes how I solved it.
Este é o erro que Moss me mostrou o navegador web:
Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" fracasado: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ ou unha das súas dependencias. O sistema non pode atopar o ficheiro especificado.
O nome do ficheiro: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName filename, Codebase cadea, AssemblySecurity evidencia, Asemblea locationHint, StackCrawlMark& apilar solo, Booleana throwOnFileNotFound, ForIntrospection Boolean)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, AssemblySecurity evidencia, StackCrawlMark& apilar solo, ForIntrospection Boolean)
at System.Reflection.Assembly.InternalLoad(Cordas assemblyString, AssemblySecurity evidencia, StackCrawlMark& apilar solo, ForIntrospection Boolean)
at System.Reflection.Assembly.Load(Cordas assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Rexistro de conexións de assembly está desactivado.
Para activar o rexistro de erros de assembly, definir o valor de rexistro [HKLM Software Microsoft Fusion!EnableLog] (DWORD) para 1.
Nota: Hai algunha perda de rendemento asociada ao rexistro de fallo de conexión de assembly.
Para desactivar este recurso, elimine o valor do Rexistro [HKLM Software Microsoft Fusion!EnableLog].
Sei como facer que deliberadamente este erro: don’t install the assembly in the GAC. Pero, 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% cómodo facendo iso, porque eu sempre pensei que Gacutil existiu por unha razón … so I tried that. It made no difference.
Eu procurei as Internets e atopei este post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1
O cartel pasou a ser co mesmo bit raíz do código (do libro WSS Dentro desta lista) so that was a hopeful sign. Con todo, a suxestión de decorar a montaxe cunha [montaxe: ] 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.
Seguinte, I went to the trouble of enabling the "assembly bind failure log" (seguindo as instrucións útiles e precisas proporcionadas) 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. Pero … non vai buscalo no 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" ao recurso de b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: O valor non pode ser nulo.
O nome do parámetro: tipo
at System.Activator.CreateInstance(Tipo Tipo, Booleana nonPublic)
at System.Activator.CreateInstance(Tipo Tipo)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
Tempo para unha última viaxe para as Internets!
Esta vez descubro, previsiblemente, that MOSS issues this error because the assembly is not in GAC.
Quero aproveitar algo positivo deste e tentar sentir algo orgulloso de que eu creei o Fugitivo de conxuntos MSIL, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" baixo a miña respiración.
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" pero non pode atopar un).
Eu instalar recurso e activa-lo e … funciona! Así, despois de todo isto, I had to basically ‘reboot’ my project. Esta é outra razón pola que eu odio ordenadores.
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. Por algunha razón, I did not use the -force option when I installed the new project. Este tempo, Eu fixen realmente, truly forget to copy this new project’s assembly into the GAC. Como resultado, I received that "FielNotFoundException" error. Este tempo, I got it from stsadm, not when I tried to activate the feature via the web browser. Así, -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.
</final>
===
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!'"
</final>
Actualización (04/08/08): I seem to have solved this problem. From the command line, Eu corrín "c:\Windows system32 lodctr / R" por unha entrada falando sobre problemas InstallShield e que parece ter resolto iso por min.
Teño notado que ultimamente, 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 non pode cargar UGatherer DLL extensible contador, a primeira DWORD na sección de datos é o código de erro de Windows.
Windows non pode cargar UGTHRSVC DLL extensible contador, a primeira DWORD na sección de datos é o código de erro de Windows.
Windows non pode cargar extensibles MSSCNTRS DLL do contador, a primeira DWORD na sección de datos é o código de erro de Windows.
Se eu furar os detalles dunha daquelas mensaxes, Eu teño ese:
Orixe: Perflib
Tipo: Erro
Categoría: Ningún
ID do evento 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 estaba me incomodando sobre como executar unha actualización por un tempo, entón eu anotei a versión que eu tiña instalado (aparentemente "1.0.1 construír 29.996") and did the update. This upgraded me to v1.04. Desafortunadamente, non resolver o problema.
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, así … not such a great option.
O sistema operativo anfitrión é o Windows XP 64 bocado.
Eu non creo que iso sempre pasou, pero eu non me recordo de ningún evento específico que podería levar a el.
É por iso que eu odio ordenadores.
</final>
Actualización: This works but there are significant limitations which are described in the comments. This may still be useful in some cirumstances.
Actualización 2: O meu proxecto actual, users always upload documents. Como resultado, 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() receptor busca por un valor válido alí antes de realmente facer a renomeação e desde entón, 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()" método. Pola, usan "MoveTo(…)". Here is a minimal bit of code to accomplish this:
público substituír invalidar ItemAdded(SPItemEventProperties Propiedades) { 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.
Esta é unha versión máis útil que fai o mesmo, but assigns the name of the file to "Title":
público substituír invalidar ItemAdded(SPItemEventProperties Propiedades) { DisableEventFiring(); // Asignar o título deste artigo para o nome do ficheiro en si. // NOTA: Esta asignación debe ocorrer antes de modificar o propio arquivo. // Chamando actualización() no SPFile parece invalidar as propiedades en // nalgún sentido. Updates to "Title" puido ata que o cambio (e actualización() chamar) // foron movidos fronte á mudanza do nome do ficheiro. properties.ListItem["Title"] = Properties.ListItem.File.Name; properties.ListItem.Update(); SPFile f = properties.ListItem.File; // Obter a extensión do ficheiro. Necesitamos que máis tarde. corda spfileExt = novo FileInfo(f.Name).Extensión; // Renomeie o ficheiro para a identificación do elemento da lista e utilizar a extensión do ficheiro para manter // que parte dela intacta. f.MoveTo(properties.ListItem.ParentList.RootFolder.Url + "/" + properties.ListItem["ID"] + spfileExt); // Comprometer o movemento. f.Update(); EnableEventFiring(); } |
Un compañeiro, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" para unha 35,000 ambiente do usuario.
A discusión é aquí: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6
Pop en máis e contribuír!
</final>
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 (el dixo como escribiu un blog usando unha ferramenta que non entende).
Hoxe, 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, pero cando activei (sen erro) el simplemente non estaba a aparecer no menú desplegable.
I finally realized that I misspelled "SharePoint" o atributo de localización do <CustomAction> node. This is the bad elements.xml file:
<?xml versión="1.0" codificación="utf-8" ?> <Elementos xmlns="http://schemas.microsoft.com / SharePoint /"> <CustomAction Id="SiteActionsToolbar" GroupId="SiteActions" Localización="Microsoft.Sharepoint.StandardMenu" Secuencia="100" Título="Ola!" Descrición="Acción menú personalizado engadido mediante unha característica." ImageUrl="_layouts / images / menuprofile.gif"> <UrlAction Url="http://www.xyzzy.com"/> </CustomAction> </Elementos> |
Bo:
<?xml versión="1.0" codificación="utf-8" ?> <Elementos xmlns="http://schemas.microsoft.com / SharePoint /"> <CustomAction Id="SiteActionsToolBar" GroupId="SiteActions" Localización="Microsoft.SharePoint.StandardMenu" Secuencia="100" Título="Ola!" Descrición="Acción menú personalizado engadido mediante unha característica." > <UrlAction Url="http://www.xyzzy.com"/> </CustomAction> </Elementos> |
That one took me a good two hours to figure out 🙂
I se consolar co feito de que, algún día no futuro, Eu vou ser capaz de dicir con convicción, "back in the day, Eu tiña que andar tres quilómetros de altura outeiro na neve (descalzo!) in order to deploy a custom feature to MOSS. You kids, non sabe como é doado tes que! Get off my lawn!"
Mal podo esperar.
</final>