Getting Unable to inject static metamodel attribute runtime exception while upgrading from 5.1.15 to 5.3.9

Below is my class

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Version;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
public class SnapshotMetadata implements DomainObject {

@Id
@GeneratedValue(generator = "SnapshotMetadataSequence")
@GenericGenerator(name = "SnapshotMetadataSequence", strategy = ID_GENERATOR, parameters = {
    @Parameter(name = "segment_value", value = SnapshotMetadata_.TYPE_NAME)
    })
private Long id;

@SuppressWarnings("PMD.UnusedPrivateField")
@Version
private int objVersion;

private ResourceKey snapshotResourceKey;

private String fieldName;

private String fieldValue;

/*
 * Return the value that uniquely identifies this object instance within its class hierarchy
 */
@Override
public Long getObjectId() {
    return this.id;
}

public static SnapshotMetadata create(ResourceKey snapshotResourceKey, String fieldName, String fieldValue) {
    SnapshotMetadata metadata = new SnapshotMetadata();

    metadata.snapshotResourceKey = snapshotResourceKey;
    metadata.fieldName = fieldName;
    metadata.fieldValue = fieldValue;

    return metadata;
}

public int getObjVersion() {
    return objVersion;
}

public void setObjVersion(int objVersion) {
    this.objVersion = objVersion;
}

public ResourceKey getSnapshotResourceKey() {
    return snapshotResourceKey;
}

public void setSnapshotResourceKey(ResourceKey snapshotResourceKey) {
    this.snapshotResourceKey = snapshotResourceKey;
}

public String getFieldName() {
    return fieldName;
}

public void setFieldName(String fieldName) {
    this.fieldName = fieldName;
}

public String getFieldValue() {
    return fieldValue;
}

public void setFieldValue(String fieldValue) {
    this.fieldValue = fieldValue;
}

}

and i am getting following exception at runtime.

Caused by: java.lang.IllegalAccessException: Can not set static final java.lang.String field to org.hibernate.metamodel.internal.SingularAttributeImpl.

Any help would be highly appreciated.