ConversionException oracle.sql.TIMESTAMPLTZ无法转换为java.util.Date

时间:2018-03-06 06:14:47

标签: jpa eclipselink

尝试检索用户时,我在运行时获得转换异常。我可以知道如何解决这个问题吗?

  

引起:异常[EclipseLink-3002](Eclipse Persistence Services - 2.6.1.v20150605-31e8258):org.eclipse.persistence.exceptions.ConversionException   异常描述:来自[org.eclipse.persistence.mappings.DirectToFieldMapping [createdDate - > JW7S_SYS_USER.CREATED_DATE]]的[class oracle.sql.TIMESTAMPLTZ]类的对象[oracle.sql.TIMESTAMPLTZ@48e258d5] descriptor [RelationalDescriptor(javaweb7sample.entity.sample.User - > [DatabaseTable(JW7S_SYS_USER)])]无法转换为[class java.util.Date]。

用户表:

created_date TIMESTAMP WITH LOCAL TIME ZONE

用户实体:

@Column(name = "CREATED_DATE")
@Temporal(TemporalType.TIMESTAMP)
protected Calendar createdDate;

的信息:

  

GlassFish Server 4.1.1

     

Eclipse Persistence Services - 2.6.1

     

Oracle Database 12c企业版12.1.0.2.0版

     

最好的:property = eclipselink.target-server;值= SunAS9;翻译   值= org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform   最好的:property = eclipselink.logging.logger;值= ServerLogger   最好的:property = eclipselink.logging.level;值= ALL;翻译   value = ALL最好:property = eclipselink.logging.timestamp;值=真   最好的:property = eclipselink.logging.thread; value = true最好:
  属性= eclipselink.logging.session; value = true最好:
  属性= eclipselink.logging.connection; value = true最好:
  属性= eclipselink.logging.exceptions; value = true最好:
  属性= eclipselink.logging.parameters; value = true最好:
  属性= eclipselink.logging.level;值= ALL;翻译价值=全部   最好的:property = eclipselink.logging.timestamp; value = true最好:
  属性= eclipselink.logging.thread; value = true最好:
  属性= eclipselink.logging.session; value = true最好:
  属性= eclipselink.logging.connection; value = true最好:
  属性= eclipselink.logging.exceptions; value = true最好:
  属性= eclipselink.logging.parameters; value = true最好:
  属性= eclipselink.target数据库;值=预言;翻译   值= org.eclipse.persistence.platform.database.OraclePlatform

0 个答案:

没有答案