Hello,

I'm getting an exception during schema upgrade with DO 4.3 (Release version) after update from previous version.

The domain build mode is "Perform".

System.InvalidOperationException occurred
  Message=Incorrect command parameters.
  Source=Xtensive.Storage.Providers.Sql
  StackTrace:
       at Xtensive.Storage.Providers.Sql.SqlActionTranslator.ProcessUpdateDataAction(DataAction action)
       at System.Collections.Generic.List`1.ForEach(Action`1 action)
       at Xtensive.Storage.Providers.Sql.SqlActionTranslator.ProcessClearDataActions()
       at Xtensive.Storage.Providers.Sql.SqlActionTranslator.Translate()
       at Xtensive.Storage.Providers.Sql.SchemaUpgradeHandler.UpgradeSchema(ActionSequence upgradeActions, StorageInfo sourceSchema, StorageInfo targetSchema)
       at Xtensive.Storage.Building.Builders.DomainBuilder.SynchronizeSchema(SchemaUpgradeMode schemaUpgradeMode)
       at Xtensive.Storage.Building.Builders.DomainBuilder.BuildDomain(DomainConfiguration configuration, DomainBuilderConfiguration builderConfiguration)
       at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildStageDomain(UpgradeStage stage)
       at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration)
       at Xtensive.Storage.Domain.Build(DomainConfiguration configuration)

To be precise I'm not seeing it in debugger only (it is not caught by your code)

Do you need additional information?

Besides the assemblies from the installer do not have the same file version : is this normal?

Regards,


Updated at 15.07.2010 9:43:07

It would be difficult not to give you our complete application, and I would like to avoid this if possible.

An information I can add is that I've looked at the "action" parameter of method Xtensive.Storage.Providers.Sql.SqlActionTranslator.ProcessUpdateDataAction(DataAction action)

It show like this in debugger: {Update 'Tables/SPB.Tools.FileManipulation.ImportFile' set () where ()} Xtensive.Modelling.Actions.DataAction

Property "Difference" shows {"./Tables/SPB.Tools.FileManipulation.ImportFile" != "./Tables/SPB.Tools.FileManipulation.ImportFile" (NodeDifference): Unknown DataChanged} Xtensive.Modelling.Comparison.Difference {Xtensive.Modelling.Comparison.NodeDifference}

I'm sorry to report this issue with so little debug information, nevertheless it's a big issue for us.

I'm pasting below screenshots from visual studio : tell me if it helps, or if you need more specific information I would be able to find with debugger.

[attachment=1:3hx3p33v]do1.png[/attachment:3hx3p33v] [attachment=0:3hx3p33v]do2.png[/attachment:3hx3p33v]


Updated at 16.07.2010 9:27:41

I can confirm the problem is still there with latest 4.3 release.

I will try to understand the problem, with newly provided pdbs.


Updated at 19.07.2010 8:08:48

Hello,

I managed to reproduce it with a sample project: http://olorin.dinauz.org/temp/TestDoUpgradeBug.zip

Steps to reproduce: * Build the project with DO 4.3 RC4 * Launch in Recreate mode * Build the project with 4.3 release

In short for you : You can use the .bak file to get the DB at the state after recreate on RC version. Then launch the project in .zip, and should the exception.


Updated at 21.07.2010 12:54:57

Any news on this problem?

It still occurs with build 5605


Updated at 21.07.2010 14:26:43

Please sleep, that's not that important! ;)

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Jul 13 '10 at 14:39

olorin's gravatar image

olorin
358848792

Domain build code + database backup (at least, schema) would help the best.

It seems this is really a bug.

(Jul 13 '10 at 14:39) Alex Yakunin Alex%20Yakunin's gravatar image

"Domain build code" = actually, something we can launch to reproduce this, e.g. even your own .exe is enough.

(Jul 13 '10 at 14:39) Alex Yakunin Alex%20Yakunin's gravatar image

You can send us .exe + database backup allowing to reproduce the problem here.

(Jul 13 '10 at 14:39) Alex Yakunin Alex%20Yakunin's gravatar image

I downloaded the test - you can remove it.

(Jul 13 '10 at 14:39) Alex Yakunin Alex%20Yakunin's gravatar image

I will be trying to fix it today (till the morning ;) ).

(Jul 13 '10 at 14:39) Alex Yakunin Alex%20Yakunin's gravatar image

I can't sleep while some customers aren't satisfied. The only way to make me sleep is to stop posting bug reports here ;)

(Jul 13 '10 at 14:39) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

mahdness wrote:

You should be writing that NHibernate comparison, not fixing bugs (or even worse, sleeping!!!) :wink:

Of course I'm joking (maybe :wink:)... but anyway once you get that published I'm sure many customers are going to comment about the amazing support as being a huge asset for DO.


xumix wrote:

Just got the same @ latest 4.3.1

Server Error in '/test' Application.

Incorrect command parameters.

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.InvalidOperationException: Incorrect command parameters.

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:

[InvalidOperationException: Incorrect command parameters.]
   Xtensive.Storage.Providers.Sql.SqlActionTranslator.ProcessUpdateDataAction(DataAction action) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage.Providers.Sql\SqlActionTranslator.cs:726
   System.Collections.Generic.List`1.ForEach(Action`1 action) +145
   Xtensive.Storage.Providers.Sql.SqlActionTranslator.ProcessClearDataActions() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage.Providers.Sql\SqlActionTranslator.cs:695
   Xtensive.Storage.Providers.Sql.SqlActionTranslator.Translate() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage.Providers.Sql\SqlActionTranslator.cs:176
   Xtensive.Storage.Providers.Sql.SchemaUpgradeHandler.UpgradeSchema(ActionSequence upgradeActions, StorageInfo sourceSchema, StorageInfo targetSchema) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage.Providers.Sql\SchemaUpgradeHandler.cs:54
   Xtensive.Storage.Building.Builders.DomainBuilder.SynchronizeSchema(SchemaUpgradeMode schemaUpgradeMode) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Building\Builders\DomainBuilder.cs:312
   Xtensive.Storage.Building.Builders.DomainBuilder.BuildDomain(DomainConfiguration configuration, DomainBuilderConfiguration builderConfiguration) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Building\Builders\DomainBuilder.cs:67
   Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildStageDomain(UpgradeStage stage) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Upgrade\UpgradingDomainBuilder.cs:77
   Xtensive.Storage.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Upgrade\UpgradingDomainBuilder.cs:56
   Xtensive.Storage.Domain.Build(DomainConfiguration configuration) in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Domain.cs:225
   Werp.View.DomainBuilder.Build() +700
   Xtensive.Storage.Web.SessionManager.EnsureDomainIsBuilt() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Web\SessionManager.cs:281
   Xtensive.Storage.Web.SessionManager.get_Domain() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Web\SessionManager.cs:154
   Xtensive.Storage.Web.SessionManager.ProvideSession() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Web\SessionManager.cs:240
   Xtensive.Storage.Web.SessionManager.EnsureSessionIsProvided() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Web\SessionManager.cs:287
   Xtensive.Storage.Web.SessionManager.get_Session() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Web\SessionManager.cs:174
   Xtensive.Storage.Web.SessionManager.<System.Web.IHttpModule.Init>b__4() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Web\SessionManager.cs:266
   Xtensive.Storage.Session.get_Current() in c:\Temp\DataObjects.Net\Xtensive.Storage\Xtensive.Storage\Session.cs:212
   Werp.Controller.Services.WerpSessionProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +114
   System.Web.SessionState.SessionStateModule.GetSessionStateItem() +115
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +768
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +96
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Db backup + .dll are attached


Alex (Xtensive) wrote:

The bug is fixed.

The issue occurs, if type T having a reference property R is removing, but there is EntitySet<t> paired to R. E.g. it was impossible to upgrade from:

[Serializable]
  [HierarchyRoot]
  public class Person : Entity
  {
    [Key, Field]
    public long Id { get; private set; }

    [Field]
    [Association(PairTo = "Person")]
    public EntitySet<Address> Addresses { get; private set; }
  }

  [Serializable]
  [HierarchyRoot]
  public class Address : Entity
  {
    [Key, Field]
    public long Id { get; private set; }

    [Field]
    public Person Person { get; set;  }
  }

To:

[Serializable]
  [HierarchyRoot]
  public class Person : Entity
  {
    [Key, Field]
    public long Id { get; private set; }
  }

Workaround for now is to manually remove the table mapped to type T (i.e. for type Address in this case) before upgrade.

answered Jul 21 '10 at 18:53

ara's gravatar image

ara
395858791

Forgot to add: it was issue 772.

(Jul 21 '10 at 18:53) Alex Yakunin Alex%20Yakunin's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×573

Asked: Jul 13 '10 at 14:39

Seen: 4,274 times

Last updated: Jul 13 '10 at 14:39

powered by OSQA