Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

All of a sudden, stsadm has stopped working, crashing on all commands it is run with (even -help!)

e.g.

> stsadm.exe -help
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: path
   at System.IO.DirectoryInfo..ctor(String path)
   at Microsoft.SharePoint.StsAdmin.SPStsAdmin.EnsureExtendedOperationMap()
   at Microsoft.SharePoint.StsAdmin.SPStsAdmin.EnsureFullOperationMap()
   at Microsoft.SharePoint.StsAdmin.SPStsAdmin.LookupOperationName(String strOperation)
   at Microsoft.SharePoint.StsAdmin.SPStsAdmin.Main(String[] args)

I'm baffled as to why. The only significant thing to change on the server between yesterday and today was the installation of the Citrix Web Interface for SharePoint webparts.

UPDATE: I also receive the following error when starting Central Administration from the Start Menu (Start -> Microsoft Office Server -> SharePoint 3.0 Central Administration)

A failure occurred when accessing the HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS registry key. Repair this product by selecting it from the Add/Remove Programs menu.

If I access Central Administration via a browser and typing in the URL (e.g. http://intranet:8080), it works fine.

MORE UPDATE: I dug into stsadm a bit by disassembling with .NET Reflector. Turns out the line it is bailing on is:

FileInfo[] files = new DirectoryInfo(SPUtility.GetGenericSetupPath("config")).GetFiles("stsadmcommands.*.xml");

in the EnsureExtendedOperationMap() method.

The reason being, I believe, because SPUtility.GetGenericSetupPath("config") is returning null. I set up a test console app and sure enough, SPUtility.GetGenericSetupPath("config") returns null. So something is obviously severely hosed somewhere.

I noticed when running the test console app that I get the following output:

A first chance exception of type 'System.DllNotFoundException' occurred in Microsoft.SharePoint.dll

which doesn't sound good. So I ask Visual Studio to break on all exceptions, even handled ones, and the exception is as follows:

System.DllNotFoundException: Unable to load DLL 'onetnative.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Note: I've started a separate question regarding this onetnative.dll problem...

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

As far as I can trace it back, this was caused by an installation of the wrong version of Microsoft J#.

J# is a pre-requisite of the Citrix Web Interface for SharePoint webparts. I installed the 32bit version mistakenly, then uninstalled and installed the 64bit version. I have a hunch (based on a good bit of testing, but not 100% verified) that this caused .NET/CLR applications to start looking in the 32bit node of the registry rather than 64bit.

share|improve this answer
add comment

Has UAC been enabled and you are not running your command prompt as an Administrator perhaps?

share|improve this answer
    
Thanks, but no -- UAC is disabled, and I'm running as administrator. –  ngm Jul 20 '10 at 11:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.