isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Cameron <steve.cameron...@gmail.com>
Subject Re: schema exception running integtests.
Date Thu, 17 Sep 2015 07:25:48 GMT
The relevant class is a simple abstract one

package au.com.scds.chats.dom.module.general.names;

import javax.jdo.annotations.Column;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.Inheritance;
import javax.jdo.annotations.InheritanceStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.PrimaryKey;

import au.com.scds.chats.dom.AbstractNamedChatsDomainEntity;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class SimpleNamedEntity {

    private String name;

    @PrimaryKey
    @Column(allowsNull="false")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(final Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj == this) {
            return true;
        }
        if (!this.getClass().isInstance(obj)) {
            return false;
        }
        return ((SimpleNamedEntity) obj).getName().equals(this.getName());
    }

    @Override
    public String toString() {
        return this.getClass().getName() + ":" + this.getName();
    }
}

On Thu, Sep 17, 2015 at 5:23 PM, Stephen Cameron <steve.cameron.62@gmail.com
> wrote:

> Hi,
>
> I am getting an datanucleus exception relating to a missing table when
> that table as InheritanceStrategy.SUBCLASS_TABLE, so no table is correct.
>
> I don't get the error when running the webapp, only the integtests, so
> wondering if its something relating to use of wrap()?
>
> 17:10:54,412  [Schema               Thread-0   DEBUG]  An error occurred
> while auto-creating schema elements - rolling back
> Persistent class
> "au.com.scds.chats.dom.module.general.names.SimpleNamedEntity" has no table
> in the database, but the operation requires it. Please check the
> specification of the MetaData for this class.
> org.datanucleus.store.rdbms.exceptions.NoTableManagedException: Persistent
> class "au.com.scds.chats.dom.module.general.names.SimpleNamedEntity" has no
> table in the database, but the operation requires it. Please check the
> specification of the MetaData for this class.
>     at
> org.datanucleus.store.rdbms.RDBMSStoreManager.getDatastoreClass(RDBMSStoreManager.java:698)
>     at
> org.datanucleus.store.rdbms.table.ClassTable.initializePK(ClassTable.java:1003)
>     at
> org.datanucleus.store.rdbms.table.ClassTable.preInitialize(ClassTable.java:250)
>     at
> org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTable(RDBMSStoreManager.java:3194)
>     at
> org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTables(RDBMSStoreManager.java:2993)
>     at
> org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2872)
>     at
> org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)
>     at
> org.datanucleus.store.rdbms.RDBMSStoreManager.createSchemaForClasses(RDBMSStoreManager.java:3842)
>     at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.createSchema(DataNucleusApplicationComponents.java:196)
>     at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.createPmfAndSchemaIfRequired(DataNucleusApplicationComponents.java:155)
>     at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.initialize(DataNucleusApplicationComponents.java:110)
>     at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.<init>(DataNucleusApplicationComponents.java:103)
>     at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createDataNucleusApplicationComponentsIfRequired(DataNucleusPersistenceMechanismInstaller.java:134)
>     at
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createObjectStore(DataNucleusPersistenceMechanismInstaller.java:110)
>     at
> org.apache.isis.core.runtime.system.persistence.PersistenceSessionFactory.createPersistenceSession(PersistenceSessionFactory.java:95)
>     at
> org.apache.isis.core.runtime.system.session.IsisSessionFactory.openSession(IsisSessionFactory.java:141)
>     at
> org.apache.isis.core.runtime.system.context.IsisContextStatic.openSessionInstance(IsisContextStatic.java:70)
>     at
> org.apache.isis.core.runtime.system.context.IsisContext.openSession(IsisContext.java:279)
>     at
> org.apache.isis.core.runtime.system.IsisSystem.shutdownServices(IsisSystem.java:311)
>     at
> org.apache.isis.core.runtime.system.IsisSystem.shutdown(IsisSystem.java:300)
>     at
> org.apache.isis.core.integtestsupport.IsisSystemForTest.shutdown(IsisSystemForTest.java:467)
>     at
> org.apache.isis.core.integtestsupport.IsisSystemForTest.access$100(IsisSystemForTest.java:74)
>     at
> org.apache.isis.core.integtestsupport.IsisSystemForTest$Builder$1.run(IsisSystemForTest.java:301)
> 17:10:54,415  [ObjectReflectorDefault Thread-0   INFO ]  shutting down
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault@6c4f090a
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message