locked
Timer Job .wsp file RRS feed

  • Question

  • Hi,

    I want to deploy a timer job of one server to different server.

    I have a timer job on my test system and I want to use it on my production system, I am trying to deploy the wsp file of the timer job through cmd (stsadm) command.

    Timer job will add the solution but showing error in deployment.

    Pls help to solve the issue.

    Is it possible to use timer job of one server to different server.

    tks,

    Vidhu 

    Wednesday, January 2, 2013 5:37 AM

Answers

  • The timer job is not showing in Monitor in CA because the JobDefinition has not been instantiated yet. sometimes, it is instantiated in FeatureActivated events, where you get the unexpected error:http://blogs.msdn.com/b/sharepointdev/archive/2012/02/21/dynamically-retrieve-a-collection-url-from-a-timer-job-during-deployment-jayant-kumar-prabhakar.aspx

    You can attach to w3wp process with Visual Studio to debug the code in FeatureActivated event to troubleshoot the error.


    • Edited by GuYuming Friday, January 4, 2013 5:33 AM
    • Marked as answer by Hemendra Agrawal Friday, January 11, 2013 9:57 AM
    Friday, January 4, 2013 5:32 AM
  • While activating the feature you might also get access denied in such case it might also lead to unexpected error. To resolve this you have to set false  for remoteadministratoracessdenied. Check this post

    http://www.sharepointblues.com/2010/10/22/custom-spjobdefinition-and-access-denied-error/

    let me know the status


    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

    Friday, January 4, 2013 11:01 AM

All replies

  • HI Vidhu,

    >Timer job will add the solution but showing error in deployment.

    What is the error? Please provide more detail of your timer job.


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Wednesday, January 2, 2013 5:51 AM
  • Hi Hemendra,

    Thanks for your reply.

    After deployment it is showing "This solution contains no resources scoped for a web application and cannot be deployed to a particular Web Application".

    Kindly Suggest.

    tks,

    Vidhu

    Wednesday, January 2, 2013 10:17 AM
  • Hi,

    Related to this error :

    The solution has no web application scoped resources, which usually means there are no SafeControl entries to be made in the web apps web.config, if you really must deploy to specific web applications you could add a dummy class to your assembly which inherits from Control, this will force a SafeControl entry to be added to web.config – assuming you’re using WSPBuilder.

    Moreover you can also refer this link which will be helpful for you.

    http://www.sharepointdiary.com/2012/05/error-this-solution-contains-no.html


    Thanks, Ali Yasir

    Wednesday, January 2, 2013 10:35 AM
  • The possibilities will be

    1. Make sure you have made safe control entries in the web.config check this out

    http://social.technet.microsoft.com/forums/en/sharepointadminprevious/thread/3eca2d21-8da9-4695-94ae-9d19213cc4f8

    http://platinumdogs.me/2010/05/05/sharepoint-developing-custom-timer-jobs/ 

    check the comments sections 

    2. Remove the url parameter in the stsadm command check this out

    http://www.sharepointdiary.com/2012/05/error-this-solution-contains-no.html


    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

    Wednesday, January 2, 2013 10:41 AM
  • Hi Raghavendra,

    >Remove the url parameter in the stsadm command check this out

    -http://www.sharepointdiary.com/2012/05/error-this-solution-contains-no.html

    I have tried above solution, the timer job was installed properly.

    But when I am tring to activate this feature from site collection administrator it is showing "Unexpected error".

    Kindly suggest.

    tks,

    Vidhu

    Wednesday, January 2, 2013 11:48 AM
  • great.. so the query is resolved for unexepected error it can be due to administrator privelages. Please provide details of the exception. if its giving access denied exception check the resolutions.

    http://support.microsoft.com/kb/2564009?wa=wsignin1.0

    Please mark respective reply as answer. it will be helpful for other user or vote as helpful.


    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

    Wednesday, January 2, 2013 12:04 PM
  • Hi,

    Deployment of timer job has been done but not able to find that in central administrator.

    Can you pls tell where can I find that.

    And I am using system account for deployment.

    tks

    Vidhu.


    • Edited by vidhu281 Thursday, January 3, 2013 9:26 AM
    Thursday, January 3, 2013 9:24 AM
  • Hi,

    Are you able to see your job in farm solution section? Go to central admin-->system settings-->click "manage farm solutions" in farm management section. Now confirm that whether you are able to see your solution or not. If your solution is there then check the status (it should be "Deployed").

    If status is deployed then go to Monitor-->click "review job definition". See if your job is listed there or not. If it is listed then click on your job and click "run now"

    Let us know your result


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Thursday, January 3, 2013 11:08 AM
  • Hi,

    Thats the issue Hemendra I am not able to see my timer job in farm solution.

    The deployment is done through stsadm it shows timer job created but not available in there.

    kindly suggest.

    tks

    Vidhu

    Thursday, January 3, 2013 11:30 AM
  • Hi,

    Now you have tell us that how you are creating timer job. Also paste your feature.xml file. You can also see the files in your wsp solution: change your wsp file extension to cab and open it. (take backup of yoru wsp file before editing)


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Thursday, January 3, 2013 11:52 AM
  • Hi,

    Deployment has been done I can see it in farm solution as status "Deployed" .

    But it is not showing in Monitor under "review job definition".

    Also I can see it in my site collection administration as "deactivated" and when I am trying to activate it it is showing unexpected error.

    kindly suggest.

    tks

    Vidhu

    Thursday, January 3, 2013 11:54 AM
  • Chek the logs, and try to activate feature through Powershell, you will get more idea why feature is not getting activated.

    Please mark answer , if you think answer is helpful or correct.

    Thursday, January 3, 2013 12:07 PM
  • please restart your sharepoint timer job service and check

    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

    Thursday, January 3, 2013 12:35 PM
  • The timer job is not showing in Monitor in CA because the JobDefinition has not been instantiated yet. sometimes, it is instantiated in FeatureActivated events, where you get the unexpected error:http://blogs.msdn.com/b/sharepointdev/archive/2012/02/21/dynamically-retrieve-a-collection-url-from-a-timer-job-during-deployment-jayant-kumar-prabhakar.aspx

    You can attach to w3wp process with Visual Studio to debug the code in FeatureActivated event to troubleshoot the error.


    • Edited by GuYuming Friday, January 4, 2013 5:33 AM
    • Marked as answer by Hemendra Agrawal Friday, January 11, 2013 9:57 AM
    Friday, January 4, 2013 5:32 AM
  • While activating the feature you might also get access denied in such case it might also lead to unexpected error. To resolve this you have to set false  for remoteadministratoracessdenied. Check this post

    http://www.sharepointblues.com/2010/10/22/custom-spjobdefinition-and-access-denied-error/

    let me know the status


    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

    Friday, January 4, 2013 11:01 AM