배경은 다음과 같습니다. 필드가있는 주석이 달린 @Embeddable
Java 클래스가 있습니다. hibernate3 : hbm2ddl을 사용하여 hibernate3 Maven 플러그인을 통해 스키마를 생성하여이 객체가 포함 된 다른 객체를 유지할 수 있지만 @Temporal
과 관련된 오류가 발생합니다. 여기 hbm2ddl이 GregorianCalendar의 @Temporal 주석을 좋아하지 않는 이유는 무엇입니까?
@Embeddable
public class OperationalStatus implements Serializable {
.
.
.
/**
* Recorded date/time that the status value is valid
*/
private GregorianCalendar time;
/**
* No-argument constructor.
*/
public OperationalStatus() {}
.
.
.
/**
* @return the time
*/
@Temporal(TemporalType.TIMESTAMP)
public GregorianCalendar getTime() {
return time;
}
/**
* @param time the time to set
*/
public void setTime(GregorianCalendar time) {
this.time = time;
}
}
그리고 여기에 오류 판독입니다 : Hibernate3는-받는다는 - 플러그인 :
[ERROR] 목표 org.codehaus.mojo을 실행하지 못했습니다 2.2 : hbm 프로젝트의 2ddl (default-cli) STRIPES_V2 : 목표 org.code의 실행 기본값 -cli haus.mojo : hibernate3-maven-plugin : 2.2 : hbm2ddl 실패 : @Temporal은 Java에서 et이어야합니다. util.Date 또는 java.util.Calendar 프로퍼티 : stripes.datamodel. util.OperationalStatus.time 여기
POM을 일부 발췌 : 나는 무엇을 놓치고
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>annotationconfiguration</implementation>
</component>
</components>
<componentProperties>
<drop>false</drop>
<configurationfile>src/main/resources/hibernate.cfg.xml</configurationfile>
<outputfilename>schema.sql</outputfilename>
</componentProperties>
</configuration>
<dependencies>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.2-1000.jdbc4</version>
</dependency>
</dependencies>
</plugin>
.
.
.
<dependency>
<groupId>org.hibernate</groupId>
<version>4.1.7.Final</version>
<artifactId>hibernate-core</artifactId>
</dependency>
은? GregorianCalendar는 Calendar의 구체적인 확장 기능입니다. 무엇이 잘못 되었나요?
어떤 버전의 Hibernate를 사용하고 있습니까? – ElderMael
POM 정보가 추가되었습니다. 질문 텍스트에. – skippy