0

I am trying to synchronise a local RavenDB database with the online RavenDB database and am not managing. I am doing the following:

  1. Login to the local server RavenDB user interface
  2. Go to Tasks section
  3. Export Database
  4. Store file somewhere on file system
  5. Login to online server RavenDB user interface
  6. Go to Tasks section
  7. Click on Import database
  8. Choose the file saved from the local database Export

I am getting the following error: Error: Server Error: screenshot

When I open show recent errors, I see the following attached screenshot:

Recent errors list

Any idea what I could be doing wrong? Is there any other way I can synchronise local RavenDB server with an online RavenDB server?

The errors mentioned above contain the following full details respectively:

Invalid cross-thread access

   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent, Func`2 func)
   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent, Action`1 action)
   at Raven.Studio.Commands.ImportDatabaseCommand.ExecuteInternal()
   at Raven.Studio.Commands.ImportDatabaseCommand.Execute(Object parameter)
   at System.Windows.Controls.Primitives.ButtonBase.ExecuteCommand()
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)



Client side exception:
System.UnauthorizedAccessException: Invalid cross-thread access.
   at MS.Internal.XcpImports.CheckThread()
   at System.Windows.Controls.ItemCollection.GetValueInternal(DependencyProperty dp)
   at System.Windows.PresentationFrameworkCollection`1.get_CountImpl()
   at System.Windows.PresentationFrameworkCollection`1.get_Count()
   at System.Windows.Controls.ItemContainerGenerator.TranslateExternalIndexToInternalIndex(Int32 index)
   at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index, Boolean suppressEvent)
   at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.ItemCollection.NotifyCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.ItemCollection.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at Raven.Studio.Models.TaskModel.ReportError(String errorMsg)
   at Raven.Studio.Commands.ImportDatabaseCommand.<>c__DisplayClass8.<ExecuteInternal>b__1()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Value cannot be null

   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent, Func`2 func)
   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent, Action`1 action)
   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent)
   at Raven.Studio.Infrastructure.Execute.OnTheUI(Action action)
   at Raven.Studio.Infrastructure.InvocationExtensions.<>c__DisplayClass30.<Catch>b__2e(Task task)
   at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()



Client side exception:
System.ArgumentNullException: Value cannot be null.
   at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
   at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
   at System.Windows.Controls.ItemsControl.AddVisualChild(Int32 containerIndex, DependencyObject container, Boolean needPrepareContainer)
   at System.Windows.Controls.ItemsControl.AddContainerForPosition(GeneratorPosition position)
   at System.Windows.Controls.ItemsControl.OnItemsChangedHandler(Object sender, ItemsChangedEventArgs args)
   at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index, Boolean suppressEvent)
   at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.ItemCollection.NotifyCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.ItemCollection.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at Raven.Studio.Models.TaskModel.ReportError(Exception exception)
   at Raven.Studio.Commands.ImportDatabaseCommand.<WriteIndexes>b__b(AggregateException exception)
   at Raven.Studio.Infrastructure.InvocationExtensions.<>c__DisplayClass2c.<Catch>b__2b(AggregateException e)
   at Raven.Studio.Infrastructure.InvocationExtensions.<>c__DisplayClass30.<>c__DisplayClass32.<Catch>b__2f()
   at AsyncCtpThreadingExtensions.<>c__DisplayClass4.<InvokeAsync>b__3()

Value cannot be null

at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent, Func`2 func)
   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent, Action`1 action)
   at Raven.Studio.Infrastructure.InvocationExtensions.Catch(Task parent)
   at Raven.Studio.Infrastructure.Execute.OnTheUI(Action action)
   at Raven.Studio.Features.Tasks.ImportTask.<get_Action>b__0(String line)
   at Raven.Studio.Commands.ImportDatabaseCommand.<>c__DisplayClass8.<ExecuteInternal>b__1()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
   at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

**Client side exception:**

System.ArgumentNullException: Value cannot be null.
   at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
   at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
   at System.Windows.Controls.ItemsControl.AddVisualChild(Int32 containerIndex, DependencyObject container, Boolean needPrepareContainer)
   at System.Windows.Controls.ItemsControl.AddContainerForPosition(GeneratorPosition position)
   at System.Windows.Controls.ItemsControl.OnItemsChangedHandler(Object sender, ItemsChangedEventArgs args)
   at System.Windows.Controls.ItemContainerGenerator.OnItemAdded(Object item, Int32 index, Boolean suppressEvent)
   at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.ItemCollection.NotifyCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.ItemCollection.System.Windows.Controls.ICollectionChangedListener.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Controls.WeakCollectionChangedListener.SourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at Raven.Studio.Features.Tasks.ImportTask.<>c__DisplayClass2.<get_Action>b__1()
   at AsyncCtpThreadingExtensions.<>c__DisplayClass4.<InvokeAsync>b__3()

Mark Cassar
  • 1,842
  • 4
  • 20
  • 27
  • What RavenDb version are you using? The latest stable release is 2261. – nickvane Feb 26 '13 at 09:05
  • @nickvane Server Build #2261 Client Build #2261 for both localhost and online – Mark Cassar Feb 26 '13 at 09:16
  • 2
    I think this is a bug in the ravendb studio. Can you try if you can import the database via command line (http://ravendb.net/docs/server/administration/export-import)? If this works you can file a bug report in http://issues.hibernatingrhinos.com/ – nickvane Feb 26 '13 at 09:35
  • I'll try the import / export as mentioned later on and get back to you. Just as a note, removing the indexes from the collections, removed the error so I am assuming it is related with such indexes. Will get back to you with result of command line import when I tried that out. – Mark Cassar Feb 28 '13 at 11:03

0 Answers0