umbraco examine index rebuild exception - umbraco

I am trying to rebuild my internal index. I am using tools such as the examine dashboard that clear the index and re-run indexing.
For some reason this always results in an exception and I am left with no index. This is probably due to "ghost" content in the database or something like that.
This is the exception:
[SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteXmlReader]
umbraco.DataLayer.SqlHelper`1.ExecuteXmlReader(String commandText, IParameter[] parameters) in C:\tfs\xo\rotiseme.xo.gr\Indice\umbraco_4.7.1\umbraco\datalayer\SqlHelper.cs:272
umbraco.cms.businesslogic.web.Document.importXml() +185
Any ideas how I can recover from this?

The internal index is usually stored in ~/App_Data/TEMP/ExamineIndexes/Internal/Index/
You could delete all files from this folder and then republish your site. This should trigger the re-indexing of your site.

Related

Special case: wrong order of updates for fly-away

How can I track down the location of the "Special case: wrong order of updates for fly-away!" error?
This error message is defined in Datasnap.DSIntf as
const
...
ERRCODE_FLYAWAY_WRONGORDER = 13; { Special case: wrong order of updates for fly-away }
...
DBERR_FLYAWAY_WRONGORDER = ERRBASE_ALC + ERRCODE_FLYAWAY_WRONGORDER;
but nowhere else in the Delphi sources can I find references to substring FLYAWAY_WRONGORDER.*
My intention was to compile with debug dcu's, then put a breakpoint on the line where the exception is raised and check the call stack UP to find the cause.
I'm currently stepping DOWN into the code until the error occurs, but that is less efficient (complex app).
Placing a TApplicationEvents with a breakpoint in its OnException handler does not give me usable call stack information:
So, how can I (efficiently) track down the place where this error is generated?
Background on what is going on:
Form uses DevExpress TcxScheduler connected to TcxSchedulerStorage component in datamodule, connected to nested TClientDataSets
Code saves all changes to these datasets (ApplyUpdates)
In BeginUpdate/EndUpdate for these DevExpress components, I then insert, delete and update records in these datasets, move around while doing so, even change parent IDs in detail datasets so that they drop from the current detail dataset 'in view'.The error occurs when I Edit, then Post a record doing exactly that.
Delphi Tokyo 10.2.3, Win32 app
Any other info on that error message is welcome, I was not able to find anything.
I actually 'fixed' the error by calling ApplyUpdates for the master dataset in a few places, but since I'm not really sure about the cause I want to investigate this further. So my question is not How do I fix the error in my code, it is How do I find the error in my code?
* There is a CheckForFlyAway routine in TCustomADODataSet.InternalPost in Data.Win.ADODB but we don't use ADO, I cannot set breakpoints in those routines.

EF code-first - System.ComponentModel.Win32Exception: The wait operation timed out

I'm creating a web API project using ef code-first. For simple queries, it runs well. But for queries with lots of joins(currently i'm encountering problem when querying with 4 table joins. Sometimes, even one table query gives out this error), it says
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.ComponentModel.Win32Exception: The wait operation timed out
The weird thing is, it works fine when i put breakpoints at the 'For Each' query executing the query or at one of the values inside the 'For Each'. When i remove the breakpoints it gives out this error. Why is this happening?
I've already tried putting below code in Configuration.vb file in Migrations folder, but still doesn't work.
CommandTimeout = Int32.MaxValue
I've also checked the Connection settings in SQL Server. Also doesn't help.
Tools -> Options -> Query Execution -> Execution Timeout = 0s
I've also changed the channel timeout in IIS to 100000, but it doesn't work as well.
Connections pane -> click the server node -> Sites node -> In Actions pane, click FTP Site Defaults -> Connections -> Control Channel Timeout and Data Channel Timeout and Unauthenticated Timeout i set them to = 100000
I'm worried if i had to keep putting breakpoints at each query, what will happen in production stage? Could anyone help me please?
I'm using EF6 with MVC5. So far i haven't meet with an answer that suggests putting the CommandTimeout in the DbContext file that was created during the Code-First migration(importing DB tables from server). So for the sake of others who's in the same boat as me, put below code in the New() constructor in the DbContext.vb file in your Models folder.
Me.Database.CommandTimeout = Int32.MaxValue
I also put
CommandTimeout = Int32.MaxValue
in Configurations.vb file in Migrations folder as well. When i tried removing the CommandTimeout in Configurations.vb file, it seemed like the query took longer time to execute.

Grails breaks after telling me that files exist in the views folder when they actually do not?

When I try to scaffold new controller and views for some domain class, Grails keeps telling me that there exists files in grails-app/views/domainName/{create.gsp, edit.gsp, list.gsp, show.gsp}.
However I have repeatedly deleted the whole domainName dir from the views location many times.
What is Grails referring to? is this related to caching somehow?
Even if I ignore this abnormality and tell grails to overwrite the files even though they dont exist, when i lunch the application, navigate to that controller and click create new domainItem - the browser with think for a minute after which Grails spits the following exception:
Error executing script RunApp: GC overhead limit exceeded
2011-11-02 10:22:50,484 [ContainerBackgroundProcessor[StandardEngine[Tomcat]]] ERROR core.ContainerBase - Sanitizing stacktrace:
- Exception invoking periodic operation:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:116)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:722)
The app works fine with any other domain class.
Things I have tried:
1. delete the problematic domain along with the controller and views, delete the unit test, delete the generated class files. basically eradicate any known-to-me trace of that domain class
2. run 'clean'
3. make a new domain with the same name
4. scaffold the views and controller for it again (at which point grails ask me if I want to override the views?!)
5. restart STS
6. restart computer
so the problem is in this line:
time(range:0L..86400000L) //24h in milliseconds
which I still dont understand why. the variable time is of type long
The following two variations also result in memory overflow:
time(range:0..86400000L)
time(range:0..86400000)

[A]System.Data.SQLite.SQLiteConnection cannot be cast to [B]System.Data.SQLite.SQLiteConnection

I've got a bit of a heisenbug on my hands now, and I'm looking to find some help with it.
I have a Windows service that uses System.data.sqlite. In rare cases (apparently only on Windows Vista, but this may be a red herring), the exception occurs: [A]System.Data.SQLite.SQLiteConnection cannot be cast to [B]System.Data.SQLite.SQLiteConnection...
Unfortunately, we haven't been able to repeat this bug here in the office, and have limited access to the machines where it occurs. I've tried messing with the GAC (registering and de-registering assemblies of different versions and providence using gacutil), and the app seems to do fine on my development machine.
Any idea how I might try to reproduce this or what kinds of situations can cause this? Have you run into bugs like this that only occur on Windows Vista?
Here is the fullest stack trace I have:
[A]System.Data.SQLite.SQLiteConnection cannot be cast to [B]System.Data.SQLite.SQLiteConnection.
Type A originates from 'System.Data.SQLite, Version=1.0.66.0. Culture=neutral, PublicKey Token=db937bc2d44ff139'
in the context 'Default' at location 'C:\Program Files\ultracorp\System.... [yes, ellipses are the best I have right here, I know...]
Server stack trace:
at System.Data.SQLite.SQLiteCommand.set_DbConnection(DbConnection value)
at System.Data.Common.DbCommand.set_Connection(DbConnection value)
at System.Data.Common.Utils.CommandHelper.SetStoreProviderCommandState(EntityCommand entityCommand, EntityTransaction entityTransaction, DbCommand storeProviderCommand)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__1[TResult](IEnumerable`1 sequence)
at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
at UltraCorp.DataWrangler.Models.WidgetsTable.getWidget(WidgetsEntities dbConn)
at UltraCorp.DataWrangler.Models.WidgetsTable.getWidget()
at UltraCorp.DataWrangler.Models.WidgetsTable.getUser()
at UltraCorp.DataWrangler.Infrastructure.DataWranglerTray.getUser()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Edit: In my app.config, I have provider=System.Data.SQLite; in a couple of places. Notice that there's no strong name or version number. I suspect what may be happening is that in some instances, the DLL containing the data models gets loaded, and when Entity Framework sees that that provider is requested, it chooses a System.Data.Sqlite to use. Then, later when some code happens, a different DLL is loaded according to the referencing rules. This DLL, however, has a different version or strong name than the one loaded by EF, and hence the exception.
I found two other posts from users who've experienced the same issue here:
http://sqlite.phxsoftware.com/forums/t/2554.aspx
and here
http://forums.sabnzbd.org/viewtopic.php?f=6&t=3097&start=150
Are you using the GAC to deploy the SQLite assemblies?
Are you also deploying System.Data.Sqlite.Linq.dll?
You can try to deploy the SQLite dependencies to your bin folder and use strong name assembly references in your configuration file to avoid this issue for example.
I'm thinking maybe this can be reproduced by having conflicting versions of System.Data.Sqlite.dll and\or System.Data.Sqlite.Linq.dll on the same system, but the built-in .net framework assembly resolver will attempt to load one of the in-compatible versions anyway because the dependencies are not strongly referenced by version and\or public key token information.
For debugging \ logging purposes, you can hook into the AssemblyLoad and\or AssemblyResolve AppDomain events:
http://msdn.microsoft.com/en-us/library/1dw188c1.aspx
As a work-around to resolve the issue without re-compiling, copy the missing dependencies to the bin folder and update the configuration file accordingly.
Edit
Also see these posts for more information and a tested solution:
http://sqlite.phxsoftware.com/forums/p/2021/8867.aspx
http://sqlite.phxsoftware.com/forums/p/2333/9615.aspx
I also received this error when trying to create an ADO.NET Entity Data Model.
My solution was loading the design type components for Visual Studio 2013. My download was 'sqlite-netFx451-setup-bundle-x86-2013-1.0.99.0.exe' found on:
https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
My Nuget Packages for SQLite were not matching my designer components.
Try to manually delete the files in ProjectFolder/Packages, remove the references to SQLite from your project and download the new package versions from NuGet or whereever you download them from.

Getting source code information from groovy stack trace

When exception generated I want to show some additional information (source code) for particular exception. But grails have very hairy exceptions (it's all about groovy dynamic nature). It's my problem where to get and how to display source code. All I need is file/line information.
So... Is there any possibility to get file and line where exception were generated in grails/groovy?
Hmm, you aren't already getting this? All my grails exceptions have file/line information in them by default. The only difficulty is that if the exception is in a closure, it doesn't show the actual closure name. Could you post a sample stacktrace?

Resources