Exception in thread “main” java.lang.IllegalStateException: CGLIB is required to process @Configuration classes

During developing Spring applications we might get below exception, basically we might get this exception when we are using “@Configuration” annotation in our Application and we are not adding the “cglib-nodep”  jar in to class path.   Mar 11, 2015 3:59:36 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1d8c528: startup date [Wed Mar 11 15:59:36 IST 2015]; root […]

spring javaconfig example – @Configuration

In this tutorial we are going to explore how we can achieve to build a completely XML-free sample Spring  application. Before Spring 3.0  we are using XML based approach to configure our beans in xml file. But in Spring 3.0 we have new feature “@Configuration”  which is useful to configure our beans in programmatically. let us have […]

What is Hibernate configuration file?

Hibernate uses this file to establish connection to the database server. It is an XML file which is used to define DataBase connection details: Driver class, URL, username and Password. Hibernate properties: Dialect, show_sql, second_level_cache ..etc Mapping files names. One configuration file for each database. Standard name for this file is hibernate.cfg.xml Syntax of Configuration xml: […]