Larry Brister
asked on
CLR Solution failing
I have an assembly on a customer SQL Server that has been working for a year flawlessly
It passes data to a web service
Their server is a SQL 2008R2
I have the SAME Assembly loaded on a SQL 2008R2 of our own
Neither have been changed
All of a sudden the customer is timing out with the attached error
I can run the same process on my server virtually instantaneously
Any ideas?
It passes data to a web service
Their server is a SQL 2008R2
I have the SAME Assembly loaded on a SQL 2008R2 of our own
Neither have been changed
All of a sudden the customer is timing out with the attached error
I can run the same process on my server virtually instantaneously
Any ideas?
Msg 6522, Level 16, State 2, Line 2
A .NET Framework error occurred during execution of user-defined routine or aggregate "EverywareGTG":
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)
ASKER
I run the exact same function from a parallel server with exactly same setup
Works on one
And out of the blue does not work on the customers
Also
It stopped working at a specific time
Works on one
And out of the blue does not work on the customers
Also
It stopped working at a specific time
With the exact same data? This is a data condition that is causing the code to fail. Maybe some data was cleaned up which has caused a core object to become NULL.
For example, if you have a Students object with the StudentName field on it and the StudentName is NULL, trying to access Students.StudentName will result in a NULL reference exception/object reference error.
For example, if you have a Students object with the StudentName field on it and the StudentName is NULL, trying to access Students.StudentName will result in a NULL reference exception/object reference error.
As Nakul mentioned, it would be related to passing Null values to an object causing NullReferenceException.
Since it is working correctly in one machine, kindly try exporting the CLR from the working Server to the others and try once.
Steps to export CLR and deploy again below:
https://www.exacthelp.com/2012/02/how-to-transfer-or-create-clr-stored.html
Since it is working correctly in one machine, kindly try exporting the CLR from the working Server to the others and try once.
Steps to export CLR and deploy again below:
https://www.exacthelp.com/2012/02/how-to-transfer-or-create-clr-stored.html
ASKER
Folks,
I understand what you are saying... and I would normally agree...
But... watch the progression
I unloaded the assembly on each of the two MS SQL Server 2008R2 instances
I reloaded on each exactly the same
On our server it executes perfectly
On the customers it returns the error
In addition...
On BOTH operating systems I can load the web service they are posting to directly in a browser and invoke directly
I have no explanation for that. Do you?
I understand what you are saying... and I would normally agree...
But... watch the progression
I unloaded the assembly on each of the two MS SQL Server 2008R2 instances
I reloaded on each exactly the same
On our server it executes perfectly
On the customers it returns the error
In addition...
On BOTH operating systems I can load the web service they are posting to directly in a browser and invoke directly
I have no explanation for that. Do you?
DECLARE @tourConfirmation NCHAR(255)
SET @tourConfirmation = ( SELECT dbo.EverywareGTG('ew6F98', 'DB8E0DE3', '000','010','TSW_ID','FirstName','LastName','IsOwner',
'lrbrister@myweb.com','AccomName','AccomAddress','AccomState','CheckinDate','CheckinTime','CheckoutTime',
'AccomNights','TourDate_Disp','TourWave','TourLocation', 'ContactUsPhone','DateAdded','837',
'AccomCreationDate','AccomPhone','ActivitySeason','CampaignName','CancellationPeriod','CheckinDate_Disp',
'CheckInDayOfWeek','CheckoutDate', 'CheckoutDate_Disp','ContactUsEmail','ContactUsSignature',
'OpenDate','OpenExpirationDate', 'OpenExpirationDate_Unix','OpenMonths','OwnerAgentName',
'OwnerLottoPreferenceLevel','OwnerLottoRequest', 'OwnerLottoUse','OwnerNumber','OwnershipSeason',
'OwnershipUnitSize','OwnershipWeekType', 'OwnershipWeekUse','PackageAmount','PackageValue','PetFriendly',
'Phone','PremiumMessage', 'ProgramName','RescheduleByDate','RescheduleDays','ReservationStatus',
'ReservationSubType','ReservationSuperType','ReservationType','RoomType','SiteName','SitesOwned','State',
'TourCreationDate','TourDate','TourLocation_Disp','TourStatus','UpdatedDate','UserKey','Variable1','Variable2',
'Variable3','Variable4','Variable5','Variable6','WeekEndNight', 'OpenAccomNights')
)
SELECT @tourConfirmation
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That did it!
No ide why that was needed but it worked. Thanks
No ide why that was needed but it worked. Thanks
Once you have the parameters, see which ones are NULL and whether you have appropriate (string.IsNullOrEmpty) checks in the place to handle NULL values in the code.