SharePoint User Group UK

Share the knowledge!

Welcome to SharePoint User Group UK Sign in | Join | Help
in
Home Blogs Forums Photos Files Roller

Null error and not sure what is null

Last post 08-13-2008, 11:25 AM by richiej. 12 replies.
Sort Posts: Previous Next
  •  08-07-2008, 2:05 PM 12812

    Null error and not sure what is null

    Hi

     

    I am writing a custom workflow and have completed the development of it. I am now trying to test the workflow. I developed the workflow in VS2008 and using MOSS 2007.

    I have no association form but do have an Initiation form. I have completed both workflow.xml and feature.xml as expected. However when I try to start the workflow on a test document in one of my document lists I get an "unknown error". Looking through the SharePoint logs, this entry appears to be relevant:


    08/07/2008 13:58:43.11  w3wp.exe (0x1040)                        0x0A24 Windows SharePoint Services    General                        8dzz High     Exception Type: System.NullReferenceException  Exception Message: Object reference not set to an instance of an object.

     

    So it looks like something is Null or not instatiated. However, placing a break point in the "onWorkflowActivated" method proves that the workflow doesn't even get as far as that.

    What object(s) could be Null?

     

    Thanks

  •  08-07-2008, 2:34 PM 12814 in reply to 12812

    Re: Null error and not sure what is null

    Hi Richie,

    Does the initiation form display at all or does the error occur before the form appears?

    Paul.


    www.myfatblog.co.uk
    MCTS: WSS 3.0
    MCTS: MOSS 2007
  •  08-07-2008, 2:37 PM 12815 in reply to 12812

    Re: Null error and not sure what is null

    I have noticed on re-running the workflow that in the logs, when i see the error listed above, there is also an entry directly above:


    08/07/2008 14:31:39.70  OWSTIMER.EXE (0x0980)                    0x1438 Search Server Common           MS Search Administration       7hmh High     exception in SearchUpgradeProvisioner Keyword Config System.InvalidOperationException: jobServerSearchServiceInstance is null     at Microsoft.Office.Server.Search.Administration.SearchUpgradeProvisioner..ctor(SearchServiceInstance searchServiceInstance)     at Microsoft.Office.Server.Search.Administration.OSSPrimaryGathererProject.ProvisionContentSources() 

     

    Does this have anything to do with my problem?

    What is SearchServiceInstance?

     

    thaks

  •  08-07-2008, 2:52 PM 12819 in reply to 12814

    Re: Null error and not sure what is null

    thanks for your reply, no the initiation form does not get loaded, the error occurs before then
  •  08-07-2008, 3:05 PM 12821 in reply to 12819

    Re: Null error and not sure what is null

    Ok, it looks like the problem is to do with the association of the workflow to the library or in that area. My first thought was a problem with the forms, but normally that appears as a "Form has been closed" message. Double check that the forms have copied into the feature folder just to be on the safe side.

    The other thing would be to add an initiation form that just has a Submit to Host environment button on it and check that this appears when you associate the workflow with the library.

    Paul.


    www.myfatblog.co.uk
    MCTS: WSS 3.0
    MCTS: MOSS 2007
  •  08-07-2008, 3:16 PM 12823 in reply to 12821

    Re: Null error and not sure what is null

    Hi, thanks for the tips.

     

    Yes my forms appear in the feature folder.

     

    I created a fake Init form as suggested and that appeared as expected. So there must be a problem with my main Init form. Not sure what though.

  •  08-07-2008, 3:27 PM 12825 in reply to 12823

    Re: Null error and not sure what is null

    Hmm.. double check the URN's that you've specified in your workflow.xml just in case there is a spelling mistake. Also, is the init form doing anything that needs data bringing into the form or is it all processed after the submit?

    Paul.


    www.myfatblog.co.uk
    MCTS: WSS 3.0
    MCTS: MOSS 2007
  •  08-07-2008, 3:36 PM 12827 in reply to 12825

    Re: Null error and not sure what is null

    URNs are fine, I copied and paste them but did it again anyway

     

    Yes, I have a source file "context.xml" which has:

    <Context siteUrl="http://lon36346-vm01:10002/sites/SCRDev" />

    as its only contents.

    I need this for my contact selectors. But I checked the box to automatically retreive data when form is opened.

    Do you think this is the issue?

    Many thanks

  •  08-07-2008, 3:40 PM 12828 in reply to 12827

    Re: Null error and not sure what is null

    The fact that the form doesn't appear and you just get a sharepoint error screen makes me think it's the pre processing of the form thats causing the error. It's a shame you're not getting a better log entry as that would help.

    With regards to the context file, are you storing that as a resource file in the form template?


    www.myfatblog.co.uk
    MCTS: WSS 3.0
    MCTS: MOSS 2007
  •  08-07-2008, 3:47 PM 12829 in reply to 12828

    Re: Null error and not sure what is null

    Yes, I am storing the context file as a resource file.

    Short of rebuilding the form I am not sure what to do, but there's no guarantee that rebuilding/restarting the form would work.

  •  08-07-2008, 4:34 PM 12832 in reply to 12829

    Re: Null error and not sure what is null

    Having had a quick flick through the InfoPath blog post on using the contact selector tool, they seem very keen on the capitalisation of the various parts.. It's possibly worth double checking.. http://blogs.msdn.com/infopath/archive/2007/02/28/using-the-contact-selector-control.aspx

    On that post it suggests that you don't need to use the context.xml when you're running the form in a browser based session as it usies the session context instead.. so maybe remove the resource file from the form and try that way?


    www.myfatblog.co.uk
    MCTS: WSS 3.0
    MCTS: MOSS 2007
  •  08-07-2008, 4:43 PM 12833 in reply to 12832

    Re: Null error and not sure what is null

    thanks for your help on this. I will have a look at that today. I have to go to client sites for the next days so if I cant solve it today I will have to look at it again on wedneday next week

    thanks for your help

  •  08-13-2008, 11:25 AM 12963 in reply to 12833

    Re: Null error and not sure what is null

    thanks for the link and all your help. My problem was with my data sources, I didn't realise the naming convention had to be exact, so thanks for that!
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems