New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JaversException: GENERIC_TYPE_NOT_PARAMETRIZED - how to diagnose? #362

gtnarg opened this Issue Apr 15, 2016 · 3 comments


None yet
3 participants

gtnarg commented Apr 15, 2016


I'm receiving the following error:

expected actual Class argument in type 'java.util.Map<java.lang.String, L[]>'. 
JaVers needs to know actual Class of elements stored in your collections. 
Try at least <Object>. Wildcards (e.g. <?>), unbounded type parameters (e.g. <T>) and raw types (e.g. List) are not supported.
    at org.javers.core.metamodel.type.MapType.getKeyType(
    at org.javers.core.graph.ObjectGraphBuilder.isMapWithManagedTypes(
    at org.javers.core.graph.ObjectGraphBuilder.access$200(
    at org.javers.core.graph.ObjectGraphBuilder$2.apply(
    at org.javers.core.graph.ObjectGraphBuilder$2.apply(
    at org.javers.core.metamodel.type.ManagedClass.getManagedProperties(
    at org.javers.core.metamodel.type.ManagedType.getProperties(
    at org.javers.core.graph.ObjectGraphBuilder.getNonEmptyEnumerablesWithManagedTypes(
    at org.javers.core.graph.ObjectGraphBuilder.buildMultiEdges(
    at org.javers.core.graph.ObjectGraphBuilder.buildEdges(
    at org.javers.core.graph.ObjectGraphBuilder.buildGraphFromCdo(
    at org.javers.core.graph.ObjectGraphBuilder.buildGraph(
    at org.javers.core.graph.LiveGraphFactory.createLiveGraph(
    at org.javers.core.diff.DiffFactory.buildGraph(

Is it possible to figure out where in the object graph this is occurring? What type does the following denote?

java.util.Map<java.lang.String, L[]>



This comment has been minimized.

gtnarg commented Apr 15, 2016

Figured it out by breakpointing the line raising the exception and looking backward through the callstack.

It might be helpful to have some trace logging available in this part of the code base to provide some context if an error like this occurs...

Should excluding this property (or it's parent) when initializing Javers get around this error?


This comment has been minimized.

gtnarg commented Apr 15, 2016

Was able to get this working using the following:

builder.registerIgnoredClass( PropertyChangeSupport.class );

When I tried to ignore this property in my base Entity class using builder#registerEntity, the subclasses still included the property (i.e. I needed to add the ignore to each subclass). I would think that ignoring a property in the base class should apply to all subclasses?

In addition, ignoring the property, did not prevent the error for which this issue was created.
Shouldn't ignoring the property stop it from traversing this property in the first place?

bartoszwalacik added a commit that referenced this issue Apr 23, 2016

bartoszwalacik added a commit that referenced this issue Apr 26, 2016


This comment has been minimized.


bartoszwalacik commented Apr 26, 2016

fixed in release 1.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment