`

oracle.toplink.essentials.exceptions.DescriptorException

阅读更多
Exception [TOPLINK-60] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: The method [_toplink_setattribute_vh] or [_toplink_getattribute_vh] is not defined in the object [cn.ctit.vcms.entity.ActorAttribute].
Internal Exception: java.lang.NoSuchMethodException: cn.ctit.vcms.entity.ActorAttribute._toplink_getattribute_vh()
Mapping: oracle.toplink.essentials.mappings.OneToOneMapping[attribute]
Descriptor: RelationalDescriptor(cn.ctit.vcms.entity.ActorAttribute --> [DatabaseTable(titan.actor_attribute)])

 

上面是异常信息。

 

解决办法:实体的原因

1. Actor.java
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "actor")
	public Set<ActorAttribute> getActorAttributes() {
		return this.actorAttributes;
	}

 

2.ActorAttribute.java
@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "attribute_id")
	public Attribute getAttribute() {
		return this.attribute;
	}

 

上面的配置中两个都是成了LAZY,所有才报错了,解决办法,吧下面那个改成@ManyToOne(fetch = FetchType.EAGER)就好了,即是:

@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "attribute_id")
	public Attribute getAttribute() {
		return this.attribute;
	}

 

分享到:
评论

相关推荐

    toplink-api.jar,toplink-essentials.jar

    总之,`toplink-api.jar`和`toplink-essentials.jar`是Oracle TopLink框架的重要组成部分,它们协同工作,为Java开发提供了一种高效、灵活的ORM解决方案。通过理解这两个库的功能和用法,开发者可以更高效地管理...

    toplink-essentials.jar

    toplink-essentials.jar toplink-essentials.jar

    Oracle TopLink Getting Started 10.1.3

    import oracle.toplink.sessions.SessionManager; public class TopLinkExample { public static void main(String[] args) { // 获取会话 Session session = SessionManager.getInstance().getSession("default...

    oracle toplink lib

    Oracle TopLink,全称为Oracle TopLink Essentials,是一个强大的Java对象关系映射(ORM)框架,它使得Java开发者能够轻松地将应用程序中的对象模型与数据库中的关系数据进行交互。Oracle TopLink最初由TopLink公司...

    toplink-essentials-agent.jar

    toplink-essentials-agent.jar ......................

    Oracle Toplink JPA

    Oracle Toplink JPA

    spring-framework-3.0.5.RELEASE-dependencies-1

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    spring-framework-3.0.5.RELEASE-dependencies-5

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    spring-framework-3.0.5.RELEASE-dependencies-6

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    经典书籍:Oracle.10g应用服务器管理与网格计算

    第8章 Oracle 10g应用服务器Toplink 第9章 Oracle 信息结构整合 第10章 Oracle 10g 无线应用服务器 第11章 Oracle 10g 应用服务器的工作流API与实例 第12章 Oracle 企业管理器和变更管理工具包 第13章 Oracle 10g的...

    spring-framework-3.0.5.RELEASE-dependencies-3

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    spring-framework-3.0.5.RELEASE-dependencies-2

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    spring-framework-3.0.5.RELEASE-dependencies-8

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    spring-framework-3.0.5.RELEASE-dependencies-4

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    spring-framework-3.0.5.RELEASE-dependencies-7

    com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance ...

    Oracle Fusion Middleware Developer's Guide for Oracle TopLink

    ### Oracle Fusion Middleware Developer's Guide for Oracle TopLink #### 概述 《Oracle Fusion Middleware Developer's Guide for Oracle TopLink》是针对Oracle TopLink技术的一份详细指南。这份文档为Oracle ...

    Oracle TopLink Developer's Guide.PDF

    根据提供的文件信息,我们可以深入探讨Oracle TopLink Developer's Guide中涉及的关键知识点,特别是与“Understanding Relational Mappings”相关的部分。 ### Oracle TopLink简介 Oracle TopLink是一个高性能、...

    Oracle Toplink Grid

    Oracle TopLink Grid 是一个强大的工具,它将Oracle Coherence(内存数据网格)的功能与TopLink对象关系映射框架集成,以实现高效的缓存和分布式计算。这篇文章主要关注如何使用Coherence作为TopLink的二级(L2)...

Global site tag (gtag.js) - Google Analytics