Results 1 to 5 of 5
  1. #1
    koganm is offline Member
    Join Date
    Nov 2014
    Posts
    3
    Rep Power
    0

    Default Inheritance issue with @Mappedsuperclass and @Idclass (JPA, hibernate, Wildfly)

    I need some help with the above please.
    For some reason, wildfly gives me an error when deploying my project and complains about my child JPA entities Idclass. Below is the error and code. Someone please help...
    Parent JPA Class:

    Java Code:
    @MappedSuperclass
    @IdClass(DBTransactionId.class)
    public abstract class DBTransaction implements Serializable
    
    {
    @Column(name = "InsertDate")
    @Id
    protected Date insertDate;
    
    @Column(name = "InsertTime")
    private Time insertTime;
    
    @Column(name = "UUID")
    @Id
    protected String uuid;
    
    @Column(name = "MTI")
    @Id
    protected String mti;
    
    @Column(name = "Period")
    @Basic
    private int period;
    
    @Lob
    @Column(name = "ISOMsg")
    @Basic
    private ISOMsg isoMsg;
    .
    .
    .
    .
    Parent Idclass:

    Java Code:
    public class DBTransactionId implements Serializable
    {
    protected Date insertDate;
    protected String uuid;
    protected String mti;
    
    public DBTransactionId()
    {
    
    }
    
    public DBTransactionId(Date insertDate, String uuid, String mti)
    {
        this.insertDate = insertDate;
        this.uuid = uuid;
        this.mti = mti;
    }
    public Date getInsertDate()
    {
        return insertDate;
    }
    
    
    public String getUuid()
    {
        return uuid;
    }
    
    public String getMti()
    {
        return mti;
    }
    }
    Child JPA Entity

    Java Code:
    @Entity
    @Table(name = "Net1ATMTransactions")
    @IdClass(Net1AtmTransactionId.class)
    
    public class Net1AtmTransaction extends DBTransaction implements Serializable
    
    {
    @Column(name = "DE2_PAN")
    @Basic
    private String de2Pan;
    
    @Column(name = "DE3_ProcessingCode")
    @Basic
    private String de3ProcessingCode;
    
    @Column(name = "DE4_TransactionAmt")
    @Basic
    private String de4TransactionAmt;
    
    @Column(name = "DE5_SettlementAmt")
    @Basic
    private String de5SettlementAmt;
    
    @Column(name = "DE6_CardholderBillAmt")
    @Basic
    private String de6CardholderBillAmt;
    
    @Column(name = "DE7_TransmissionDate")
    @Basic
    private String de7TransmissionDate;
    
    @Column(name = "DE9_SettleConvRate")
    @Basic
    private String de9SettleConvRate;
    
    @Column(name = "DE10_CardholderConvRate")
    @Basic
    private String de10CardholderConvRate;
    
    @Column(name = "DE11_STAN")
    @Id
    protected String de11Stan;
    .
    .
    .
    .
    Child Idclass

    Java Code:
    public class Net1AtmTransactionId extends DBTransactionId implements Serializable
    {
    protected String de11Stan;
    
    public Net1AtmTransactionId()
    {
    
    }
    
    public Net1AtmTransactionId(String de11Stan, Date insertDate)
    {
        this.de11Stan = de11Stan;
    }
    
    public String getDe11Stan()
    {
        return de11Stan;
    }
    .
    .
    .
    .
    .
    Wildfly Error Code:

    Java Code:
    10:22:08,103 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 81) MSC000001:         Failed to start service jboss.persistenceunit."ear-1.0.ear#noCacheRDBMS": org.jboss.msc.service.StartException in service jboss.persistenceunit."ear-1.0.ear#noCacheRDBMS": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
        at     org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_60]
        at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
        at org.hibernate.type.ComponentType.getPropertyIndex(ComponentType.java:727) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
        at            org.hibernate.jpa.internal.metamodel.AttributeFactory$3.resolveMember(AttributeFactory.java:989) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory$5.resolveMember(AttributeFactory.java:1041) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:466) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory.buildIdAttribute(AttributeFactory.java:144) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.buildIdClassAttributes(MetadataContext.java:355) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.applyIdMetadata(MetadataContext.java:326) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.wrapUp(MetadataContext.java:247) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:96) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:148) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:865) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        ... 8 more
    
    10:22:08,105 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 82) MSC000001: Failed to start service jboss.persistenceunit."ear-1.0.ear#RDBMS": org.jboss.msc.service.StartException in service jboss.persistenceunit."ear-1.0.ear#RDBMS": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_60]
        at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
        at org.hibernate.type.ComponentType.getPropertyIndex(ComponentType.java:727) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory$3.resolveMember(AttributeFactory.java:989) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory$5.resolveMember(AttributeFactory.java:1041) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:466) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory.buildIdAttribute(AttributeFactory.java:144) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.buildIdClassAttributes(MetadataContext.java:355) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.applyIdMetadata(MetadataContext.java:326) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.wrapUp(MetadataContext.java:247) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:96) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:148) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:865) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        ... 8 more
    
    10:22:08,104 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 83) MSC000001: Failed to start service jboss.persistenceunit."ear-1.0.ear#containerRDBMS": org.jboss.msc.service.StartException in service jboss.persistenceunit."ear-1.0.ear#containerRDBMS": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_60]
        at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:474)
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
        at org.hibernate.type.ComponentType.getPropertyIndex(ComponentType.java:727) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory$3.resolveMember(AttributeFactory.java:989) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory$5.resolveMember(AttributeFactory.java:1041) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:466) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.AttributeFactory.buildIdAttribute(AttributeFactory.java:144) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.buildIdClassAttributes(MetadataContext.java:355) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.applyIdMetadata(MetadataContext.java:326) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetadataContext.wrapUp(MetadataContext.java:247) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:96) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.internal.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:148) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:865) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
        at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.1.Final.jar:]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.1.0.Final.jar:8.1.0.Final]
        ... 8 more
    
    10:22:08,116 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) JBAS014613: Operation ("redeploy") failed - address: ([("deployment" => "ear-1.0.ear")]) - failure description: {"JBAS014671: Failed services" => {
    "jboss.persistenceunit.\"ear-1.0.ear#noCacheRDBMS\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ear-1.0.ear#noCacheRDBMS\": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId",
    "jboss.persistenceunit.\"ear-1.0.ear#containerRDBMS\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ear-1.0.ear#containerRDBMS\": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId",
    "jboss.persistenceunit.\"ear-1.0.ear#RDBMS\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ear-1.0.ear#RDBMS\": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId"}
    10:22:08,119 ERROR [org.jboss.as.server] (management-handler-thread - 1) JBAS015860: Redeploy of deployment "ear-1.0.ear" was rolled back with the following failure message:
    {"JBAS014671: Failed services" => {
    "jboss.persistenceunit.\"ear-1.0.ear#noCacheRDBMS\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ear-1.0.ear#noCacheRDBMS\": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId",
    "jboss.persistenceunit.\"ear-1.0.ear#containerRDBMS\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ear-1.0.ear#containerRDBMS\": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId",
    "jboss.persistenceunit.\"ear-1.0.ear#RDBMS\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"ear-1.0.ear#RDBMS\": org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId
    Caused by: org.hibernate.PropertyNotFoundException: Unable to locate property named insertDate on com.net1.netswitch.database.Net1AtmTransactionId"
    Please advise if you need any further info.

    Thanks in Advance All.
    Kogan

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Inheritance issue with @Mappedsuperclass and @Idclass (JPA, hibernate, Wildfly)

    Man you have an over-complicated setup with inheritance in your compound primary key objects.

    Possibly this error goes away if you put the properties from DbTransactionId directly in Net1AtmTransactionId instead of using inheritance. But I'm not sure, I never used this feature. I wonder what the benefit of this setup is over an old-fashioned @EmbeddedId
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    koganm is offline Member
    Join Date
    Nov 2014
    Posts
    3
    Rep Power
    0

    Default Re: Inheritance issue with @Mappedsuperclass and @Idclass (JPA, hibernate, Wildfly)

    The only reason for me using @Idclass is because wildfly threw an error stating that it required @Idclass with all my compound keys. I did not have this previously and wildfly deployed with no problem but then one day (about two weeks ago) it decided to throw the @Idclass error and i have

    Possibly this error goes away if you put the properties from DbTransactionId directly in Net1AtmTransactionId instead of using inheritance
    I will give this a try and see if it works.

    Thx for your input @gimbal2

  4. #4
    koganm is offline Member
    Join Date
    Nov 2014
    Posts
    3
    Rep Power
    0

    Default Re: Inheritance issue with @Mappedsuperclass and @Idclass (JPA, hibernate, Wildfly)

    Hi,

    I have tried the above but still receiving an error. This time, it complains that insertDate does not exist on the child JPA entity.

    Java Code:
    Caused by: org.hibernate.AnnotationException: Property of @IdClass not found in entity com.net1.netswitch.database.Net1AtmTransaction: insertDate
            at org.hibernate.cfg.AnnotationBinder.fillComponent(AnnotationBinder.java:2603) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.cfg.AnnotationBinder.bindIdClass(AnnotationBinder.java:2716) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.cfg.AnnotationBinder.mapAsIdClass(AnnotationBinder.java:1041) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:781) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3788) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3742) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
            at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
            ... 13 more
    Any other suggestions please.

    Thx
    Kogan

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Inheritance issue with @Mappedsuperclass and @Idclass (JPA, hibernate, Wildfly)

    The only thing I can recommend is to not use this IdClass construct but rather just use an embedded primary key using @Embeddable and @EmbeddedId. That has always worked for me and it looks a whole lot less weird than this IdClass construct where you need to have all the properties twice :/

    Here is an example of how you use it:

    Configuring a JPA Entity Primary Key
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Hibernate inheritance:Table per class hierarchy
    By JackJoaquin in forum Hibernate
    Replies: 1
    Last Post: 09-06-2013, 08:25 AM
  2. Logical inheritance issue...
    By senca in forum New To Java
    Replies: 2
    Last Post: 06-14-2011, 11:00 AM
  3. Inheritance issue
    By powerpravin in forum New To Java
    Replies: 3
    Last Post: 04-12-2011, 06:11 AM
  4. Simple Inheritance issue...
    By AWE in forum New To Java
    Replies: 3
    Last Post: 07-27-2009, 09:56 PM
  5. help with inheritance in hibernate
    By valery in forum JDBC
    Replies: 1
    Last Post: 08-06-2007, 08:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •