none
Method not found

    Question

  • Hello there,

    I've a project in Biztalk and had to do some changes directly in Production system.

    I then copied the Visual Studio 2010 project to the development server and built and deployed the project to the development server.

    In Production everything works fine but in the development server I get the following error: 

    Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Maeil_Orchestra_EDI.MessageValidationOrchestration(37ed562a-0832-6991-2648-ceede732ccd2)'.

    The service instance will remain suspended until administratively resumed or terminated. 

    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.

    InstanceId: 86617614-8c36-432b-abad-9420a950ca49

    Shape name: 

    ShapeId: 

    Exception thrown from: segment -1, progress -1

    Inner exception: Method not found: 'Void MscLinkValidation.BusinessLogic.Validation..ctor(System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String)'.

     

    Exception type: MissingMethodException

    Source: Maeil Orchestra EDI

    Target Site: Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions)

    ********************************************

     

    In VS2010 (C#) I have :

    public Validation(string senderId, string messageId, string containerId, string modeTransport, string full, string Filename, string equipmentType, string vesselName, string voyageNumber, string pol, string pod, string movementDateTime, string equipmentStatus, string maximumGrossWeight, string reference, string blNumber)

    And this is called like this inside an Orchestration :

    validationService = new MscLinkValidation.BusinessLogic.Validation(InMsg.SenderId, InMsg.MessageId, InMsg.EquipmentId, InMsg.ModeTransport, InMsg.Full, 

    InMsg(FILE.ReceivedFileName), InMsg.EquipmentType, InMsg.VesselName, InMsg.VoyageNumber, InMsg.POLLocode, InMsg.PODLocode, InMsg.MovementDateTime, InMsg.EquipmentStatus, InMsg.MaximumGrossWeight, InMsg.Reference, InMsg.BLNumber);

     

    Can understand why I'm getting this error as it is exactly equal to the Production environment.

     

    Thanks.

     

    Wednesday, November 16, 2011 2:26 PM

Answers

  • did you check whether the assembly you're deploying is the latest version (by timestamp) ?

    Try:

    Terminated existing instances for this orchestration.

    Unenlist + Remove.

    Remove the assembly from GAC by deleting folder C:\Windows\Microsoft.NET\assembly\[Your assembly]

    Restart Host Instance.

    Deploy the latest version of assembly.


    Randy Aldrich Paulo

    MCTS(BizTalk 2010/2006,WCF NET4.0), MCPD | My Blog


    • Edited by Randy Aldrich Paulo Wednesday, November 16, 2011 4:07 PM
    • Marked as answer by Nelson Andre Wednesday, November 16, 2011 4:31 PM
    • Unmarked as answer by Nelson Andre Wednesday, November 16, 2011 4:32 PM
    • Marked as answer by Nelson Andre Thursday, November 17, 2011 3:37 PM
    Wednesday, November 16, 2011 4:06 PM

All replies

  • Try restarting the host instance of the host wherein your orchestration is binded. 

    Randy Aldrich Paulo

    MCTS(BizTalk 2010/2006,WCF NET4.0), MCPD | My Blog




    Wednesday, November 16, 2011 2:51 PM
  • Already had done that without success.

    Rebuilt the C# project where that method is from and refreshed it in Biztalk (Add -> Biztalk Assemblies; Refresh, Stop, Start, Restart server).

    Wednesday, November 16, 2011 2:54 PM
  • Hi,

    Perhaps you did not deploy the latest version of the assembly containing the Validation method.

    Regards,

    René

    Wednesday, November 16, 2011 2:54 PM
  • Rene,

    As I said in the previous message (but adding some more info), I have deployed the Biztalk project from VS2010, then configured everything in Biztalk (ports, etc).

    Tested and got the error, then just to be sure, I rebuilt the C# project where that method is and added it to Biztalk (Add -> Biztalk Assemblies; Refresh, Stop, Start, Restart server).

    Tested again and still get same error.


    Wednesday, November 16, 2011 2:59 PM
  • Did you also tick the checkbox 'Add to global assembly cache on add resource'?

    Wednesday, November 16, 2011 3:20 PM
  • I always tick :

    - Overwrite All

    - Add to the global assembly cache on add resource

     

    Thanks

    Wednesday, November 16, 2011 3:28 PM
  • did you check whether the assembly you're deploying is the latest version (by timestamp) ?

    Try:

    Terminated existing instances for this orchestration.

    Unenlist + Remove.

    Remove the assembly from GAC by deleting folder C:\Windows\Microsoft.NET\assembly\[Your assembly]

    Restart Host Instance.

    Deploy the latest version of assembly.


    Randy Aldrich Paulo

    MCTS(BizTalk 2010/2006,WCF NET4.0), MCPD | My Blog


    • Edited by Randy Aldrich Paulo Wednesday, November 16, 2011 4:07 PM
    • Marked as answer by Nelson Andre Wednesday, November 16, 2011 4:31 PM
    • Unmarked as answer by Nelson Andre Wednesday, November 16, 2011 4:32 PM
    • Marked as answer by Nelson Andre Thursday, November 17, 2011 3:37 PM
    Wednesday, November 16, 2011 4:06 PM
  • I bet your orchestration isn't picking up the changes in the assembly at design time. Try cleaning and rebuilding your helper project, then your orchestration project.

     

    I bet the orchestration project will blow up and show you the problem. Might be a parameter type mismatch or a spelling error or something tiny. I've been in the situation you're describing, pulling my hair out, only to find it was my IDE that was actually tricking me.


    • Edited by Bon Franklin Wednesday, November 16, 2011 4:28 PM
    Wednesday, November 16, 2011 4:27 PM
  • Randy,

    following your instructions it does not give the error now.

    But the message went to DEHYDRATED ORCHESTRATIONS.

    Something is keeping the message from getting processed.

    Wednesday, November 16, 2011 4:34 PM
  • Nelson,

    I didn't understand, why do you have to new your class, because if you use a variable the new is done in the constructor, however usually it is empty

    So you define your variable as toto of type (MscLinkValidation.BusinessLogic) object, the newing is done already here.  Then you call your method toto.Validation(your parameters here)

    I never succeeded in calling the new inside an orchestration.

    Then if you use static classes, you need to be aware of thread safe scenarios

    Regards,

    Stefan

     


    BizTalk Consultant in France
    • Proposed as answer by BizTalk - Paris Thursday, November 17, 2011 9:07 AM
    Wednesday, November 16, 2011 4:45 PM
  • Stefan,

    That particular part was done by another person and as it always worked for several years until know, I never changed a thing.

     

    Thursday, November 17, 2011 3:39 PM