Hi,
I have a problem running a single in integration testing, I get an error
message saying that a table is not present. This is not seen when I run the
whole integtest project via 'mvn test'.
I don't think that the specific class mentioned is the problem, as I say
its created successfully everywhere else. Maybe wrong, so the class code is
after the error below.
04:41:17,983 [Schema Thread-0 DEBUG] An error occurred
while auto-creating schema elements - rolling back
Persistent class
"au.com.scds.chats.dom.module.general.names.ClassificationValue" 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.ClassificationValue" 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)
04:41:17,985 [ObjectReflectorDefault Thread-0 INFO ] shutting down
org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault@3b4eb5a4
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 ClassificationValue {
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 ((ClassificationValue) obj).getName().equals(this.getName());
}
@Override
public String toString() {
return this.getClass().getName() + ":" + this.getName();
}
}