Value cannot be null.

B

Bikhod

Hi

During stress testing of our system (~ 342 transactions /
minute), we occasionally get the following error:

Value cannot be null.
Parameter name: s
[MethodName=VenusDataAccessLayer.dll::DataAccessLayer.Execu
teCommand(IDbCommand, EDataSource);
InnerExceptionType=System.ArgumentNullException;
AppDomainName=vowbusinessservicesservice.exe;
AssemblyName=VenusDataAccessLayer;
AssemblyVersion=2.0.0.0; IsHandled=False;
MachineName=ENTAP45D; ThreadId=2264; ThreadUser=;
TimeStamp=22/12/2003 13:17:09; StackTrace=
Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
..vb:line 75
at StressObject.Form1.ButtonInvoke_Click(Object sender,
EventArgs e) in c:\stressobject\form1.cs:line
293DebugStackTrace=c:\stressobject\form1.cs, Line: 332.
Next executable line: txtError.Text += ex.Message
+ "\n\n";]

Value cannot be null.
Parameter name: s


Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
..vb:line 75

Any one seen this error and fixed it?

I found references to this error on the web, however, no
one seems to have found the cause for this error.

The system is a .NET Win Form application that remotes to
a App Server that then remotes to a Database Server.

Thanks
 
S

Scott M.

It sounds like you are passing a parameter (s) somewhere that has a null
value and your DB does not allow null in this value.

Do you have a null check of your input values prior to committing them to
the DB?


Bikhod said:
Hi

During stress testing of our system (~ 342 transactions /
minute), we occasionally get the following error:

Value cannot be null.
Parameter name: s
[MethodName=VenusDataAccessLayer.dll::DataAccessLayer.Execu
teCommand(IDbCommand, EDataSource);
InnerExceptionType=System.ArgumentNullException;
AppDomainName=vowbusinessservicesservice.exe;
AssemblyName=VenusDataAccessLayer;
AssemblyVersion=2.0.0.0; IsHandled=False;
MachineName=ENTAP45D; ThreadId=2264; ThreadUser=;
TimeStamp=22/12/2003 13:17:09; StackTrace=
Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75
at StressObject.Form1.ButtonInvoke_Click(Object sender,
EventArgs e) in c:\stressobject\form1.cs:line
293DebugStackTrace=c:\stressobject\form1.cs, Line: 332.
Next executable line: txtError.Text += ex.Message
+ "\n\n";]

Value cannot be null.
Parameter name: s


Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75

Any one seen this error and fixed it?

I found references to this error on the web, however, no
one seems to have found the cause for this error.

The system is a .NET Win Form application that remotes to
a App Server that then remotes to a Database Server.

Thanks
 
B

Bikhod

Hi

Yes, all the parameters are ok. In fact the test case works 97% of the time
under stress. It's the 3% that we can not figure out. Without stress, there
is 0% failure rate.

Also, there is no where in our code where we throw an exception whose
massage is

Value cannot be null.
Parameter name: s

So, I am assuming this is coming from the .NET framework and something is
going wrong under severe stress.

Any Microsoft guys care to look up the Microsoft internal forums please?????

Scott M. said:
It sounds like you are passing a parameter (s) somewhere that has a null
value and your DB does not allow null in this value.

Do you have a null check of your input values prior to committing them to
the DB?


Bikhod said:
Hi

During stress testing of our system (~ 342 transactions /
minute), we occasionally get the following error:

Value cannot be null.
Parameter name: s
[MethodName=VenusDataAccessLayer.dll::DataAccessLayer.Execu
teCommand(IDbCommand, EDataSource);
InnerExceptionType=System.ArgumentNullException;
AppDomainName=vowbusinessservicesservice.exe;
AssemblyName=VenusDataAccessLayer;
AssemblyVersion=2.0.0.0; IsHandled=False;
MachineName=ENTAP45D; ThreadId=2264; ThreadUser=;
TimeStamp=22/12/2003 13:17:09; StackTrace=
Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75
at StressObject.Form1.ButtonInvoke_Click(Object sender,
EventArgs e) in c:\stressobject\form1.cs:line
293DebugStackTrace=c:\stressobject\form1.cs, Line: 332.
Next executable line: txtError.Text += ex.Message
+ "\n\n";]

Value cannot be null.
Parameter name: s


Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75

Any one seen this error and fixed it?

I found references to this error on the web, however, no
one seems to have found the cause for this error.

The system is a .NET Win Form application that remotes to
a App Server that then remotes to a Database Server.

Thanks
 
C

Chris Capel

I'm pretty sure this isn't a problem with the framework. If you can find
exactly where the error is occurring in your source, try catching the
exception and printing out the exact text of the SQL command (or the values
of all the parameters of the method call) you execute that gives the
exception into a text file or message box or something. This should give you
an idea of what is really happening to cause the exception.

Chris C.


Bikhod said:
Hi

During stress testing of our system (~ 342 transactions /
minute), we occasionally get the following error:

Value cannot be null.
Parameter name: s
[MethodName=VenusDataAccessLayer.dll::DataAccessLayer.Execu
teCommand(IDbCommand, EDataSource);
InnerExceptionType=System.ArgumentNullException;
AppDomainName=vowbusinessservicesservice.exe;
AssemblyName=VenusDataAccessLayer;
AssemblyVersion=2.0.0.0; IsHandled=False;
MachineName=ENTAP45D; ThreadId=2264; ThreadUser=;
TimeStamp=22/12/2003 13:17:09; StackTrace=
Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75
at StressObject.Form1.ButtonInvoke_Click(Object sender,
EventArgs e) in c:\stressobject\form1.cs:line
293DebugStackTrace=c:\stressobject\form1.cs, Line: 332.
Next executable line: txtError.Text += ex.Message
+ "\n\n";]

Value cannot be null.
Parameter name: s


Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75

Any one seen this error and fixed it?

I found references to this error on the web, however, no
one seems to have found the cause for this error.

The system is a .NET Win Form application that remotes to
a App Server that then remotes to a Database Server.

Thanks
 
S

Scott M.

I wouldn't say that is is an exception coming from the framework. It seems
like an exception coming from SQL Server. Have you taken a look at the
exception's .source and .getType?


Bikhod said:
Hi

Yes, all the parameters are ok. In fact the test case works 97% of the time
under stress. It's the 3% that we can not figure out. Without stress, there
is 0% failure rate.

Also, there is no where in our code where we throw an exception whose
massage is

Value cannot be null.
Parameter name: s

So, I am assuming this is coming from the .NET framework and something is
going wrong under severe stress.

Any Microsoft guys care to look up the Microsoft internal forums please?????

Scott M. said:
It sounds like you are passing a parameter (s) somewhere that has a null
value and your DB does not allow null in this value.

Do you have a null check of your input values prior to committing them to
the DB?


Bikhod said:
Hi

During stress testing of our system (~ 342 transactions /
minute), we occasionally get the following error:

Value cannot be null.
Parameter name: s
[MethodName=VenusDataAccessLayer.dll::DataAccessLayer.Execu
teCommand(IDbCommand, EDataSource);
InnerExceptionType=System.ArgumentNullException;
AppDomainName=vowbusinessservicesservice.exe;
AssemblyName=VenusDataAccessLayer;
AssemblyVersion=2.0.0.0; IsHandled=False;
MachineName=ENTAP45D; ThreadId=2264; ThreadUser=;
TimeStamp=22/12/2003 13:17:09; StackTrace=
Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75
at StressObject.Form1.ButtonInvoke_Click(Object sender,
EventArgs e) in c:\stressobject\form1.cs:line
293DebugStackTrace=c:\stressobject\form1.cs, Line: 332.
Next executable line: txtError.Text += ex.Message
+ "\n\n";]

Value cannot be null.
Parameter name: s


Server stack trace:
at
VoWBusinessServices.Valuation.ValuationNonTx.FetchValuation
(String userID, String ifaID, Int64 memberId, EDataSource
dataSource, EClientSource clientSource, EValuationLinks
links)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateP
rocessMessage(MethodBase mb, Object[] args, Object server,
Int32 methodPtr, Boolean fExecuteInContext, Object[]&
outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProc
essMessage(IMessage msg, Int32 methodPtr, Boolean
fExecuteInContext)

Exception rethrown at [0]:
at
VoWBusinessServicesProxy.Valuation.ValuationNonTxProxy.Fetc
hValuation(String userID, String ifaID, Int64 memberId,
EDataSource dataSource, EClientSource clientSource,
EValuationLinks links) in
W:\VenusDotNet\VoWBusinessServicesProxy\ValuationNonTxProxy
.vb:line 75

Any one seen this error and fixed it?

I found references to this error on the web, however, no
one seems to have found the cause for this error.

The system is a .NET Win Form application that remotes to
a App Server that then remotes to a Database Server.

Thanks
 
T

Tian Min Huang

Hello,

Thanks for your post. I agree with the replies from Scott and Chris that
you can add the code to catch the exceptions to check if there is any null
parameter.

If it's a multi-threaded application, please make sure that you use
synchronization objects say, mutex, etc, to protect the shared resources.
Otherwise, it may cause unpredictable problems especially under stress test.

In addition, it will be most helpful is you can provide a simple
reproducible project.

I look forward to hearing from you.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
B

Bikhod

Further detailed checks revealed the source of the problem. Our app relies
on Oracle and another database called OI. The COM wrapper for OI was the
culprit. Under stress it was corrupting the memory (we used VC++ to debug)
which was then resulting in NULL being returned to our managed code instead
of a valid string (not even an empty string was being returned).

The string was then being fed into the constructor of the XmlTextReader then
throw the exception. The only thing I don't understand is that why
XmlTextReader's constructor did not appear in the stack trace.

Thanks to everyone for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top