If you encounter any such error
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: TravelEntity is not mapped [ from TravelEntity]
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1374)
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:294)
Add an entry in persistence.xml of the particular entity class as like below under the persistenceunit tag
<class>com.data.TravelEntity</class>
Ex:
<persistence-unit name="travelPU" transaction-type="JTA">
<class>com.data.TravelEntity</class>
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: TravelEntity is not mapped [ from TravelEntity]
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1374)
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:294)
Add an entry in persistence.xml of the particular entity class as like below under the persistenceunit tag
<class>com.data.TravelEntity</class>
Ex:
<persistence-unit name="travelPU" transaction-type="JTA">
<class>com.data.TravelEntity</class>