facebook

Hibernate Tutorial Question – SQL String? [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #220874 Reply

    thurisaz
    Member

    Hi everybody,

    I’ve just tried the Hibernate-MyEclipse-Tutorial from the MyEclipse-Website. Everythings seems to be well, but after creating the hibernate-mapping-file from the browser-view I get the error message: “The content of element class much mach (…)”. It seems so that the syntax of the xml-files is not correct. There are “primary-key” informations misssing – but MyEclipse doesn’t set these properties. Why not?

    <?xml version=”1.0″?>
    <!DOCTYPE hibernate-mapping PUBLIC
    “-//Hibernate/Hibernate Mapping DTD 2.0//EN”
    http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd&#8221; >

    <!– DO NOT EDIT: This is a generated file that is synchronized –>
    <!– by MyEclipse Hibernate tool integration. –>
    <!– Created Sun Dec 12 19:00:15 CET 2004 –>
    <hibernate-mapping package=”test”>

    <class name=”EchoMessage” table=”echo_message”>

    <property name=”id” column=”id” type=”java.lang.Integer” not-null=”true” />
    <property name=”msg” column=”msg” type=”java.lang.String” />
    </class>

    </hibernate-mapping>

    #220875 Reply

    thurisaz
    Member

    Problem solved: in the tutorial a MySQL DB is used, but I have a Postgresql Database. Therefore the SQL-String from the tutorial was wrong. Now it works!

    #220882 Reply

    Greg
    Member

    Thanks for following up. If you don’t mind, please share what string you used to get it to work in case there are other Postgresql users that might be having same issue.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Hibernate Tutorial Question – SQL String? [Closed]

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