Site Global Error
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Site Global Error




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Site Global Error  
Steve H.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-31-07 06: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 abou
t
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.CreateSchemaAndPipeline
Mapping(SchemaMapping&
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.CreateOrderConte
xt() +68

Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.get_OrderContext
() +87

Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.OnBeginRequest(O
bject sender, EventArgs e) +18

System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.
Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +64











[ Post a follow-up to this message ]



    RE: Site Global Error  
Steve H.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-09-07 12:18 AM

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 ra
n
> 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 ab
out
> 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 w
eb
> request. Information regarding the origin and location of the exception ca
n
> be identified using the exception stack trace below.
>
> Stack Trace:
>
> [InvalidCastException: Unable to cast object of type 'System.DBNull' t
o type
> 'System.String'.]
>
> Microsoft.CommerceServer.Runtime.Orders.OrderContext.ValidateXmlFileWithSq
l(SchemaMapping mapping, String connStr, Int32 timeout) +1238
>
> Microsoft.CommerceServer.Runtime.Orders.OrderContext.CreateSchemaAndPipeli
neMapping(SchemaMapping&
> 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.CreateOrderCon
text() +68
>
> Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.get_OrderConte
xt() +87
>
> Microsoft.CommerceServer.Runtime.Orders.CommerceOrderModule.OnBeginRequest
(Object sender, EventArgs e) +18
>
> System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionSte
p.Execute() +92
>    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
> completedSynchronously) +64
>
>
>
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:13 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register