Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

SQL CLR function/Assembly error all of a sudden

I have a clr assembly installed on SQL Server 2008R2
It has been working flawlessly for 4 months
Not 1 iota of code has been changed
If calls a web service
Not one thing has been changed on the web service

Out of the blue I am getting this message on the invoke

Msg 6522, Level 16, State 2, Line 2
A .NET Framework error occurred during execution of user-defined routine or aggregate "MyGTG": 
System.NullReferenceException: Object reference not set to an instance of an object.
System.NullReferenceException: 
   at HelloEveryware.PassIn.GTG(String user, String token, String PID, String OID, String TSW_ID, String FirstName, String LastName, String IsOwner, String EmailAddress, String AccomName, String AccomAddress, String AccomState, String CheckinDate, String CheckinTime, String CheckoutTime, String AccomNights, String TourDate_Disp, String TourWave, String TourLocation, String ContactUsPhone, String DateAdded, String SendNow, String AccomCreationDate, String AccomPhone, String ActivitySeason, String CampaignName, String CancellationPeriod, String CheckinDate_Disp, String CheckInDayOfWeek, String CheckoutDate, String CheckoutDate_Disp, String ContactUsEmail, String ContactUsSignature, String OpenDate, String OpenExpirationDate, String OpenExpirationDate_Unix, String OpenMonths, String OwnerAgentName, String OwnerLottoPreferenceLevel, String OwnerLottoRequest, String OwnerLottoUse, String OwnerNumber, String OwnershipSeason, String OwnershipUnitSize, String OwnershipWeekType, String OwnershipWeekUse, String PackageAmount, String PackageValue, String PetFriendly, String Phone, String PremiumMessage, String ProgramName, String RescheduleByDate, String RescheduleDays, String ReservationStatus, String ReservationSubType, String ReservationSuperType, String ReservationType, String RoomType, String SiteName, String SitesOwned, String State, String TourCreationDate, String TourDate, String TourLocation_Disp, String TourStatus, String UpdatedDate, String UserKey, String Variable1, String Variable2, String Variable3, String Variable4, String Variable5, String Variable6, String WeekEndNight, String OpenAccomNights)
.

Open in new window

Avatar of ste5an
ste5an
Flag of Germany image

Somthing in the .NET code path allows that you work with untested object references. Thus rework the code. Add error handling in each method. Add guard clauses to test whether all used object variables are not null.
Avatar of Larry Brister

ASKER

ste5an
You have an example?
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So very sorry for this terribly late reply.

I live in (very) south Florida and we have been rebuilding since Irma