stsadm installfeature command line error
I am going insane trying to get stsadm work for installing a feature. I have a sharepoint 2007 setupwith the web and app on one machine andDB on another. I useit for development. I built a test feature and am trying to deploy the feature. (I am very new to sharepoiont) The syntax I am using is stsadm o installfeature -filename AAA\feature.xml I get a command line error. I sent the feature to a friend who could install it on her machine. So this tells me something is wrong with my farm setup rather than the feature itself. The command line error message does not tell me much. Anyone have an idea as to what could be going wrong?
August 14th, 2007 12:21am

It would be helpful to see the command line error. Even if it is just the "operation has failed." error.
Free Windows Admin Tool Kit Click here and download it now
August 15th, 2007 12:13am

Can you deploy a feature that way with only feature.xml? I thought you needed to package all your feature files in a .wsp file and then deploy that file... See this article: http://msdn.microsoft.com/msdnmag/issues/07/08/OfficeSpace/
August 16th, 2007 4:31pm

Ok, several things to check first. Can you check these and get back to me with more information: 1. What is the location of your Feature? It should be a sub-folder in the following location on the WEB server: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Template\Features 2. What does your Feature.xml contain? Can you post an example (feel free to rename / hide any bits you don't want to go public). 3. Are you installing this on WSS 3.0? MOSS 2007 Standard? or MOSS 2007 Enterprise? 4. Does it work if you use "-name" instead of "-filename". For example: stsadm.exe -o installfeature -name MyFeatureFolder 5. Does it install if you add "-force" on the end of the command line? 6. What error message do you get? 7. Probably the most important. What does your Feature actually do? List Definition? List Instance? Site Columns? Content Type? Workflow installation? navigation modifications? Installation of new files? Branding or theming? Cheers! MK
Free Windows Admin Tool Kit Click here and download it now
August 16th, 2007 6:05pm

DrLeary wrote: Can you deploy a feature that way with only feature.xml? I thought you needed to package all your feature files in a .wsp file and then deploy that file... See this article: http://msdn.microsoft.com/msdnmag/issues/07/08/OfficeSpace/ Solution Files(*.wsp) are arguably the "best practice". They can do a lot more than features (such as installing files to the global assembly cache, modifying the SharePoint web.config). Possibly the best thing about "Solution Files" is that they can install across a Farm, which means if you have multiple SharePoint servers, you don't have to worry about replicating all of your changes on each Server, the solution will automatically deploy the appropriate changes to each Server in the Farm. You can, however, feel free to just install and activate individual features (thats how a lot of MOSS 2007 works .. it adds LOADS of new Features and Site Templates (among other things) and bolts them together to create the Portals and publishing functionality - apart from the SSP stuff). You just need to create your Feature in a sub-folder of the ..\Template\Features\ folder. You can then use the following commands to install \ activate your Feature: stsadm.exe -o installfeature -name <name of feature folder> stsadm.exe -o activatefeature -name <name of feature folder> -url <url to Site> The only thing to be aware of is the following: The URL must be the same level as the "Scope" of the Feature. If you Feature has Scope="Site" then it is scoped at the "Site Collection" level, so the URL has to be a valid URL to a Site Collection (you can get the list of Site Collection URLS from Central Administration --> Application Management). If your Feature has Scope="Web" then it is scoped to an individual "Web Site" (i.e. a sub-site in SharePoint), in which case the URL must be a valid URL to a sub-site in your Site Collection. You can also deploy Features individually when you are building Site Definitions. They need to go in the <WebFeatures /> and <SiteFeatures /> nodes of a Configuration of the Onet.xml. If you place Features here, they will automatically be activated when the Site is created. NOTE - Features deployed in Site Definitions must have been installed once using STSADM or the Site Definition will fail!
August 16th, 2007 6:16pm

I'm having an issue with this as well. I try to run the following... stsadm.exe -o installfeature -name ItemListenerFeature -force stsadm.exe -o installfeature -name ItemListenerFeature stsadm.exe -o installfeature -filename ItemListenerFeature\Feature.xml -force stsadm.exe -o installfeature -filename ItemListenerFeature\Feature.xml All yield the same error, "Command line error." The feature file contains the following... <Feature Id="{D02CBF54-9236-4784-8210-19C0273CB113}" Title="Item listener feature" Description="This is a custom item listener for testing purposes." Scope="Web" Hidden="False" ImageURL="" xmlns="http://schemas.microsoft.com/sharepoint/"> <ElementManifests> <ElementManifest Location="elements.xml" /> </ElementManifests></Feature> The element file contains the following... <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="107"> <Receiver> <Name>Listener</Name> <Type>ItemAdded</Type> <SequenceNumber>10000</SequenceNumber> <Assembly> ItemListener, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1838b18a6096d54d </Assembly> <Class>ItemListener.Listener</Class> <Data></Data> </Receiver> </Receivers></Elements> The code is as follows... using System; using System.IO; using System.Collections.Generic; using System.Text; using Microsoft.SharePoint; namespace ItemListener { public class Listener : SPItemEventReceiver { public override void ItemAdded(SPItemEventProperties properties) { WriteToLog(string.Format("Site: {0}, List: {1}, List Item: {2}", properties.SiteId, properties.ListTitle, properties.ListItem.Title)); base.ItemAdded(properties); } private void WriteToLog(string msg) { StreamWriter logfile = new StreamWriter(@"C:\itemsadded.log"); logfile.Write("\n" + msg); logfile.Close(); } } } I registered the dll into the GAC. Any and all comments are welcome and appreciated. Thank you
Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2008 11:06pm

hi rbanerji,Can u tell me do u have copy that feature folder to particualr location means like " C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES " ?Might be that folder not copied to this location so u got the error ?regards and best of luck,,
July 3rd, 2008 6:46am

I forgot to mention, I did copy the folder to the Templates\Features folder as well. Could this be a configuration issue? I tried installing it on two separate servers.
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2008 4:05pm

First make sure that the feature is not already installed. If it is, deactivate it and uninstall it. Be sure that your assembly is signed and also installed into GAC. When installing assemblies into GAC it would be smart to always restart IIS. Then open command prompth and type this: CD C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN After you are positioned on a folder where you see stsadm tool write this command:STSADM.EXE -o installfeature -filename YourListItemEventRecieverFolder\feature.xml
July 3rd, 2008 6:11pm

Hi,Sub: "Command Line Error"The solution is to actually type command, instead of copying it from somewhere. This resolves problems arising due to encoding.Refer :http://sharepointxperience.blogspot.com/2007/07/stsadm-command-line-error.htmlBye.
Free Windows Admin Tool Kit Click here and download it now
September 21st, 2008 12:53am

stsadm question so moving to Admin.
September 22nd, 2008 7:46am

Ashok, Thanx a tonn you made my day.... I was searching for the solution from couple of hours....but haven't found any..... This really worked. Regards, Aviral
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2010 4:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics