|
Home > Archive > Commerce Server General > February 2007 > Site Global Error
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Steve H. 2007-01-31, 1:16 pm |
| Hello,
I was working on my MSCS 2007 site, the last I remember doing was adding a
weakly typed property to the Purchase Ordes. OrderObjectMappings.xml, I ran
the ordermapping.exe and everything was going ok.
Then an error occured, an invalid Cast from DBNull to String... It occured
on every page, as if this is happening before even processing the pages so I
think it's GLOBAL to the entire site.
I dont remember changing any connection values or strings.
Here is the trace stack and whatever information is displayed in it...
Any help regarding this issue is extremely appreciated.
Thanks
Unable to cast object of type 'System.DBNull' to type 'System.String'.
Description: 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.
Exception Details: System.InvalidCastException: Unable to cast object of
type 'System.DBNull' to type 'System.String'.
Source Error:
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.
Stack Trace:
[InvalidCastException: Unable to cast object of type 'System.DBNull' to type
'System.String'.]
Microsoft.CommerceServer.Runtime.Orders.OrderContext.ValidateXmlFileWithSql(SchemaMapping mapping, String connStr, Int32 timeout) +1238
Microsoft.CommerceServer.Runtime.Orders.OrderContext. CreateSchemaAndPipelineMapping(SchemaMap
ping&
schemaMapping, PipelineAdapter& pipelineAdapter, String appRootPath,
CommerceOrdersConfiguration ordersConfiguration) +259
Microsoft.CommerceServer.Runtime.Orders.OrderContext.Initialize(String
transactionResourceConnectionString, String
transactionConfigResourceConnectionStrin
g) +210
Microsoft.CommerceServer.Runtime.Orders.OrderContext.Create(String
transactionResourceConnectionString, String
transactionConfigResourceConnectionStrin
g) +114
Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.CreateOrderContext() +68
Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.get_OrderContext() +87
Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.OnBeginRequest(Object sender, EventArgs e) +18
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +64
| |
| Steve H. 2007-02-08, 7:18 pm |
| I guess I figured it out, it was simply a problem with my database column,
having a default value. This error occured after I added a new weakly typed
property to the purchase order table, I wanted to assign a default value of
false.
It wasn't till later that I realized what I did. I guess the error itself
(cannot convert dbnull to string was kinda confusing)
"Steve H." wrote:
> Hello,
>
> I was working on my MSCS 2007 site, the last I remember doing was adding a
> weakly typed property to the Purchase Ordes. OrderObjectMappings.xml, I ran
> the ordermapping.exe and everything was going ok.
>
> Then an error occured, an invalid Cast from DBNull to String... It occured
> on every page, as if this is happening before even processing the pages so I
> think it's GLOBAL to the entire site.
>
> I dont remember changing any connection values or strings.
>
> Here is the trace stack and whatever information is displayed in it...
>
> Any help regarding this issue is extremely appreciated.
> Thanks
>
>
>
> Unable to cast object of type 'System.DBNull' to type 'System.String'.
> Description: 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.
>
> Exception Details: System.InvalidCastException: Unable to cast object of
> type 'System.DBNull' to type 'System.String'.
>
> Source Error:
>
> 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.
>
> Stack Trace:
>
> [InvalidCastException: Unable to cast object of type 'System.DBNull' to type
> 'System.String'.]
>
> Microsoft.CommerceServer.Runtime.Orders.OrderContext.ValidateXmlFileWithSql(SchemaMapping mapping, String connStr, Int32 timeout) +1238
>
> Microsoft.CommerceServer.Runtime.Orders.OrderContext. CreateSchemaAndPipelineMapping(SchemaMap
ping&
> schemaMapping, PipelineAdapter& pipelineAdapter, String appRootPath,
> CommerceOrdersConfiguration ordersConfiguration) +259
> Microsoft.CommerceServer.Runtime.Orders.OrderContext.Initialize(String
> transactionResourceConnectionString, String
> transactionConfigResourceConnectionStrin
g) +210
> Microsoft.CommerceServer.Runtime.Orders.OrderContext.Create(String
> transactionResourceConnectionString, String
> transactionConfigResourceConnectionStrin
g) +114
>
> Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.CreateOrderContext() +68
>
> Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.get_OrderContext() +87
>
> Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.OnBeginRequest(Object sender, EventArgs e) +18
>
> System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +64
>
>
>
>
>
>
|
|
|
|
|