facebook

Hibernate DTDs

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #213535 Reply

    Jason Price
    Member

    I am trying to run through the Hibernate tutorial. Once I have created the table mapping I get errors in <TABLENAME>.hbm.xml which says “referenced file contains errors”. I thought this may be down to internet access as my machine access the net through a proxy. So I downloaded the hibernate-mapping-2.0.dtd file to the same folder as the hbm.xml file and change the dtd reference. Now I get the same error in both files (although I can’t see anything in hibernate-mapping-2.0.dtd that references anything else!).

    Any ideas what is going on?

    #213540 Reply

    snpe
    Member

    You try upgarde to 3.81. with fix 1 and 2

    #213568 Reply

    Riyad Kalla
    Member

    “referenced file contains errors”

    Did it give a line error? Is there anything in your log file? (workspace dir\.metadata\.log)

    #213731 Reply

    Jason Price
    Member

    Unfortunately I can’t do anything as my trial has expired. I’ve subscribed but I haven’t recieved my subscription key yet. When I do I’ll try again and let you know the outcome. (Won’t be until tuesday next week at the earliest as its a holiday in UK on monday: woohoo 3 day weekend 😀 !)

    #213752 Reply

    Riyad Kalla
    Member

    Glad to hear it, take some time off and relax for all of us!

    #214750 Reply

    Jason Price
    Member

    Hi
    I finally managed to get some time to look at this again. I decide to start again as I have now upgraded to 3.8.1 with Fix 1 & 2 as suggested by snpe. This has fixed the problem , however, working through the tutorial I noticed that when the mappings are added through the explorer; it doesn’t add the id tag in the hbm.xml file. The tutorial doesn’t show this tag being added so I was wondering if its a bug?

    I don’t know enough about hibernate/MyEclipse yet so sorry if I’m being a bit thick!

    #214757 Reply

    bmdaley
    Member

    I get the following error everytime I open a hibernate mapping file, xxx.hbm.xml. I am running ME 3.8.1 with quick fix 3 installed and eclipse 3.0 (official release):

    An internal error occurred during: “loading C:/Program Files/MyEclipse/eclipse/plugins/com.ibm.webtooling.system.dtds_13.8.1/dtds/hibernate-mapping-2.0.dtd”.
    java.lang.ExceptionInInitializerError
    com.ibm.etools.dtd.impl.DTDFactoryImpl.createDTDEnumerationType(Unknown Source)
    com.ibm.etools.dtd.util.DTDModelBuilder.createDTDEnumeration(Unknown Source)
    com.ibm.etools.dtd.util.DTDModelBuilder.finishAttribute(Unknown Source)
    com.ibm.etools.dtd.util.DTDModelBuilder.addAttribute(Unknown Source)
    com.ibm.etools.dtd.util.DTDModelBuilder.createAttributes(Unknown Source)
    com.ibm.etools.dtd.util.DTDModelBuilder.processAttList(Unknown Source)
    com.ibm.etools.dtd.util.DTDModelBuilder.addAttlistAndContentModel(Unknown Source)
    com.ibm.etools.dtd.util.DTDModelBuilder.visitDTD(Unknown Source)
    com.ibm.etools.dtd.util.DTDUtil.populateDTD(Unknown Source)
    com.ibm.etools.dtd.util.DTDUtil.populateDTD(Unknown Source)
    com.ibm.etools.dtd.util.DTDUtil.parse(Unknown Source)
    com.ibm.etools.contentmodel.dtd.DTDImpl.buildDTDModel(Unknown Source)
    com.ibm.etools.contentmodel.dtd.DTDImpl.buildCMDocument(Unknown Source)
    com.ibm.etools.contentmodel.dtd.CMDocumentFactoryDTD.createCMDocument(Unknown Source)
    com.ibm.etools.contentmodel.CMPlugin.createCMDocument(Unknown Source)
    com.ibm.etools.contentmodel.modelqueryimpl.CMDocumentManagerImpl.buildCMDocument(Unknown Source)
    com.ibm.etools.contentmodel.modelqueryimpl.CMDocumentManagerImpl$AsyncBuildOperation.run(Unknown Source)
    com.ibm.etools.contentmodel.modelqueryimpl.CMDocumentManagerImpl$1.run(Unknown Source)
    org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

    #214765 Reply

    snpe
    Member

    FunkyHippy,
    You haven’t primary key (probably) – I think that ME need make composite id with all columns for this

    Bmdaley,
    Double check instalation for eclipse, ME and JDK
    It work fine with 3.8.1 fix 1,2,3,eclipse 3.0 final and jdk 1.4.2

    regards

    #214941 Reply

    Jason Price
    Member

    Ah that would be it then.
    I am developing against a sqlserver 7 database that still has clients writen in dBase IV/Clipper (remember that anyone?) using it, if we add identity fields or primary key contraints it kills the dbase clients!
    which in turn lock out all the main tables and everyone starts shouting at me!

    Anyway end result is we have no PK of FKs; its all handled in code at the moment. When everything is in j2ee We can start to tidy up the database schema but thas at least 6-7 months away….

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Hibernate DTDs

You must be logged in to post in the forum log in