Hello,
I'm getting this error when deploying my application in production server:
Quote:
org.hibernate.MappingException:
Could not determine type for: EntityStatusType, for columns: [org.hibernate.mapping.Column(STATUS)] javax.persistence.PersistenceException: org.hibernate.MappingException: Could not determine type for: EntityStatusType, for columns: [org.hibernate.mapping.Column(STATUS)] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:737) at
(...)
Caused by: org.hibernate.MappingException: Could not determine type for: EntityStatusType, for columns: [org.hibernate.mapping.Column(STATUS)] at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253) at
I've this custom type declared in one class (Estoque):
Code:
@TypeDef(name = "EntityStatusType",
typeClass = visualcontrol.model.EntityStatusUserType.class,
parameters = {
@Parameter(name = "NORMAL", value = "S"),
@Parameter(name = "CANCELADO", value = "C"),
@Parameter(name = "nullConstant", value = "NORMAL")
})
@Entity
@Table(name = "ESTOQUE")
@SequenceGenerator(name = "SEQ_Estoque", sequenceName = "GEN_ESTOQUE",
allocationSize = 1)
public class Estoque implements Serializable{
// ...
@Column(name="STATUS")
@Type(type="EntityStatusType")
public EntityStatus getStatus() {
return status;
}
public void setStatus(EntityStatus status) {
this.status = status;
}
This custom type is used in other classes as well. The classes are: Estoque , Kardex and PedidoVenda
Kardex:
Code:
@Entity
@Table(name="KARDEX")
@SequenceGenerator(name = "SEQ_KARDEX", sequenceName = "GEN_KARDEX",
allocationSize = 1)
public class Kardex implements Serializable{
// ...
@Column(name="STATUS")
@Type(type="EntityStatusType")
public EntityStatus getStatus() {
return status;
}
public void setStatus(EntityStatus status) {
this.status = status;
}
Running in the development server the application works fine. The only diference between the servers is, the development server is Windows Vista and the production server is Fedora 7.
What is wrong?