Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Hibernate The type ServiceRegistryBuilder is deprecated
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
The type ServiceRegistryBuilder is deprecated
1 Answer(s)      10 months ago
Posted in : Hibernate


I am trying to Create the SessionFactory in Hibernate using following code:

Configuration configuration = new Configuration();
configuration.configure();
serviceRegistry = new ServiceRegistryBuilder().applySettings(
        configuration.getProperties()).buildServiceRegistry();
sessionFactory = configuration.buildSessionFactory(serviceRegistry);

It's giving the following error:

The type ServiceRegistryBuilder is deprecated

What is the correct way of creating the SessionFactory in Hibernate 4.3 release.

Thanks


Advertisement
View Answers

February 2, 2014 at 1:09 PM


Hi,

Many API's are depricated in the Hibernate 4.3.x and the way of creating the SessionFactory is also changed.

So, you should use the latest way of creating the SessionFactory.

Check at Hibernate 4 Hello World: Example of Hello World program

Thanks



Related Tutorials/Questions & Answers:
The type ServiceRegistryBuilder is deprecated
The type ServiceRegistryBuilder is deprecated  I am trying to Create...(serviceRegistry); It's giving the following error: The type ServiceRegistryBuilder... ServiceRegistryBuilder().applySettings( configuration.getProperties
The method buildServiceRegistry() is undefined for the type ServiceRegistryBuilder
() is undefined for the type ServiceRegistryBuilder" in Hibernate 4.3.1? I am using...() is undefined for the type ServiceRegistryBuilder How to solve the issue? Thanks  ...The method buildServiceRegistry() is undefined for the type
Advertisements
standard serviceregistrybuilder example
standard serviceregistrybuilder example  can any one share me the standard serviceregistrybuilder example code? My project is in Hibernate 4.3.1.... serviceregistrybuilder for creating SessionFactory with the help of example code. Thanks
What is deprecated?
What is deprecated?  What is mean by deprecated element, method or class?   What is deprecated? Deprecated means condemned. A object... is showing a deprecated message that means it is either outdated or has been
MPMoviePlayerContentPreloadDidFinishNotification' is deprecated
MPMoviePlayerContentPreloadDidFinishNotification' is deprecated  Hi, While compiling compiler is giving following error: warning: 'MPMoviePlayerContentPreloadDidFinishNotification' is deprecated (declared at /Developer
UIKeyboardBoundsUserInfoKey is deprecated
UIKeyboardBoundsUserInfoKey is deprecated  On running my application i am getting a warning as given below... " UIKeyboardBoundsUserInfoKey is deprecated " What is the cause of it?? and what should i use instead
Annotationconfiguration deprecated and its replacement
Annotationconfiguration deprecated and its replacement  Hi, In Hibernate 4 annotationconfiguration is deprecated. Can you tell me what will be its...(); serviceRegistry = new ServiceRegistryBuilder().applySettings
Java making a method deprecated
Java making a method deprecated  java making a method deprecated...; Declare "@Deprecated" before a method to create a method deprecated in your Java application. Though, it is not a correct way to use a deprecated class
HTTP_POST_VARS is deprecated
HTTP_POST_VARS is deprecated  HTTPPOSTVARS is deprecated. Which function to be used? Thanks   Hi, You should use: $id=$_GET["id"]; or $id=$_POST["id"]; thanks
Function split() is deprecated
Function split() is deprecated  Hi, The Function split() is deprecated in latest version of PHP 5.5.23? What is the solution? Thanks   Hi, Use the following function: array explode ( string $delimiter , string
Is buildSessionFactory() deprecated in hibernate 4?
Is buildSessionFactory() deprecated in hibernate 4?  Hi, I am trying to develop an application in Hibernate 4. I am using the Hibernate 4.3.0.final build. Following code is given is the Hibernate documentation: SessionFactory
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? Thanks
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? Thanks
type casting
type casting  what is type casting
Type casting
Type casting  how to type cast a string value to byte array
type casting
List (object type) <Object> totalList(int pi){ try{ Query q...type casting  <--bean class-->method calllist is of object type...){ return null; } how to type cast object type to entity type
type mismatch
type mismatch  Statement s= con.createStatement(); this line gives error of "type mismatch" I am using eclips nd new to servlet nd JDBC, Please help me, Thank you
type casting
type casting  int n=20; n=sizeof((char)(float)n); what is n value
data type
data type  which data type is used to store video file in mysql databse
coding for re-type password
coding for re-type password  coding for re-type password
Document Type Definition
Document Type Definition  What is Document Type Definition
fastest type of JDBC driver
fastest type of JDBC driver  What is the fastest type of JDBC driver
Reference type Vs Object type. - Java Beginners
Reference type Vs Object type.  Can anyone explain the exact... or object type variable which may reference a Book object or an object of any... of Employee Class 'Employee' would be the REFERENCE TYPE and Class
Fastest type of JDBC Driver
Fastest type of JDBC Driver  hello, What is the fastest type of JDBC driver?   hii, Type 4 is the fastest JDBC driver
Java type casting
Java type casting  What is Downcasting
eraser type generics in java
eraser type generics in java  Explain eraser type generics in java with example
What is mime type in HTML
What is mime type in HTML  what is mime type in html? is it different in new HTML5
What is mime type in HTML
What is mime type in HTML  what is mime type in html? is it different in new HTML5
type casting purpose
type casting purpose  what is type casting , could u explain with practical example
Java type casting
Java type casting  Can a Byte object be cast to a double value
type 4 jdbc driver
type 4 jdbc driver   i read in this site that type 4 jdbc driver is the fastest one so used it to connect with the database.......but not tried another drivers,....can u specifically answer me why type 4 is the fastest one
Advertisements
 

 

 

DMCA.com