-->
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.  [ 2 posts ] 
Author Message
 Post subject: SessionFactoryUtil cannot be resolved
PostPosted: Tue Sep 02, 2014 5:43 am 
Newbie

Joined: Tue Sep 02, 2014 5:40 am
Posts: 2
Hi, i'm new with Hibernate. I'm using Eclipse and Maven project, i've imported the last version of hibernatre core functionality throught pom.xml dependencies.
Anyway, i'm unable to correctly instantiate a session.

Quote:
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import java.util.List;
import org.hibernate.Query;

public class PersonaUnitTest {
public static void main(String[] args) {
System.out.println("Persona Unit Test");

// Recupero la sessione: attenzione, questa operazione
// può essere gestita come un Singleton lungo tutta l’applicazione

Session session = SessionFactoryUtil.getSessionFactory().getCurrentSession();




on SessionFactoryUtil i get "cannot be resolved" error.. Why?


Top
 Profile  
 
 Post subject: Re: SessionFactoryUtil cannot be resolved
PostPosted: Thu Sep 04, 2014 12:52 am 
Newbie

Joined: Thu Sep 04, 2014 12:24 am
Posts: 2
Hello,

The SessionFactoryUtil is not available in the Hibernate. It might be your custom class, can you please check your classpat


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.