Galera, estou começando no GUJ e em Spring + Hibernate e na verdade nem sei se esse é o fórum para postar essa duvida.
Estou com um erro e não sei aonde preciso mexer.
O erro é esse: [color=red] Error creating bean with name ‘pessoaBean’ defined in file [C:\Users\elias\workspaces\curso\01-Criteria\bin\dao\impl\PessoaDAOImpl.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: ‘sessionFactory’ or ‘hibernateTemplate’ is required[/color]
Quando tento carregar o application context, acontece o erro.
ApplicationContext appContext = new ClassPathXmlApplicationContext("applicationContext.xml");
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:annotation-config/>
<context:component-scan base-package="dao, dao.impl, modelo, view"/>
</beans>
hibernate.cfg.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/postgres</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.connection.password">pass</property>
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<property name="hibernate.current_session_context_class">thread</property>
<mapping class="modelo.Endereco"/>
<mapping class="modelo.Pessoa"/>
<mapping class="modelo.PessoaFisica"/>
</session-factory>
</hibernate-configuration>