BV Commerce Forum
»
BV Commerce Support
»
General Support
»
Object reference not set to an instance of an object.
Rank: Member
Joined: 8/16/2007(UTC) Posts: 12
|
Out of NOWHERE, all 4 of my BV sites give this error and the site breaks down completely!!! It is DRIVING ME CRAZY and BV has NO telephone number!!!!!!!!!!!!!! I am running FULL version of SQL with GIGABYTES of RAM. This is going to give me a heart attack. SOMEONE PLEASE HELP AS BV DOESN'T CARE TO RESPOND TO MY REQUESTS/CRIES FOR HELP:
<SPAN style="FONT-SIZE: 18pt; COLOR: red; FONT-FAMILY: 'Verdana','sans-serif'">Server Error in '/' Application. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<SPAN style="FONT-SIZE: 18pt; COLOR: red; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'"> <HR style="COLOR: silver" align=center width="100%" noShade SIZE=1>
<SPAN style="FONT-SIZE: 14pt; COLOR: maroon; FONT-FAMILY: 'Verdana','sans-serif'">Object reference not set to an instance of an object.<SPAN style="FONT-SIZE: 14pt; COLOR: maroon; FONT-FAMILY: 'Verdana','sans-serif'"> <o:p></o:p>
<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'">Descript<b>ion: </B><SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'">Exception Details: <SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">System.NullReferenceException: Object reference not set to an instance of an object.
<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'">Source Error:<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p>
[table class=MsoNormalTable style="BACKGROUND: #ffffcc; WIDTH: 100%; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" cellPadding=0 width="100%" border=0] [tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"][td style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0.75pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"]<SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'"> <o:p></o:p> [/td][/tr][/table]<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"> <SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'">Stack Trace:<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p>
[table class=MsoNormalTable style="BACKGROUND: #ffffcc; WIDTH: 100%; mso-cellspacing: 1.5pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 0in 0in 0in" cellPadding=0 width="100%" border=0] [tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes"][td style="BORDER-RIGHT: #f0f0f0; PADDING-RIGHT: 0.75pt; BORDER-TOP: #f0f0f0; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #f0f0f0; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #f0f0f0; BACKGROUND-COLOR: transparent"]<SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Lucida Console'"><o:p> </o:p>
<SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Lucida Console'">[NullReferenceException: Object reference not set to an instance of an object.]<o:p></o:p>
<SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Lucida Console'"> BVSoftware.Bvc5.Core.Utilities.UrlRewriter.RewritePath(HttpApplication& app, Uri sourceUrl) +311<o:p></o:p>
<SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Lucida Console'"> BVSoftware.Bvc5.Core.Utilities.UrlRewriter.app_BeginRequest(Object sender, EventArgs e) +69<o:p></o:p>
<SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Lucida Console'"> System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92<o:p></o:p>
<SPAN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Lucida Console'"> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64<o:p></o:p> [/td][/tr][/table]<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"><o:p> </o:p>
<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"> <HR style="COLOR: silver" align=center width="100%" noShade SIZE=1>
<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'">Version Information:<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'"> Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433<o:p></o:p>
|
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
Have you restarted the server?
Also, I suggest you add a 404 error redirect to your web.config. Be sure to have a 404 page on the site as well. |
|
|
|
|
Rank: Member
Joined: 8/16/2007(UTC) Posts: 12
|
Restarting IIS brings it back up. This error occurs every couple weeks out of nowhere.
|
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
I'll make the suggestion again :)
If you do not have this activated already, add a 404 error redirect to your web.config. Be sure to have a 404 page on the site as well that you are redirecting too.
A site for a client of mine would do the same thing. Would stop completely out of the blue for no reason. Noted in the error log that there were a large number of 404 errors. New domain name, old stores, so we had a ton of URL's to catch and we were bound to miss a few.
Noticed that the site's 404 error was commented out and never activated. Did that up and we have yet to see the site crash again on it's own.
Might be a similar situation for you! |
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
hello,
This error indicates that your SQL Server is not reachable. The URL Rewriter error is very popular in BV forums. if you are saying that it happens every couple of weeks, that means every so often your SQL Server is going out of reach.
Do you have SQL Server on a different machine? Check the Application event log on the SQL Server machine. That will tell you if the SQL Server service is shutting down.
Also check your NIC card on the SQL Server machine. May be its dropping a connection. This definitely is a problem with the database not being reachable. Let us know when you find the reason for this? |
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
|
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 8/16/2007(UTC) Posts: 12
|
All 4 sites do NOT go down at the same time. I am sorry if I did not explain that clearly. They go down randomly but hosted on the same SQL server (which is not the same machine).
|
|
|
|
Rank: Member
Joined: 8/16/2007(UTC) Posts: 12
|
"which is not the same machine" = SQL server is NOT the same server the SITES are hosted on.
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
I see, It shudnt happen that way. Did you try changing your SQL Server toanother machine instead of the current serve> I am 99% certain that it has to be the availability of SQL Server database.
But ideally all of them should go off at the same time if you are hosting all the databases on the same SQL instance. Did you check the event log? Do you see any errors?
Might be worth talking to Microsoft SQL Server support. |
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 8/16/2007(UTC) Posts: 12
|
Here is a response from my server company:
"You are trying to use a reference variable who's value is Nothing/null. When the value is Nothing/null for the reference variable, that means it is not actually holding a reference to an instance of any object that exists on the heap. You either never assigned something to the variable, never created an instance of the value assigned to the variable, or you set the variable equal to Nothing/null manually, or you called a function that set the variable to Nothing/null for you.
If you Google "Object reference not set to an instance of an object" you will see MANY examples of this issue with multiple ways to correct it (depending on implementation)."
I am lead to believe that this is a problem with BV...please advise.
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 2,136
Was thanked: 1 time(s) in 1 post(s)
|
The response from your server company is accurate, but not useful. It is a 3 sentence version of the error message.
What you really need to know is the underlying cause of the null reference. Why does that null reference suddenly start occurring?
Luckily, we (people that spend way too much time in the forum) has seen that particular null reference dozens of times...or at least we have seen people post exactly the same message dozens of times. I say luckily, because we know what causes the problem.
Just like Satya said, the underlying cause of the problem is that the application (BV) cannot read some information (the url pattern) from the database...hence it is null...hence the null reference.
So now the search is to find out why BV cannot read the information from the database. I agree with Satya that the most likely cause is that the database connection is broken. But it could also be a networking problem, or some .NET bug that was fixed but the hotfix was not applied to your server. Or who knows what else.
I would start looking at the various logs on the server (the event log, the database log, etc) to see if I could identify some server issue. |
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
Hello,
Your server guys are correct in providing the definition for the Null Reference Exception. But in BV5, this is the exception you get when the database is not reachable.
Do this to figure out if your database is reachable when the error occurs again in the future: 1. Write a sample web page which will connect to the database using the exact same connection string and retrieve some information from the database. See if it works. Ideally it should fail. That means your SQL Server database is not reachable at that point. 2. Try connecting to the remote SQL Server using Management Studio and see if it connects to the database under question.
If you cannot think you can do any of these two options, please consult someone who can do this for you or atleast give you instructions on how to do this. Without the proof the server company will always tell you that its a code issue and not a SQL issue. Because they dont know about how BV behaves when the database is not reachable. Does that make sense? |
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 8/16/2007(UTC) Posts: 12
|
Response from server company, any thoughts?:
"I can see a database connectivity issue causing this error, however it doesn't account for why this occurs at different times for different sites. I would also expect that once database connectivity is restored this error would go away (you may want to verify with the developers that this is the case)."
Satya, I will have my programmer develop the sample web page as you mentioned. Do you have an explanation as to why all sites do not go down at the same time? Also, if the connection is restored, why does IIS have to be restarted for the site to become active? Thank you!
|
|
|
|
Rank: Member
Joined: 8/1/2007(UTC) Posts: 310
|
I agree there. If your database is reachable after a lapse, the error should go away and the site should start working. The app pool need not be recycled to correct database connectivity issues.
As I suspected earlier in this thread, my first question was why do different sites go offline at different times. I dont understand that too. And you said all your websites are on one server and all your databases are on one server. So if there is some connectivity problem somewhere, all should go down at once. I dont have an answer to that without looking at your environment.
Anyways, get that simple connectivity page developed and see if you can connect to the database when that error occurs. Duplicate that page on all your sites as well. If you feel I should look at your environment to better troubleshoot the issue, please dont hesitate to contact me by email (my email address is in my signature). |
Thanks, Satya support @ bayquel.net Work: +1 803 883 3226 |
|
|
|
Rank: Member
Joined: 12/23/2003(UTC) Posts: 909
|
Hey Hotweazel,
Please check your web.config to see if you are redirecting 404 errors. If not, please add it to your web.config and add a corresponding 404.aspx page that loads the site.
If you have this already, I'll remove myself from the thread :) |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.