[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1074) Compile time error for Chapter 1 reference example

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:01:02 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-1074.
-------------------------------


Closing stale resolved issues

> Compile time error for Chapter 1 reference example
> --------------------------------------------------
>
>                 Key: HHH-1074
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1074
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 3.1 rc 1
>         Environment: Hibernate 3.1 rc 1,SunJDK 1.4.2
>            Reporter: Anto Paul
>
> The EventManager# createAndStoreEvent() of english single HTML page reference documentation(doc/reference/en/html/tutorial.html) is giving compile time error. The code given is 
> private void createAndStoreEvent(String title, Date theDate) {
>     HibernateUtil.getSessionFactory().getCurrentSession()
>         .beginTransaction();
>     Event theEvent = new Event();
>     theEvent.setTitle(title);
>     theEvent.setDate(theDate);
>     HibernateUtil.getSessionFactory().getCurrentSession()
>         .save(theEvent);
>     HibernateUtil.getSessionFactory().getCurrentSession()
>         .getTransaction.commit();
> }
> On compile it is saying 
> ---------- Capture Output ----------
> > "C:\ant-1.6.2\bin\ant.bat"  -f D:\work\hibernate-3.1\one\build.xml 
> compile:
>     [javac] Compiling 3 source files to D:\work\hibernate-3.1\one\bin
>     [javac] D:\work\hibernate-3.1\one\src\EventManager.java:30: cannot resolve symbol
>     [javac] symbol  : variable getTransaction 
>     [javac] location: interface org.hibernate.classic.Session
>     [javac] 	    HibernateUtil.getSessionFactory().getCurrentSession()
>     [javac]                                            ^
>     [javac] 1 error
> How to fix it. I am a newbie.

-- 
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