I have had TOPLINK-28018 error afte I had added one-to-many or many-to-one
Hello.
I am using TopLink and Spring. I have the followng persistence.xml:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="registry" transaction-type="RESOURCE_LOCAL">
<mapping-file>ru/lanit/ps/registry/model/rpaymenttype.xml</mapping-file>
<mapping-file>ru/lanit/ps/registry/model/radministrativelevel.xml</mapping-file>
<mapping-file>ru/lanit/ps/registry/model/rterritory.xml</mapping-file>
<mapping-file>ru/lanit/ps/registry/model/stateowner.xml</mapping-file>
<properties>
<property name="com.intellij.javaee.persistence.datasource" value="Datasource"/>
<property name="toplink.logging.level" value="FINE"/>
<property name="toplink.jdbc.driver" value="org.hsqldb.jdbcDriver"/>
<property name="toplink.jdbc.url" value="jdbc:hsqldb:mem:PUBSER"/>
<property name="toplink.jdbc.password" value=""/>
<property name="toplink.jdbc.user" value="sa"/>
</properties>
</persistence-unit>
</persistence>
All my classes are inherited from StateOwner.class and only the RTerritory class has "one-to-many" and "many-to-one" relationships. When I add rterritory.xml to persistence.xml I have the following error (before all works fine):
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
[TopLink Config]: 2007.12.18 02:47:15.812--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.lang.Long ru.lanit.ps.registry.model.StateOwner.getId()] is being defaulted to: ID.
[TopLink Config]: 2007.12.18 02:47:15.859--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.lang.Long ru.lanit.ps.registry.model.StateOwner.getStateTerritoryId()] is being defaulted to: STATETERRITORYID.
[TopLink Config]: 2007.12.18 02:47:15.875--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.lang.String ru.lanit.ps.registry.model.StateOwner.getStringId()] is being defaulted to: STRINGID.
[TopLink Config]: 2007.12.18 02:47:15.875--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.lang.String ru.lanit.ps.registry.model.StateOwner.getStateStatus()] is being defaulted to: STATESTATUS.
[TopLink Config]: 2007.12.18 02:47:15.875--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.lang.Long ru.lanit.ps.registry.model.StateOwner.getStateVersion()] is being defaulted to: STATEVERSION.
[TopLink Config]: 2007.12.18 02:47:15.890--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.lang.String ru.lanit.ps.registry.model.StateOwner.getStateAuthor()] is being defaulted to: STATEAUTHOR.
[TopLink Config]: 2007.12.18 02:47:15.890--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.sql.Timestamp ru.lanit.ps.registry.model.StateOwner.getStateCreationDate()] is being defaulted to: STATECREATIONDATE.
[TopLink Config]: 2007.12.18 02:47:15.890--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.sql.Timestamp ru.lanit.ps.registry.model.StateOwner.getStateModificationDate()] is being defaulted to: STATEMODIFICATIONDATE.
[TopLink Config]: 2007.12.18 02:47:15.890--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.lang.String ru.lanit.ps.registry.model.StateOwner.getStateComment()] is being defaulted to: STATECOMMENT.
[TopLink Config]: 2007.12.18 02:47:15.906--ServerSession(25709120)--Thread(Thread[main,5,main])--The column name for element [public java.sql.Timestamp ru.lanit.ps.registry.model.StateOwner.getStateProcessedDate()] is being defaulted to: STATEPROCESSEDDATE.
[TopLink Config]: 2007.12.18 02:47:15.906--ServerSession(25709120)--Thread(Thread[main,5,main])--The discriminator column name for the root inheritance class [class ru.lanit.ps.registry.model.StateOwner] is being defaulted to: DTYPE.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GroundOfRefusalServiceTarget' defined in class path resource [groundofrefusal.xml]: Cannot resolve reference to bean 'GroundOfRefusalDao' while setting bean property 'dao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GroundOfRefusalDao' defined in class path resource [groundofrefusal.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [openJPAsettings.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [registry] failed.
Internal Exception: java.lang.NullPointerException
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'GroundOfRefusalDao' defined in class path resource [groundofrefusal.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [openJPAsettings.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [registry] failed.
Internal Exception: java.lang.NullPointerException
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [openJPAsettings.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [registry] failed.
Internal Exception: java.lang.NullPointerException
Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [registry] failed.
Internal Exception: java.lang.NullPointerException
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:615)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:178)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:218)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
at ru.lanit.ps.registry.VerifyApplicationContext.setUp(VerifyApplicationContext.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at com.intellij.rt.junit4.Junit4ClassSuite.run(Junit4ClassSuite.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [registry] failed.
Internal Exception: java.lang.NullPointerException
at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:212)
... 61 more
Caused by: java.lang.NullPointerException
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:142)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:275)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:564)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:497)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:231)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:354)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:584)
... 60 more
Process finished with exit code -1
This is my RTerritory.class and rterritory.xml
public class RTerritory extends StateOwner {
private static final long serialVersionUID = 5372570539234097349L;
//link to parent
private RTerritory parentTerritory;
//title
private String title;
//string type
private String type;
//Level
private Integer level;
//set of children
private Set<RTerritory> children = new HashSet<RTerritory>(0);
public RTerritory() {
public RTerritory(Long RTerritory, String title, String type) {
setId(RTerritory);
this.title = title;
this.type = type;
public RTerritory(Long id, RTerritory parentTerritory, String title, String type, Integer level) {
super(id);
this.parentTerritory = parentTerritory;
this.title = title;
this.type = type;
this.level = level;
public RTerritory(Long RTerritory, RTerritory parentTerritory, String title,
String type, Set<RTerritory> RTerritories) {
setId(RTerritory);
this.parentTerritory = parentTerritory;
this.title = title;
this.type = type;
this.children = RTerritories;
public RTerritory(Long id, RTerritory parentTerritory, String title, String type, Integer level, Set<RTerritory> children) {
super(id);
this.parentTerritory = parentTerritory;
this.title = title;
this.type = type;
this.level = level;
this.children = children;
public Integer getLevel() {
return level;
public void setLevel(Integer level) {
this.level = level;
public RTerritory getParentTerritory() {
return this.parentTerritory;
public void setParentTerritory(RTerritory parent_Territory) {
this.parentTerritory = parent_Territory;
public boolean hasParentTerritory() {
return getParentTerritory() != null;
public String getTitle() {
return this.title;
public void setTitle(String title) {
this.title = title;
public String getType() {
return this.type;
public void setType(String type) {
this.type = type;
public Set<RTerritory> getChildren() {
return this.children;
public void setChildren(Set<RTerritory> children) {
this.children = children;
public void addChildTerritory(RTerritory territory) throws Exception {
if (children != null && territory != null) {
children.add(territory);
territory.setParentTerritory(this);
} else {
throw new Exception("Parameter is null or children is null");// TODO throw exception ?
public void removeChildTerritory(RTerritory territory) {
if (children != null && territory != null) {
children.remove(territory);
territory.setParentTerritory(null); // TODO territory.setParentTerritory(this.getParentTerritory()) ?
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
RTerritory that = (RTerritory) o;
if (level != null ? !level.equals(that.level) : that.level != null) return false;
if (title != null ? !title.equals(that.title) : that.title != null) return false;
if (type != null ? !type.equals(that.type) : that.type != null) return false;
return true;
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (title != null ? title.hashCode() : 0);
result = 31 * result + (type != null ? type.hashCode() : 0);
result = 31 * result + (level != null ? level.hashCode() : 0);
return result;
@Override
public boolean isReference() {
return true;
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
version="1.0">
<package>ru.lanit.ps.registry.model</package>
<entity class="RTerritory" name="RTerritory">
<table name="reg_r_territory"/>
<primary-key-join-column name="R_TERRITORY" referenced-column-name="STATUS_ID"/>
<attribute-override name="id">
<column name="R_TERRITORY"/>
</attribute-override>
<attributes>
<basic name="title">
<column length="256" name="TITLE" nullable="false"/>
</basic>
<basic name="type">
<column length="256" name="TYPE" nullable="false"/>
</basic>
<basic name="level">
<column name="LEVEL"/>
</basic>
<!--<many-to-one name="parentTerritory" target-entity="RTerritory">
<join-column name="PARENT_TERRITORY_ID"/>
<cascade>
<cascade-persist/>
<cascade-merge/>
<cascade-refresh/>
</cascade>
</many-to-one>-->
<one-to-many name="children" mapped-by="parentTerritory" target-entity="RTerritory">
<cascade>
<cascade-all/>
</cascade>
</one-to-many>
<transient name="parentTerritory"/>
<!--<transient name="children"/>-->
</attributes>
</entity>
</entity-mappings>
If I make "parentTerritory" and "children" transient - all works well. Above workes also (comment out and without transient) on OpenJpa.
What do I do wrong if I use TopLink?
This is part of my applicationContext.xml
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceXmlLocation"
value="/META-INF/persistence.xml"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter"/>
</property>
<property name="loadTimeWeaver">
<bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
</property>
</bean
Thanks a lot.
Hello.
Thanks a lot for answer.
When I comment out and remove transient I obtain the following exception:
Internal Exception: java.util.NoSuchElementException
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:615)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createContainerEntityManagerFactory(EntityManagerFactoryProvider.java:178)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:218)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
at ru.lanit.ps.registry.VerifyApplicationContext.setUp(VerifyApplicationContext.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at com.intellij.rt.junit4.Junit4ClassSuite.run(Junit4ClassSuite.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [registry] failed.
Internal Exception: java.util.NoSuchElementException
at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:212)
... 61 more
Caused by: java.util.NoSuchElementException
at java.util.AbstractList$Itr.next(AbstractList.java:427)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataDescriptor.getPrimaryKeyFieldName(MetadataDescriptor.java:539)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ObjectAccessor.processOneToOneForeignKeyRelationship(ObjectAccessor.java:113)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ObjectAccessor.processOwningMappingKeys(ObjectAccessor.java:190)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ManyToOneAccessor.process(ManyToOneAccessor.java:106)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:275)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataDescriptor.getMappingForAttributeName(MetadataDescriptor.java:486)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:122)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:142)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:275)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:564)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:497)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:231)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:354)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:584)
... 60 more
Process finished with exit code -1
I want to say that exception is same and I don't use GlassFish I run Unit test.
This is my rterritory.xml now:
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
version="1.0">
<package>ru.lanit.ps.registry.model</package>
<entity class="RTerritory" name="RTerritory">
<table name="reg_r_territory"/>
<primary-key-join-column name="R_TERRITORY" referenced-column-name="STATUS_ID"/>
<attribute-override name="id">
<column name="R_TERRITORY"/>
</attribute-override>
<attributes>
<basic name="title">
<column length="256" name="TITLE" nullable="false"/>
</basic>
<basic name="type">
<column length="256" name="TYPE" nullable="false"/>
</basic>
<basic name="level">
<column name="LEVEL"/>
</basic>
<many-to-one name="parentTerritory" target-entity="RTerritory">
<join-column name="PARENT_TERRITORY_ID"/>
<cascade>
<cascade-persist/>
<cascade-merge/>
<cascade-refresh/>
</cascade>
</many-to-one>
<one-to-many name="children" mapped-by="parentTerritory" target-entity="RTerritory">
<cascade>
<cascade-all/>
</cascade>
</one-to-many>
<!--<transient name="parentTerritory"/>
<transient name="children"/>-->
</attributes>
</entity>
</entity-mappings>
I can't understand What do I do wrong when I include "one-to-many" and "many-to-one" mapping? I want to note it (above mapping) works rightly if I use OpenJpa and one works rightly with TopLink if I remove one-to-many and many-to-one and do them transient.
Thanks a lot.
Message was edited by:
user610937
Message was edited by:
user610937
Similar Messages
-
How can I find the location of an i-pod shuffle, nano and touch that i have synced to my account? I have had each one stolen and would be so relieved if i could track there location as I know they are still in the county I live.
Also if i cant locate them can i at least remotely delete the libraries, and lock them so they are unusable to the thiefs, and i had a sony laptop worth £2000 stolen which I had used my apple account for a year is there anyway i can track that or retrieve the contents and delete them?
Please if anybody knows reply or contact me!!!! =-)
many thanksYou or Apple can do nothing to prevent use of the devices.
For the iPod touch if you turned on the FindMyiPod feature and wifi is on and connected yu may be ablt ot locate it and wipe it by going to iCloud, signing in and going to FindMyiPhone. However, if the iPOd is rectored that feature is deleted.
Report to police and change the passwords for all accounts used on the iPod. -
Hi there, I use a MacBook pro. I have had an one year Creative Cloud acount since february, and now I'm getting the message: WE ARE HAVING TROUBLE VERIFYING YOUR MEMBERSHHIP. I have a photoshop, lightroom and indesign membership. Help!! I need to work! What should I do? Thank you.
Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
-Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
or
A chat session where an agent may remotely look inside your computer may help
Creative Cloud chat support (all Creative Cloud customer service issues)
http://helpx.adobe.com/x-productkb/global/service-ccm.html -
I can not download 19 songs that I recently purchased on my laptop. I am getting the message that my Nano is not an authorized device. Even though I have had it for years and it has many songs downloaded from my laptop. I even decided to do the restore and it is still saying that the 19 songs can not be downloaded to my nano. I did recently upgrade my window's 7 version. Maybe this has created the problem.
Yes, the upgrade is the likely cause.
First you should try to deauthorize your computer/iTunes library before attempting to authorize it again. To do this, click the Store drop down menu in iTunes and choose Deauthorize this Computer. Then enter in your iTunes account credentials.
When it has finished, choose Store -> Authorize this Computer and again enter in your Apple ID account credentials.
Finally, try resyncing your Nano to see if that makes a difference.
B-rock -
After soak test update, I get error messages repeatedly. The majority are "unfortunately, messaging has stopped", but you can replace messaging with "android os", or any other process, as it happens with more than just messaging. I have had numerous people call and ask why I didn't reply to their texts...and I look, but have not received any new texts. YES, I have restarted phone. I have cleared data as well as cache on all apps. I have downloaded the vzw messaging app, which seems silly, since it happens with several different processes and apps, but all to no avail. I am missing texts from my employer, from my family. This did happen, but rarely, before this "soak test". It is now Kitkat version 19.6.3.obake_verizon.en.US. THIS is when I started having problems...like 50 times a day kind of problems! I have seen hundreds of posts all over the internet over the past 3 days. Does no one know how to fix this??? Shouldn't there be a way to revert phone to a pre-update state? and no, hard reset did NOT work!!!! I have been with verizon for well over 15 years, but I have not upgraded my lines and will not in July either. This is ridiculous. It's not like my games aren't working, it is my messaging and "android os"...my lifeline at work!
kristinaf333,
Oh no, I am sorry to hear your messages are not working since the software update. I greatlly appreciate doing all that troubleshooting to try and get the messaging application back in business. I know how much I rely on my messages so I can understand the urgency to get this resolved. Have you had a resolution ticket opened since you started experiencing issues with your messages? Does this happen with all contacts or just some? Please provide additional information to ensure we get to the bottom of this for you.
KarenC_VZW
Follow us on Twitter @VZWSupport -
I have had my laptop for about 5 or 6 yrs. I have had iTunes on it since I have had it. All of sudden my iTunes has stopped working. I am receiving an Error 6034 message. What has happened? I uninstalled it and tried to reinstall but did not help. I am still getting the message. I am not having any problems with it on any of my other devices. Thanks for any help that anyone can give me. mproffitt
Try the following user tip:
Troubleshooting issues with iTunes for Windows updates -
When downloading Itunes, keep getting system error, have had it on this computer before
when downloading Itunes, keep getting system error, have had it on this computer before
For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
tt2 -
iTunes Match has stopped uploading - every file errors and says waiting - I have tried to delete the files and use other formats etc. I have had the service since Day 1 and NEVER had an issue. It didn't start until the Delete from Cloud switch to Hide from cloud - the files that do not upload show grayed out on my other devices.
Have you confirmed that you successfull purged iTunes Match by also looking on an iOS device? If so, keep in mind that Apple's servers may be experiencing a heavy load right now. They just added about 19 countries to the service and I've read a few accounts this morning that suggests all's not running perfectly right now.
-
I have had my iMac for 55 days now and twice I had to power off/on and then It does not power up correctly. I verified my disk and found errors that could not be repaired (errors were associated with boot drive) I erased the drive and restored system back to the previous day. Has anyone else experienced this problem?
Since it's a new machine, contact Apple's Support and let them deal with it. Allen's already recommended an Apple repair station visit. Do note that if you have AppleCare's protection plan and you're within 50 miles (80 KM) of an Apple repair station, you might be eligible for an onsite repair since yours is a desktop machine (depends on where you're located). BTW, the AppleCare Protection Plan's the best warranty policy available for desktop machines. Get it if you don't have it before contacting Apple.
27" i7 iMac (Mid 2011) refurb, OS X Mavericks (10.9.4), ML & SL, G4 450 MP w/Leopard, 9.2.2 -
I have had several kernel panics on my iBook G4; the panic message shows up just after the desktop appears. Although the startup volume shows up in Startup Disk, the installation disk reports an error when I attempt an erase and install. Disk utility is unable either to erase or partition the hard drive. The hard drive shows up in disk utility, but the startup volume doesn’t HELP!!!
Do you have the original system discs that came with the iBook when it was new?
Which exact iBook model is it?
You can choose from this list:
http://www.everymac.com/systems/apple/ibook/index-ibook.html
Erasing the disc and installing Mac OS X 10.5 will result in loss of the other applications (such as the iLife applications) which came pre-installed on the iBook. -
I get an error message saying 'An error has caused Photoshop to stop working correctly. Windows will close the programme and notify you if a solution is available'. I have had no notification. My old Photoshop CS5 works fine, but as I'm paying for CC2014 I would like to use it. I have tried renaming the 'sniffer' file to 'snifferold' as bobmiller4002 suggested but the problem is not resolved. Lightroom works fine.
Hi Nancy,
I'm not sure I have the answers to all your questions. Although I use Photoshop and Lightroom extensively, I'm not a 'techy'.
My system;
Packard bell imedia S2885
1TB hard drive
500G RAM
Windows 8.1 64- bit
Intel core i5 4440
If I open Photoshop cc14 without opening any image, I still get an error message that reads: 'Photoshop has encountered a problem with the display driver, and has temporarily disabled enhancements which use the graphics hardware'.
There is also a link to the Adobe help site, but I'm not sure exactly what I should be downloading from there.
Thanks,
Dan. -
Have had Itunes on this computer literally for years. This AM message "MSVCR80.dll not found, not installed correctly Error 7 (Windows error 126) "- and could not download (it wanted a mobile device - I don't have one)
Help!Solving MSVCR80 issue and Windows iTunes install issues.
Thanks to user turingtest2 for this solution.
Solving MSVCR80 issue and Windows iTunes install issues.
If the above doesn’t do the trick entirely, then use the instructions in the following as it applies to the version of Windows you are using:
HT1925: Removing and Reinstalling iTunes for Windows XP
HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
You may be required to boot into safe mode to complete the folder deletion process. -
I cannot copy from my network drive to my iMac; I get error code 8084. I can copy the same material from my network drive to my PC. In the past, I have had no troubl copying to my iMac. What happened-going from OS 10.6.7 to 10.6.8?
Thread bump.
-
I have had 4 mac computers and after years of downloading songs from itunes, I keep recieving a message that I need to set up an account. when I try to make a new account, i get an error that says i already have an account.
Have you tried checking the Store drop-down menu in the iTunes interface to see if you are signed in the existing account?
-
I have had to reinstall my Mavericks OS and use a Time Machine backup. Now when I open InDesign I get Error:5 , AMT subsystem failure. Does anyone have a fix for this?
I have had to reinstall my Mavericks OS and use a Time Machine backup. Now when I open InDesign I get Error:5 , AMT subsystem failure. Does anyone have a fix for this?
Maybe you are looking for
-
Windows 7 can't connect to Hplaserjet 2430TN via Network
I am having a problem with my windows 7 Home Premium 64 Bit and my HP laserjet 2430TN. Printer is Networked via a 24 Port Linksys gig switch. I have only my PC a Server and my kids 4 PC's on the switch. Oh and my Printer has a static IP with the rest
-
External monitor not going full resolution on extended desktop
Hello, I have a Gateway widescreen 1680x1050 resolution monitor plugged into my 13" Macbook Aluminum computer. When I have both my external and built in display turned on extended mode, my external monitor only goes up to 1600x1000 resolution, which
-
Why does it say invalid address when I try to update apps
It keeps saying it's invalid, but it's not
-
Invalid Index in Crystal Report
Hello, I have written a code which displays records in the crystal report filtered by a textbox in the windows form. I wanted to pass the value of the textbox into the parameter field found in the header of the report. Please help anyone. SqlConnecti
-
Iphone4S : a column of the screen does not respond to touch.
There is a section, a thin coloumn on the right side of my screen that is irresponsive to touch. I cannot type my password because a part of the keyboard is there (And interestingly all keyboard layouts had that key at the same spot) I tried wiping m