ಸಮಸ್ಯೆಗೆ ಪರಿಹಾರವು: “FileNotFoundException” ನನ್ನ ವೈಶಿಷ್ಟ್ಯ ಪಡೆಯುವ.

I was working on a feature last week that would add some event receivers to a specific list instance. (ನಾನು ಇಲ್ಲಿ ಆ ಪಟ್ಟಿಯಲ್ಲಿ ರಿಸೀವರ್ ಬಗ್ಗೆ ಸ್ವಲ್ಪ ಬ್ಲಾಗ್).

ಆಜ್ಞಾ ಸಾಲಿನ ಬಳಸಿ, ನಾನು ಯಾವುದೇ ದೋಷದೊಂದಿಗೆ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಅನುಸ್ಥಾಪಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ (ಆದರೆ ಗುಪ್ತ ದೋಷ ಕೆಳಗೆ ನೋಡಿ). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" ದೋಷ. This blog entry describes how I solved it.

ಈ MOSS ವೆಬ್ ಬ್ರೌಸರ್ನಲ್ಲಿ ನನಗೆ ತೋರಿಸಿದರು ದೋಷವೆಂದು:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" ವಿಫಲನಾದ: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ ಅದರ ಅವಲಂಬಿಗಳು ಅಥವಾ ಒಂದು. ವ್ಯವಸ್ಥೆಯ ನಿರ್ದಿಷ್ಟಪಡಿಸಿದ ಫೈಲ್ ಸಿಗುವುದಿಲ್ಲ.
ಫೈಲ್ ಹೆಸರು: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(ಫೈಲ್ಹೆಸರು AssemblyName, ಸ್ಟ್ರಿಂಗ್ ಕೋಡ್ಬೇಸ್, ಎವಿಡೆನ್ಸ್ assemblySecurity, ಅಸೆಂಬ್ಲಿ locationHint, StackCrawlMark& ಮಣ್ಣಿನ ಬಣವೆ, ಬೂಲಿಯನ್ throwOnFileNotFound, ಬೂಲಿಯನ್ forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyRef AssemblyName, ಎವಿಡೆನ್ಸ್ assemblySecurity, StackCrawlMark& ಮಣ್ಣಿನ ಬಣವೆ, ಬೂಲಿಯನ್ forIntrospection)
at System.Reflection.Assembly.InternalLoad(ಸ್ಟ್ರಿಂಗ್ assemblyString, ಎವಿಡೆನ್ಸ್ assemblySecurity, StackCrawlMark& ಮಣ್ಣಿನ ಬಣವೆ, ಬೂಲಿಯನ್ forIntrospection)
at System.Reflection.Assembly.Load(ಸ್ಟ್ರಿಂಗ್ assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: ಅಸೆಂಬ್ಲಿ ಬಂಧಿಸುವ ಲಾಗಿಂಗ್ ಆಫ್ ಮಾಡಲಾಗಿದೆ.
ವಿಧಾನಸಭೆ ಬಂಧಿಸಲ್ಪಡುತ್ತವೆ ವೈಫಲ್ಯ ಲಾಗಿಂಗ್ ಶಕ್ತಗೊಳಿಸಲು, ನೋಂದಣಿ ಮೌಲ್ಯವನ್ನು [HKLM ತಂತ್ರಾಂಶ ಮೈಕ್ರೋಸಾಫ್ಟ್ ಫ್ಯೂಷನ್!EnableLog] (DWORD) ಗೆ 1.
ನೋಡು: ವಿಧಾನಸಭೆ ಬಂಧಿಸಲ್ಪಡುತ್ತವೆ ವೈಫಲ್ಯ ಲಾಗಿಂಗ್ ಸಂಬಂಧಿಸಿದ ಕೆಲವು ಸಾಧನೆ ಪೆನಾಲ್ಟಿ ಇಲ್ಲ.
ಈ ವೈಶಿಷ್ಟ್ಯವನ್ನು ಆಫ್ ಮಾಡಲು, ನೋಂದಣಿ ಮೌಲ್ಯದ ತೆಗೆದು [HKLM ತಂತ್ರಾಂಶ ಮೈಕ್ರೋಸಾಫ್ಟ್ ಫ್ಯೂಷನ್!EnableLog].

ವಿಂಡೋಸ್ ಶೇರ್ಪಾಯಿಂಟ್ ಸರ್ವೀಸಸ್ ಸಮಸ್ಯೆಯಿಂದ ನಿವಾರಣೆ.

ನಾನು ಉದ್ದೇಶಪೂರ್ವಕವಾಗಿ ದೋಷ ಉಂಟುಮಾಡುವ ಗೊತ್ತಿಲ್ಲ: don’t install the assembly in the GAC. ಆದರೆ, 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% ನಾನು ಯಾವಾಗಲೂ ಎಂದು gacutil ಒಂದು ಕಾರಣಕ್ಕಾಗಿ ಅಸ್ತಿತ್ವದಲ್ಲಿತ್ತು ಅಭಿಪ್ರಾಯವಾಗಿತ್ತು ಆರಾಮದಾಯಕ ಎಂದು ಮಾಡುವ … so I tried that. It made no difference.

ನಾನು Internets ಅನೂಶೋಧಿಸಬಹುದು ಮತ್ತು ಈ ಪೋಸ್ಟ್ ಕಂಡುಬಂದಿಲ್ಲ: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

ಪೋಸ್ಟರ್ ಕೋಡ್ ಅದೇ ಮೂಲ ಬಿಟ್ ಬಳಸಿಕೊಂಡು ಹರಿಯುತ್ತಿತ್ತು (ಈ ಪಟ್ಟಿಯಿಂದ ಇನ್ಸೈಡ್ WSS ಪುಸ್ತಕ) so that was a hopeful sign. ಹೇಗಾದರೂ, ಒಂದು ಜೊತೆ ಅಲಂಕಾರ ವಿಧಾನಸಭಾ ಸಲಹೆ [ಕೂಟ: ] 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.

ಮುಂದೆ, I went to the trouble of enabling the "assembly bind failure log" (ಒದಗಿಸಿದ ಉಪಯುಕ್ತ ಮತ್ತು ನಿಖರ ಸೂಚನೆಗಳನ್ನು ಅನುಸರಿಸಿ) 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. ಆದರೆ … ಇದು 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" ವೈಶಿಷ್ಟ್ಯವಾದ b2cb42e3-4f0a-4380-ಆಬ-1ef9cd526f20: System.ArgumentNullException: ಮೌಲ್ಯ ಶೂನ್ಯ ಸಾಧ್ಯವಿಲ್ಲ.
ನಿಯತಾಂಕ ಹೆಸರು: ಕೌಟುಂಬಿಕತೆ
at System.Activator.CreateInstance(ಕೌಟುಂಬಿಕತೆ ಮಾದರಿ, ಸಾರ್ವಜನಿಕವಲ್ಲದ ಬೂಲಿಯನ್)
at System.Activator.CreateInstance(ಕೌಟುಂಬಿಕತೆ ಮಾದರಿ)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

ವಿಂಡೋಸ್ ಶೇರ್ಪಾಯಿಂಟ್ ಸರ್ವೀಸಸ್ ಸಮಸ್ಯೆಯಿಂದ ನಿವಾರಣೆ.

Internets ಒಂದು ಕೊನೆಯ ಟ್ರಿಪ್ ಟೈಮ್ ಫಾರ್!

ನಾನು ಕಂಡುಹಿಡಿಯಲು ಈ ಸಮಯ, ನಿರೀಕ್ಷಿತವಾಗಿ ಸಾಕಷ್ಟು, that MOSS issues this error because the assembly is not in GAC.

ನಾನು ಈ ಆಫ್ ಏನಾದರೂ ಧನಾತ್ಮಕ ಹೊರಬರಲು ಮತ್ತು ನಾನು ರಚಿಸಿದ ಎಂದು ಸ್ವಲ್ಪ ಹೆಮ್ಮೆ ಅಭಿಪ್ರಾಯ ಪ್ರಯತ್ನಿಸಿ ಬಯಸುವ MSIL ಅಸೆಂಬ್ಲಿಗಳ ಪ್ಯುಗಿಟಿವ್, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" ನನ್ನ ಉಸಿರು ಅಡಿಯಲ್ಲಿ.

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" ಆದರೆ ಒಂದು ಸಿಗುವುದಿಲ್ಲ).

ನಾನು ವೈಶಿಷ್ಟ್ಯವನ್ನು ಅನುಸ್ಥಾಪಿಸಲು ಮತ್ತು ಅದನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲು ಮತ್ತು … ಇದು ಕೆಲಸ! ಆದ್ದರಿಂದ, ಎಲ್ಲಾ ನಂತರ, I had to basically ‘reboot’ my project. ನಾನು ಕಂಪ್ಯೂಟರ್ ದ್ವೇಷ ಏಕೆ ಇನ್ನೊಂದು ಕಾರಣ.

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. ಕೆಲವು ಕಾರಣಕ್ಕಾಗಿ, I did not use the -force option when I installed the new project. ಈ ಸಮಯ, ನಾನು ವಾಸ್ತವವಾಗಿ ಮಾಡಿದರು, truly forget to copy this new project’s assembly into the GAC. ಪರಿಣಾಮವಾಗಿ, I received that "FielNotFoundException" ದೋಷ. ಈ ಸಮಯ, ನಾನು stsadm ರಿಂದ ಅರ್ಥವಾಯಿತು, not when I tried to activate the feature via the web browser. ಆದ್ದರಿಂದ, -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.

</ಕೊನೆಯಲ್ಲಿ>

3 ಮೇಲೆ "ಆಲೋಚನೆಗಳುಸಮಸ್ಯೆಗೆ ಪರಿಹಾರವು: “FileNotFoundException” ನನ್ನ ವೈಶಿಷ್ಟ್ಯ ಪಡೆಯುವ.

  1. ಫ್ರಾನ್ಸಿಸ್ಕೊ

    ಕೂಡ, ನಾನು ಹೊಂದಿತ್ತು ನನ್ನ 2 ನಾನು ಫೀಚರ್ ಗ್ರಾಹಕದ ಹೆಸರಿನ ಬಗೆ ಮರುನಾಮಕರಣ ಮಾಡಿದಾಗ ಚಿತ್ತೋನ್ಮಾದಗ್ರಸ್ತ nintendoSIXTYFOURRRR ಇನ್ ಒಂದು ಕೆಟ್ಟ ದಾರಿ ಕ್ಷಣಗಳಲ್ಲಿ ಗಂಟೆಗಳ, ಟ್ರ್ಯಾಕ್ ಸಹಾಯ ನಿಮ್ಮ ಅಥವಾ ಎಲ್ಲರಿಗಿಂತ ಆರಂಭಿಸಿದರು ವಿಶೇಷವೇನು ಅಲ್ಲಿ.

  2. ಫ್ರಾನ್ಸಿಸ್ಕೊ

    ಸಮಸ್ಯೆಯ ಮೂಲ ಶೇರ್ಪಾಯಿಂಟ್ ಡೇಟಾಬೇಸ್ ನಿಯೋಜಿಸಲಾಗಿರುವ wsp ಮೇಲಿದೆ. ನಾನು ನಿಮ್ಮ ಪೋಸ್ಟ್ ಓದಲು ಮತ್ತು ಇದು ವಾಸ್ತವವಾಗಿ ಸಮಸ್ಯೆ ಬಗೆಹರಿಸಲು ದಿತ್ತು ನಾವು ಚಲಿಸುವ ಎಲ್ಲವೂ ಒಂದು ಆಯ್ಕೆಯನ್ನು ಅಲ್ಲ ಕಡತಗಳನ್ನು ಹಲವಾರು ಯೋಜನೆಗಳು ಮತ್ತು ಡಜನ್ಗಟ್ಟಲೆ ಒಂದು ದೊಡ್ಡ ಪರಿಹಾರ.

    ನಿಮ್ಮ GAC ಅಥವಾ ನಿಮ್ಮ ವಿಧಾನಸಭೆ ಅಪ್ಡೇಟ್ ಎಷ್ಟು ಯಾವುದೇ, ಏನು ನೀವು ತೊಂದರೆ ನೀಡುವ ಇದೆ ಶೇರ್ಪಾಯಿಂಟ್ ಸ್ಥಾಪಿಸಿದ ಪ್ರಸ್ತುತ WSP ಅಸೆಂಬ್ಲಿ ಆಗಿದೆ.

    ನೀವು ಸುಲಭವಾಗಿ ಮಾತ್ರ ಪರಿಹಾರ ಹಿಂಪಡೆಯುವ ಪ್ರಯತ್ನದಲ್ಲಿರುವ ಗಮನಿಸಿದರು ಮಾಡಬಹುದು (ದೋಷ ಸಂಭವಿಸಿದಾಗ ಅಲ್ಲಿ ಇದು). Everything happening on "Retracting Time" should be considered "deployed wsp"-only not the project itself.

    ನನ್ನ ಪರಿಹಾರಕ್ಕಾಗಿ ಆಗಿತ್ತು:

    – ಕೇಂದ್ರ ನಿರ್ವಹಣೆ: ಪರಿಹಾರ ರದ್ದು
    – stsadm: deletesolution
    – ವಿಷುಯಲ್ ಸ್ಟುಡಿಯೋ => ಪ್ರಾಜೆಕ್ಟ್ => ಕಂತೆ
    – stsadm: addsolution-ಕಡತ ಪ್ರಾಜೆಕ್ಟ್ ಬಿನ್ ಡೀಬಗ್ Project.wsp
    – stsadm: deploysolution-ಹೆಸರು project.wsp-ತಕ್ಷಣ allowgacdeployment ಪಡೆ
    – ವಿಷುಯಲ್ ಸ್ಟುಡಿಯೋ => ನಿಯೋಜಿಸಲು

    ನಾನು ಮತ್ತೆ ನಿಯೋಜಿಸಲು ನಡೆಸುವ ಮೊದಲು ಯೋಜನೆಯ ಬಿನ್ ಮತ್ತು ಡಿಬಗ್ ಫೋಲ್ಡರ್ಗಳನ್ನು ಅಳಿಸಲಾಗಿದೆ, ಯಾವುದೇ ಪರಿಣಾಮ ಆದರೆ ಮೌಲ್ಯದ ಕಾಮೆಂಟ್ ಹೊಂದಿವೆ ಇರಬಹುದು.

    ಎರಡೂ ಈ ಕೃತಿಗಳು

    "Feature … ಅನುಸ್ಥಾಪಿಸಲು ಸಾಧ್ಯವಾಗಿಲ್ಲ ಏಕೆಂದರೆ ಈವೆಂಟ್ ರಿಸೀವರ್ ವಿಧಾನಸಭಾ ಲೋಡ್"
    ಮತ್ತು
    "Failed to create feature receiver object from assembly"

    ವಂದನೆ!
    ಫ್ರಾನ್ಸಿಸ್ಕೊ

ಒಂದು ಉತ್ತರಿಸಿ ಬಿಡಿ ಫ್ರಾನ್ಸಿಸ್ಕೊ ಉತ್ತರ ರದ್ದು

ನಿಮ್ಮ ಈಮೇಲ್ ವಿಳಾಸ ರ ಆಗುವುದಿಲ್ಲ. ಅಗತ್ಯವಿರುವ ಜಾಗ ಗುರುತಿಸಲಾಗಿದೆ *