I am trying to persist HardSoftScore as integer columns as described in https://www.javacodegeeks.com/2015/09/integrating-jpa-hibernate-with-optaplanner.html. However, I am getting the following error when including the following statement
import org.optaplanner.persistence.jpa.impl.score.buildin.hardsoft.HardSoftScoreHibernateType;
to add TypeDef annotation.
Error when building
Only a type can be imported. org.optaplanner.persistence.jpa.impl.score.buildin.hardsoft.HardSoftScoreHibernateType resolves to a package
I am using kie-wb 7.0.0.Beta6 to create the optaplanner project.
Add the
optaplanner-persistence-jpadependency in yourpom.xmlto use that jpa support for optaplanner.Xstream is a transient dependency through optaplanner-core - you should not have to add it manually.
Jettison isn't needed normally.
Do
mvn help:effective-pomto check your effective pom - you might be inheriting from some parent pom that downgrades the XStream version etc. Also domvn dependency:tree -Dverboseto figure who's determining the xstream version.