none
Sharepoint 2010 throws an exception during script execution RRS feed

  • Question

  • Hi,

    Can anyone help me?

    I have configured MS FAST Search Server 2010 with Sharepoint 2010 and MS SQL 2008 R2 on Windows 2008 R2 X64. After configuring, if I am trying to run the script integrating with Data protector 6.2

    "SharePoint_VSS_backup.ps1 -backuponly" I am getting many null value exceptions which is below:

      Root title:   Sharepoint Team Site
      -> Setting lock state to readonly
    New-Object : Exception calling ".ctor" with "1" argument(s): "searchContext"
    At C:\Program Files\OmniBack\bin\SharePoint_VSS_backup.ps1:994 char:41
    +                         $sc = new-Object <<<<  Microsoft.Office.Server.Search.Administration.Content($c)
        + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
        + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

       Crawled by:   , id
       Crawl status:
      -> Pausing background activity
    You cannot call a method on a null-valued expression.
    At C:\Program Files\OmniBack\bin\SharePoint_VSS_backup.ps1:1043 char:56
    +                             $sc.PauseBackgroundActivity <<<< ()
        + CategoryInfo          : InvalidOperation: (PauseBackgroundActivity:String) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull


      Web site URL: http://dpi5188/sites/testing
      Root title:   testing
      -> Setting lock state to readonly
    New-Object : Exception calling ".ctor" with "1" argument(s): "searchContext"
    At C:\Program Files\OmniBack\bin\SharePoint_VSS_backup.ps1:994 char:41
    +                         $sc = new-Object <<<<  Microsoft.Office.Server.Search.Administration.Content($c)
        + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
        + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

       Crawled by:   , id
       Crawl status:
      -> Pausing background activity
    You cannot call a method on a null-valued expression.
    At C:\Program Files\OmniBack\bin\SharePoint_VSS_backup.ps1:1043 char:56
    +                             $sc.PauseBackgroundActivity <<<< ()
        + CategoryInfo          : InvalidOperation: (PauseBackgroundActivity:String) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

    I am guessing that this exception is not from the Data Protector and merely from Sharepoint 2010.

    Can anyone help me on this?

    Thanks in advance.

    Sree Lakshmi

    Thursday, August 11, 2011 10:17 AM

All replies

  • Hi Sree,

    Often the exception error "You cannot call a method on a null-valued expression" can mean that you're trying to call a method on "nothing", as in:
    $null.method()

    Are you sure that you are not misspelling the object holding the method? I would suggest examining your code to try to determine why the object in question is not being created or passed on to the right variable. Let us know your results.

     Thanks!

    Rob Vazzana | Sr Support Escalation Engineer | US Customer Service & Support

    Customer Service & SupportMicrosoft | Services

    Wednesday, August 31, 2011 9:35 PM
  • You need to give yourself access to the Service Application.  I've seen the error before with the User Profile Service.
    • Edited by GrizNasty Friday, August 31, 2012 2:23 PM typo
    Friday, August 31, 2012 2:22 PM