[hibernate-issues] [Hibernate-JIRA] Resolved: (EJB-243) Error in Documentation: persistence.xml for typical Java SE Environment

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Dec 7 16:26:05 EST 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/EJB-243?page=all ]
     
Emmanuel Bernard resolved EJB-243:
----------------------------------

    Resolution: Fixed
     Assign To: Emmanuel Bernard

> Error in Documentation: persistence.xml for typical Java SE Environment
> -----------------------------------------------------------------------
>
>          Key: EJB-243
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-243
>      Project: Hibernate Entity Manager
>         Type: Improvement

>   Components: Documentation
>     Versions: 3.2.0.ga
>     Reporter: Michael Plöd
>     Assignee: Emmanuel Bernard
>      Fix For: 3.2.1

>
>
> Hi,
> I just found out that there is a small bug in the example persistence.xml file for a Typical Java SE environment in Chapter 2.2.2 Bootstrapping:
> The xml file is as follows:
> <persistence>
>    <persistence-unit name="manager1" transaction-type="RESOURCE_LOCAL">
>       <class>org.hibernate.ejb.test.Cat</class>
>       <class>org.hibernate.ejb.test.Distributor</class>
>       <class>org.hibernate.ejb.test.Item</class>
>       <properties>
>          <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
>          <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
>          <property name="hibernate.connection.username" value="sa"/>
>          <property name="hibernate.connection.password" value=""/>
>          <property name="hibernate.connection.url" value="jdbc:hsqldb:."/>
>          <property name="hibernate.max_fetch_depth" value="3"/>
>        
>          <!-- cache configuration -->
>          <property name="hibernate.ejb.classcache.org.hibernate.ejb.test.Item" value="read-write"/>
>          <property name="hibernate.ejb.collectioncache.org.hibernate.ejb.test.Item.distributors" value="read-write, RegionName"/>
>          <!-- alternatively to <class> and <property> declarations, you can use a regular hibernate.cfg.xml file -->
>          <!-- property name="hibernate.ejb.cfgfile" value="/org/hibernate/ejb/test/hibernate.cfg.xml"/ -->
>       </properties>
>    <persistence-unit>
> </persistence>
> The error is that the <persistence-unit> is not being closed by </persistence-unit> (look two lines up from here) ...
> The documentation says:
> ...
> <persistence-unit>
> ....
> <persistence-unit>  <---- this must me </persistence-unit>
> </persistence>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira





More information about the hibernate-issues mailing list