Microsoft Orleans, Unsupported type, Serializer not available GrainInterfaceMap - serialization

I am trying to connect to an orleans silo but I got this error.
{"Unsupported type 'Orleans.Runtime.GrainInterfaceMap' encountered.
Perhaps you need to mark it [Serializable] or define a custom
serializer for it?"}
at Orleans.Serialization.SerializationManager.DeserializeInner(Type
expected, BinaryTokenStreamReader stream) at
Orleans.Serialization.BuiltInTypes.DeserializeOrleansResponse(Type
expected, BinaryTokenStreamReader stream) at
Orleans.Serialization.SerializationManager.DeserializeInner(Type
expected, BinaryTokenStreamReader stream) at
Orleans.Serialization.SerializationManager.Deserialize(Type t,
BinaryTokenStreamReader stream) at
Orleans.Serialization.SerializationManager.Deserialize(BinaryTokenStreamReader
stream) at Orleans.Runtime.Message.DeserializeBody(List1 bytes)
at Orleans.Runtime.Message.get_BodyObject() at
Orleans.Runtime.GrainReference.ResponseCallback(Message message,
TaskCompletionSource1 context)
When I searched in object browser, I can see a class, possibly created to serialize this class :
Orleans.Runtime.Configuration.OrleansCodeGenOrleans_Runtime_GrainInterfaceMapSerializer.OrleansCodeGenOrleans_Runtime_GrainInterfaceMapSerializer()
But somehow i got this error. I think there is configuration problem.. Do you have any idea about how i can solve this problem?
Thanks..

Related

InvalidClassException and serialization issues

So i have an exercise given from my lecturer to build a registration system.
My job is to test the program. My friends gave me the source code, but i cant seem to get it running, although one of my friend can open it without any problems
Here is the error message
java.io.InvalidClassException: javax.swing.JComponent; local class incompatible: stream classdesc serialVersionUID = -3424753864000836906, local class serialVersionUID = 3742318830738515599
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at java.beans.Beans.instantiate(Beans.java:199)
at java.beans.Beans.instantiate(Beans.java:80)
at gui.MainWindow.initComponents(MainWindow.java:208)
at gui.MainWindow.<init>(MainWindow.java:34)
at srs.Driver.main(Driver.java:17)
Exception in thread "main" java.lang.IllegalArgumentException:
Component must be non-null
at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2953)
at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2933)
at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1524)
at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2484)
at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2454)
at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1505)
at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2476)
at gui.MainWindow.initComponents(MainWindow.java:1680)
at gui.MainWindow.<init>(MainWindow.java:34)
at srs.Driver.main(Driver.java:17)
Java Result: 1
In one of the package i have this class called "MainWindow.java", and "MainWindow_creditsField2.ser". This package is for GUI purposes.
I am assuming the error has something to do with the .ser file. When I asked my friend what that file is, he did not know what that file is, and said that it's
automatically generated
When I clicked on 3 of the last errors,
Driver tells me the line MainWindow mainWindow = new MainWindow();
MainWindow tells me line initComponents();
I think that is all the leads I can give you
The problem is with the serialization . Here is the link where it is described nicely why it occurs. Go through this thoroughly to understand how that field is used to make sure the serialized version and what the JVM wants to create from the serialized object are the same.

Raven.Server.exe exception

I've never used RavenDb it looks interesting but I'm falling at the first hurdle.
I've downloaded, unzipped and I run C:\RavenDB\Server\Raven.Server.exe
and it flashes up and disappears.
I tried running from a dos prompt and I got this exception:
C:\RavenDB\Server>Raven.Server.exe
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the
requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog
()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(Impor
tDefinition definition)
at System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(Impo
rtDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExports
Core(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExpor
tsCore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsC
ore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(Expor
tProvider provider, ComposablePart part, ImportDefinition definition, AtomicComp
osition atomicComposition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSub
set(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComp
osition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsSt
ateMachine(PartManager partManager, ComposablePart part)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(P
artManager partManager, ComposablePart part, Boolean shouldTrackImports)
at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImportsOnce(
ComposablePart part)
at System.ComponentModel.Composition.AttributedModelServices.SatisfyImportsOn
ce(ICompositionService compositionService, Object attributedPart)
at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configura
tion)
at Raven.Server.RavenDbServer..ctor(RavenConfiguration settings)
at Raven.Server.Program.RunServer(RavenConfiguration ravenConfiguration)
at Raven.Server.Program.RunInDebugMode(Nullable`1 anonymousUserAccessMode, Ra
venConfiguration ravenConfiguration)
at Raven.Server.Program.InteractiveRun(String[] args)
at Raven.Server.Program.Main(String[] args)
- - - -
System.TypeLoadException: Method 'WriteJson' in type 'JsonToJsonConverter' from
assembly 'Raven.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=37f41c7f9
9471593' does not have an implementation.
C:\RavenDB\Server>
I'm a total nub when it comes to this software.
Any ideas ?
Thanks
It seems to be an issue with version 206 I've gone back to 193 and it works fine.

Ninject Intermittent exception thrown related to OnePerRequestModule

I just upgraded an existing implementation of Ninject from 1.5 to 2.0. I'm now seeing an intermittent exception getting thrown when many requests are happening in a short period of time.
Here's the exception that is being thrown.
Type: System.ArgumentException
Message: An item with the same key has already been added.
Source: Ninject
Stack Trace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Ninject.Components.ComponentContainer.CreateNewInstance(Type component, Type implementation)
at Ninject.Components.ComponentContainer.ResolveInstance(Type component, Type implementation)
at Ninject.Components.ComponentContainer.Get(Type component)
at Ninject.Components.ComponentContainer.<CreateNewInstance>b__6(ParameterInfo parameter)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Ninject.Components.ComponentContainer.CreateNewInstance(Type component, Type implementation)
at Ninject.Components.ComponentContainer.ResolveInstance(Type component, Type implementation)
at Ninject.Components.ComponentContainer.Get(Type component)
at Ninject.Components.ComponentContainer.GetT
at Ninject.KernelBase.CreateContext(IRequest request, IBinding binding)
at Ninject.KernelBase.<>c__DisplayClassa.<Resolve>b__6(IBinding binding)
at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<CastIterator>d__aa`1.MoveNext()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Ninject.ResolutionExtensions.Get[T](IResolutionRoot root, IParameter[] parameters)
at NameOfConsumingSite.Application_BeginRequest(Object sender, EventArgs e)...
The exception does not get thrown if I remove the OnePerRequestModule item from httpModules in web.config, but that is adding a ton of overhead.
I thank anyone in advance if they can help!
There was a multithreading problem. Try to use the 2.2 RC1 found at https://github.com/ninject . Please tell me if this problem still occurs with this version to make sure we have no further issue we have to fix before release.

NHibernate.MappingException - Trouble Shooting Checklist (no persister for)

Here's a starter list:
if hbm is hand generated, is it an embedded resource?
if using FNH, does it pass a PerssistenceSpecification test?
if not using FNH, can you save and then load the persisted class?
use Ayende's "sanity checks"
I'm sure many of you have gotten this one at one point or another. But have you ever gotten it when you knew your mapping was set up correctly?
I started getting this exception after I started using a new repository design, but only in one scenario! PersistenceSpecification tests pass, as do all repository methods (using SQLite).
The scenario that leads to the exception is when legacy projects from a different db are converted to green field system. The legacy system is from a different database and has it's own session factory, which should be irrelevant because the error comes after previously unconverted Projects are retrieved and in memory.
As the routine tries to save these unconverted Projects into the new database, the exception is thrown, full stack trace below.
Any ideas on how to build up the trouble shooting check list and solves this problem?
Cheers,
Berryl
=== the Exception trace =====
failed: NHibernate.MappingException : No persister for: Smack.ConstructionAdmin.Domain.Model.Projects.Project
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String entityName)
at NHibernate.Impl.SessionImpl.GetEntityPersister(String entityName, Object obj)
at NHibernate.Engine.ForeignKeys.IsTransient(String entityName, Object entity, Nullable`1 assumed, ISessionImplementor session)
at NHibernate.Event.Default.AbstractSaveEventListener.GetEntityState(Object entity, String entityName, EntityEntry entry, ISessionImplementor source)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
NHibernate\Repository\FabioNHibRepository.cs(46,0): at Smack.Core.Data.NHibernate.Repository.FabioNHibRepository`1.Add(T item)
LegacyConversion\LegacyBatchUpdater.cs(20,0): at Smack.ConstructionAdmin.Data.LegacyConversion.LegacyBatchUpdater.ConvertOpenLegacyProjects(ILegacyProjectDao legacyProjectDao, IProjectRepository greenProjectRepository)
Data\Brownfield\ProjectBatchUpdate_SQLiteTests.cs(19,0): at Smack.ConstructionAdmin.Tests.Data.Brownfield.ProjectBatchUpdate_SQLiteTests.Test()
The problem here turned out to be that I was inadvertently binding the same session context to both the legacy and greenfield db session factories, first to the greenfield and then the legacy.

Obscure NHibernate/Fluent NHibernate error

I've been encountering the following error when trying to build a
session factory:
PersistenceTests.Can_Map_Orders_To_Database : Failed
System.IndexOutOfRangeException: Index was outside the bounds of the
array.
at NHibernate.Mapping.Column.set_Name(String value)
at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindColumns(XmlNode node,
SimpleValue model, Boolean isNullable, Boolean autoColumn, String
propertyPath)
at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindColumnsOrFormula
(XmlNode node, SimpleValue simpleValue, String path, Boolean
isNullable)
at NHibernate.Cfg.XmlHbmBinding.ClassBinder.BindSimpleValue(XmlNode
node, SimpleValue model, Boolean isNullable, String path)
at
NHibernate.Cfg.XmlHbmBinding.CollectionBinder.BindCollectionSecondPass
(XmlNode node, Collection model, IDictionary`2 persistentClasses)
at
NHibernate.Cfg.XmlHbmBinding.CollectionBinder.<>c__DisplayClassd.<AddCollec tionSecondPass>b__c
(IDictionary`2 persistentClasses)
at NHibernate.Cfg.Configuration.SecondPassCompile()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in c:
\Code Samples\NHibernate\Fluent Nhibernate - Trunk\src\FluentNHibernate
\Cfg\FluentConfiguration.cs: line 94
FluentNHibernate.Cfg.FluentConfigurationException: An invalid or
incomplete configuration was used while creating a SessionFactory.
Check PotentialReasons collection, and InnerException for more detail.
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in c:
\Code Samples\NHibernate\Fluent Nhibernate - Trunk\src\FluentNHibernate
\Cfg\FluentConfiguration.cs: line 99
at FluentNHibernate.SessionSource..ctor(FluentConfiguration config) in
c:\Code Samples\NHibernate\Fluent Nhibernate - Trunk\src
\FluentNHibernate\SessionSource.cs: line 38
at
FluentNHibernate.Testing.SingleConnectionSessionSourceForSQLiteInMemoryTest ing..ctor
(FluentConfiguration config) in c:\Code Samples\NHibernate\Fluent
Nhibernate - Trunk\src\FluentNHibernate\Testing
\SingleConnectionSessionSourceForSQLiteInMemoryTesting.cs: line 15
at Core.Infrastructure.Data.NHibernate.Tests.PersistenceTests.SetUp()
in PersistenceTests.cs: line 26
I'm working against the FNH trunk and NH 2.0.1. Funny thing is I am
able to compile my mappings (via AutoPersistenceModel.CompileMappings)
and write them to the file system successfully - FNH doesn't complain.
It is only when attempting to build the session factory that
everything goes kaboom with the not very helpful error message above.
Anyone got any ideas?
I found that the inner exception gave more details. In my case I had to add the NHibernate.ByteCode.Castle.dll file to the references.
Fluent NHibernate itself rarely complains at you directly. Internally it's just building up your HBM files for you so if you told it to build something wrong then NHibernate proper will get grumpy.
If you're not already, you might want to start with exporting your mapping files like so:
.Mappings(m => m.FluentMappings.AddFromAssemblyOf<MyClass>()
.ExportTo("path")
Then you can dig around in there to see if something is wrong. I do recall getting this error once before and I think it relates to a mismatch in the number of columns mapped. It was one of those easy-to-miss errors in my mapping, so unfortunately all I can suggest is to really scour the output of ExportTo for anything that doesn't make sense.
We'll need to see your Configuration to help much. But this part of the stack trace should give you an idea of where to start.
at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in c:
\Code Samples\NHibernate\Fluent Nhibernate - Trunk\src\FluentNHibernate
\Cfg\FluentConfiguration.cs: line 94
FluentNHibernate.Cfg.FluentConfigurationException: An invalid or
incomplete configuration was used while creating a SessionFactory.
Check PotentialReasons collection, and InnerException for more detail.