It occurs in very specific situation, after some conditions, that difficult to reproduce. May be it some part of another bug ?

stackTrace:

[InvalidOperationException: Transaction should not be active]
   Xtensive.Sql.SqlConnection.EnsureTrasactionIsNotActive() +56
   Xtensive.Sql.SqlServer.Connection.BeginTransaction(IsolationLevel isolationLevel) +16
   Xtensive.Storage.Providers.Sql.Driver.BeginTransaction(Session session, SqlConnection connection, IsolationLevel isolationLevel) +50

[StorageException: Error 'Unknown'. Original message: Transaction should not be active]
   Xtensive.Storage.Providers.Sql.Driver.BeginTransaction(Session session, SqlConnection connection, IsolationLevel isolationLevel) +71
   Xtensive.Storage.Providers.Sql.SessionHandler.BeginTransaction(IsolationLevel isolationLevel) +95
   Xtensive.Storage.Session.StartTransaction(Transaction transaction) +83
   Xtensive.Storage.Session.EnsureTransactionIsStarted() +30
   Xtensive.Storage.Session.CreateEnumerationContext() +39
   Xtensive.Storage.Providers.CompilationContext.CreateEnumerationContext() +17
   Xtensive.Storage.Rse.Providers.EnumerationScope.Open() +42
   Xtensive.Storage.Rse.<GetEnumerator>d__4.MoveNext() +96
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +87
   Xtensive.Core.<Batch>d__20`1.MoveNext() +194
   Xtensive.Core.<ApplyBeforeAndAfter>d__28`1.MoveNext() +154
   Xtensive.Storage.<ToTransactional>d__0`1.MoveNext() +193
   System.Linq.<SelectManyIterator>d__14`2.MoveNext() +399
   System.Linq.Enumerable.Single(IEnumerable`1 source) +196
   lambda_method(Closure , Object[] , IEnumerable`1 , Dictionary`2 , ParameterContext ) +111
   Xtensive.Core.<>c__DisplayClass13`5.<Bind>b__12(T2 arg2, T3 arg3, T4 arg4) +27
   Xtensive.Storage.Linq.TranslatedQuery`1.Execute(ParameterContext parameterContext) +22
   Xtensive.Storage.Linq.QueryProvider.Execute(Expression expression) +174
   System.Linq.Queryable.Single(IQueryable`1 source, Expression`1 predicate) +300
   Werp.View.Ext.FormService.FieldHasHistory(String entityName, String fieldName) in D:\work\platform\Werp.View.Ext\FormService.cs:128
   Werp.View.Ext.UniversalForm.AddFieldContextMenu(Component formElement, String fieldName) in D:\work\platform\Werp.View.Ext\Components\UniversalForm.cs:345
   Werp.View.Ext.UniversalForm.CreateFields(String itemId, Dictionary`2 itemValues) in D:\work\platform\Werp.View.Ext\Components\UniversalForm.cs:439
   Werp.View.Ext.UniversalForm..ctor(String entityName, String entityItemId, Dictionary`2 initValues, Boolean isNew, Dictionary`2 nameValueCollection, String createdForFormId, String createdForFieldName) in D:\work\platform\Werp.View.Ext\Components\UniversalForm.cs:98
   Werp.View.Ext.SysDimentionsForm..ctor(String entityName, String entityItemId, Dictionary`2 initValues) in D:\work\platform\Werp.View.Ext\Components\SysDimentionsForm.cs:19
   Werp.View.Ext.MembershipUtils.RequestSysDimentions(String parameterEntityName, Boolean abandon) in D:\work\platform\Werp.View.Ext\MembershipUtils.cs:45
   lambda_method(Closure , Object , Object[] ) +112
   FastReflectionLib.MethodInvoker.Invoke(Object instance, Object[] parameters) +57
   FastReflectionLib.MethodInvoker.FastReflectionLib.IMethodInvoker.Invoke(Object instance, Object[] parameters) +45
   Werp.Utils.Helpers.ReflectionHelper.StaticCallMethod(Type type, MethodInfo mi, Object[] args) in D:\work\platform\Werp.Utils\Helpers\ReflectionHelper.cs:779
   Werp.View.Ext.ButtonHandler.ExecuteMethod(MethodCallInfo callInfo) in D:\work\platform\Werp.View.Ext\Handlers\ButtonHandler.ashx.cs:69
   Werp.View.Ext.ButtonHandler.ProcessRequest(HttpContext context) in D:\work\platform\Werp.View.Ext\Handlers\ButtonHandler.ashx.cs:165
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

asked Sep 10 '10 at 03:24

pil0t's gravatar image

pil0t
207545763

edited Sep 15 '10 at 06:04

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

We're investigating the issue.

(Sep 14 '10 at 14:21) Alex Yakunin Alex%20Yakunin's gravatar image

This is a really annoying bug... It throws up almost randomly here and there :(

(Sep 30 '10 at 06:29) xumix xumix's gravatar image

Try to turn off AutoShortenTransactions option - quite likely the problem will be fixed. Its support in current branch (v4.3) is buggy; we significantly refactored it in v4.4 branch (that's in development now), so further it should work as expected.

(Sep 30 '10 at 07:51) Alex Yakunin Alex%20Yakunin's gravatar image

Have you tried the last option?

(Oct 08 '10 at 03:22) Alex Yakunin Alex%20Yakunin's gravatar image

Seems like this helped, thanks

(Oct 08 '10 at 03:44) xumix xumix's gravatar image

One Answer:

Try to turn off AutoShortenTransactions option - quite likely the problem will be fixed. Its support in current branch (v4.3) is buggy; we significantly refactored it in v4.4 branch (that's in development now), so further it should work as expected.

answered Oct 18 '10 at 00:11

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

I extracted & accepted the comment that solved the problem.

(Oct 18 '10 at 00:11) 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

powered by OSQA