Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TENEO] Sequence generation problem
[TENEO] Sequence generation problem [message #609434] Wed, 08 August 2007 18:56
Jason Henriksen is currently offline Jason HenriksenFriend
Messages: 231
Registered: July 2009
Senior Member
Hi All,

Am I doing this wrong? I need my object to use a pre-existing sequence, but
I get this exception:

Caused by: java.lang.IllegalStateException: No sequence generator found with
the name: SEQ_CMR3605T, name is used in annotation of element
Address/addressSK

The XSD I'm using looks like this (taken from a JPA annotation reference)

<xsd:element name="addressSK" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="teneo.jpa">
@Id
@Column(name="ADDRESS_SK" nullable="false")
@SequenceGenerator(name="SEQ_CMR3605T", sequenceName="SEQ_CMR3605T",
allocationSize=1)
@GeneratedValue(strategy=SEQUENCE, generator="SEQ_CMR3605T")
</xsd:appinfo>
<xsd:documentation>A generated key to uniquely the
record.</xsd:documentation>
</xsd:annotation>
</xsd:element>


Here's the stack trace:

Caused by: java.lang.IllegalStateException: No sequence generator found with
the name: SEQ_CMR3605T, name is used in annotation of element
Address/addressSK
at
org.eclipse.emf.teneo.annotations.pamodel.impl.PAnnotatedMod elImpl.getSequen
ceGenerator(PAnnotatedModelImpl.java:462)
at
org.eclipse.emf.teneo.hibernate.mapper.IdMapper.processIdPro perty(IdMapper.j
ava:257)
at
org.eclipse.emf.teneo.hibernate.mapper.FeatureMapper.process PAnnotatedEAttri
bute(FeatureMapper.java:125)
at
org.eclipse.emf.teneo.hibernate.mapper.FeatureMapper.process (FeatureMapper.j
ava:98)
at
org.eclipse.emf.teneo.hibernate.mapper.EntityMapper.processF eature(EntityMap
per.java:490)
at
org.eclipse.emf.teneo.hibernate.mapper.EntityMapper.processF eatures(EntityMa
pper.java:390)
at
org.eclipse.emf.teneo.hibernate.mapper.EntityMapper.processE ntity(EntityMapp
er.java:277)
at
org.eclipse.emf.teneo.hibernate.mapper.HibernateMappingGener ator.processPACl
ass(HibernateMappingGenerator.java:183)
at
org.eclipse.emf.teneo.hibernate.mapper.HibernateMappingGener ator.processPers
istentClasses(HibernateMappingGenerator.java:151)
at
org.eclipse.emf.teneo.hibernate.mapper.HibernateMappingGener ator.generate(Hi
bernateMappingGenerator.java:113)
at
org.eclipse.emf.teneo.hibernate.mapper.HibernateMappingGener ator.generateToS
tring(HibernateMappingGenerator.java:124)
at
org.eclipse.emf.teneo.hibernate.HbDataStore.mapEPackages(HbD ataStore.java:55
1)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.mapModel( HbSessionDataSto
re.java:163)
at
org.eclipse.emf.teneo.hibernate.HbSessionDataStore.initializ e(HbSessionDataS
tore.java:77)


(Warning: The line numbers may not line up due to some local hacking, but I
haven't touched anything to do with sequences)



Jason
Previous Topic:[Teneo / JPOX] java.lang.StringIndexOutOfBoundsException
Next Topic:[Teneo / JPOX] java.lang.StringIndexOutOfBoundsException
Goto Forum:
  


Current Time: Mon Aug 15 17:27:44 GMT 2022

Powered by FUDForum. Page generated in 0.01646 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top