-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: composite-key problem (I read the docs! HONEST!!)
PostPosted: Sat Nov 01, 2003 1:16 am 
Regular
Regular

Joined: Mon Oct 20, 2003 3:14 am
Posts: 53
Location: Sterling, VA, USA
Code:

<class
    name="bb.hibernate.UserData"
    table="userdata"
>
      <composite-id name="compId" class="bb.hibernate.UserLanguageKey">
        <key-property name="userId"  column="UserId" type="int" />
        <key-property name="languageCode" column="LanguageCode" type="string" />
      </composite-id>

...


The above results in:

Code:

org.xml.sax.SAXParseException: Attribute "class" must be declared for element type "key-property".

   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

   at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)

   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

   at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source)

   at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)

   at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)

   at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

   at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

   at org.jdom.input.SAXBuilder.build(SAXBuilder.java:305)

   at org.jdom.input.SAXBuilder.build(SAXBuilder.java:376)

   at org.jdom.input.SAXBuilder.build(SAXBuilder.java:357)

   at net.sf.hibernate.tool.hbm2java.CodeGenerator.main(CodeGenerator.java:98)

_________________
"A statistician is a mathmetician, broken down by age and sex".


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 01, 2003 1:16 am 
Regular
Regular

Joined: Mon Oct 20, 2003 3:14 am
Posts: 53
Location: Sterling, VA, USA
I should mention that this happens, even if I try to declare a class.

The CodeGenerator is what is spitting this out.

_________________
"A statistician is a mathmetician, broken down by age and sex".


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 01, 2003 2:38 am 
Regular
Regular

Joined: Mon Oct 20, 2003 3:14 am
Posts: 53
Location: Sterling, VA, USA
Stand down. Not sure what I did to fix it, but it quit complaining.

(I was worried when I saw that the DTD agreed with me, so of course, that must have scared it into submission)

_________________
"A statistician is a mathmetician, broken down by age and sex".


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.