Spring Contextual Sessions, interface Dao, called from Servlet
im having the next issue when trying to access to my interface Dao using Annotations, let me put you some code:

My interface Dao:

    package com.papito.dao;

    import com.papito.bean.UserBean;

    public interface UsuarioDao {
    	public UserBean getUserById(Integer id);
    	public void addUser(UserBean user);
    	public void saveUser(UserBean user);
    }

My Dao Implementation:

    package com.papito.dao.impl;

    import org.hibernate.SessionFactory;
    import org.hibernate.classic.Session;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Repository;
    
    import com.papito.bean.UserBean;
    import com.papito.dao.UsuarioDao;
    
    @Repository
    public class UsuarioDaoImpl implements UsuarioDao {
    	private SessionFactory fabricaSesion;
    	
    	@Autowired
    	public UsuarioDaoImpl(SessionFactory fabricaSesion){
    		System.out.println("******* Setea el constructor y asigna el factory "+fabricaSesion.toString()+" ********");
    		this.fabricaSesion = fabricaSesion;
    	}
     	
    	private Session currentSession(){
    		System.out.println("******* Regresa el currentSession ********");
    		return fabricaSesion.getCurrentSession();
    	}
    	
     	public void addUser(UserBean user){
    		currentSession().save(user);
    	}
     	
    	public UserBean getUserById(Integer id){
    		System.out.println("***************** Si Entra al UserDaoImpl ********************");
    		return(UserBean)currentSession().get(UserBean.class,id);
    	}
    	
    	public void saveUser(UserBean user){
    		currentSession().update(user);
    	}
    }

My Servlet calling the Dao:
    
    package com.papito.servlet;

    import java.io.IOException;

    import javax.servlet.Servlet;
    import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;

    import org.springframework.beans.factory.annotation.Autowired;
    import com.papito.bean.UserBean;
    import com.papito.dao.UsuarioDao;
    
    @WebServlet("/Start")
    public class Start extends HttpServlet implements Servlet {
	private static final long serialVersionUID = 1L;
	
	@Autowired
	private UsuarioDao usuarioDao;

    public Start() {
        super();
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
       doPost(request,response);
    }

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		System.out.println("******* Entra al servlet ********");
		Integer idUsuario = 1;
		System.out.println("******* Setea el idUsuario a "+idUsuario+" ********");
		UserBean usu = usuarioDao.getUserById(idUsuario);
		System.out.println("******* Obtiene el bean de hibernate ********");
    		System.out.println("Usuario: " + usu.getFirstName() + " " + usu.getLastName());
    	}
    }

My UserBean:

    package com.papito.bean;
    
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.OneToOne;
    import javax.persistence.Table;

    @Entity
    @Table(name = "users")
    public class UserBean implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private Integer userId;
	private String userName;
	private String firstName;
	private String lastName;
	private String password;
	private UserDetailsBean details;
	
	@Id
	@Column(name = "user_id")
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	
	@Column(name = "username")
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@Column(name = "firstName")
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	
	@Column(name = "lastName")
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	
	@Column(name = "password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	@OneToOne
	@JoinColumn(name = "user_id")
	public UserDetailsBean getDetails() {
		return details;
	}
	public void setDetails(UserDetailsBean details) {
		this.details = details;
	}
    }

my UserDetailsBean:
    
    package com.papito.bean;
    
    import java.io.Serializable;
    
    import javax.persistence.Column;
    
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Table;
    
    @Entity
    @Table(name = "user_details")
    public class UserDetailsBean implements Serializable {

	private static final long serialVersionUID = 1L;
	private Integer detailId;
	private String birthday;
	private String sex;
	private String country;
	private String email;
	private String phone;
	private String language;
	
	@Id
	@Column(name = "detail_id")
	public Integer getDetailId() {
		return detailId;
	}
	public void setDetailId(Integer detailId) {
		this.detailId = detailId;
	}
	
	@Column(name = "birthday")
	public String getBirthday() {
		return birthday;
	}
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}
	
	@Column(name = "sex")
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@Column(name = "country")
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	
	@Column(name = "email")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	@Column(name = "phone")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Column(name = "language")
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
    }

My 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:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">

	<jee:jndi-lookup id="baseDeDatos" jndi-name="java:/jdbc/adrianDS"/>
	
	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="baseDeDatos"/>
		<property name="packagesToScan">
			<value>com.papito.bean</value>
		</property> 
		<property name="hibernateProperties">
			<props>
				<prop key="dialect">org.hibernate.dialect.MySQLDialect</prop>
			</props>
		</property>
	</bean>
	
	<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
		
	<context:component-scan base-package="com.papito.dao"/>
	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory"/>
	</bean>
</beans>

My web.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
    <display-name>TestWeb</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath*:**/*Context.xml</param-value>
	</context-param>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<servlet>
		<servlet-name>start</servlet-name>
		<servlet-class>com.papito.servlet.Start</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>start</servlet-name>
		<url-pattern>/start</url-pattern>
	</servlet-mapping>
    </web-app>

Ok i think that's it.

Im trying to follow the hibernate contextual sessions implementation according to the book Spring in Action: Third Edition, and my code seems to be fairly right, when i start jboss hibernate reports the mapping doing just fine, my db is a datasource configured on jboss AS7 standalone.xml with the correct information.

Here is an example of what the jboss log returns when starting my app:

    14:25:31,421 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) Bound data source [java:/jdbc/adrianDS]
    14:25:31,442 INFO  [org.jboss.as.deployment] (MSC service thread 1-5) Started FileSystemDeploymentService for directory J:\servers\jboss-as-web-7.0.2\standalone\deployments
    14:25:31,455 INFO  [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found TestWebEAR.ear in deployment directory. To trigger deployment create a file called TestWebEAR.ear.dodeploy
    14:25:31,483 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "TestWebEAR.ear"
    14:25:31,507 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "TestWeb.war"
    14:25:36,418 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) added javax.persistence.api dependency to TestWebEAR.ear
    14:25:36,420 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api dependency to TestWeb.war
    14:25:36,712 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) Deployment has its own Persistence Provider class org.hibernate.ejb.HibernatePersistence 
    14:25:36,913 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestWeb]] (MSC service thread 1-1) No Spring WebApplicationInitializer types detected on classpath
    14:25:36,942 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestWeb]] (MSC service thread 1-1) Initializing Spring root WebApplicationContext
    14:25:36,942 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Root WebApplicationContext: initialization started
    14:25:36,999 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Refreshing Root WebApplicationContext: startup date [Tue Feb 07 14:25:36 CST 2012]; root of context hierarchy
    14:25:37,541 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-1) Loading XML bean definitions from "/J:/servers/jboss-as-web-7.0.2/standalone/deployments/TestWebEAR.ear/TestWeb.war/WEB-INF/classes/com/papito/config/ApplicationContext.xml"
    14:25:37,792 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-1) JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    14:25:37,794 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-1) JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    14:25:37,922 INFO  [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (MSC service thread 1-1) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    14:25:38,012 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Bean 'baseDeDatos' of type [class org.springframework.jndi.JndiObjectFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    14:25:38,014 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Bean 'baseDeDatos' of type [class org.jboss.jca.adapters.jdbc.WrapperDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    14:25:38,109 ERROR [stderr] (MSC service thread 1-1) 75 [MSC service thread 1-1] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
    
    14:25:38,114 ERROR [stderr] (MSC service thread 1-1) 80 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - Hibernate 3.6.9.Final
    
    14:25:38,116 ERROR [stderr] (MSC service thread 1-1) 82 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - hibernate.properties not found
    
    14:25:38,119 ERROR [stderr] (MSC service thread 1-1) 85 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
    
    14:25:38,122 ERROR [stderr] (MSC service thread 1-1) 88 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
    
    14:25:38,210 ERROR [stderr] (MSC service thread 1-1) 176 [MSC service thread 1-1] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.papito.bean.UserBean
    
    14:25:38,238 ERROR [stderr] (MSC service thread 1-1) 204 [MSC service thread 1-1] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.papito.bean.UserBean on table users
    
    14:25:38,275 ERROR [stderr] (MSC service thread 1-1) 241 [MSC service thread 1-1] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.papito.bean.UserDetailsBean
    
    14:25:38,276 ERROR [stderr] (MSC service thread 1-1) 242 [MSC service thread 1-1] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.papito.bean.UserDetailsBean on table user_details
    
    14:25:38,286 ERROR [stderr] (MSC service thread 1-1) 251 [MSC service thread 1-1] INFO org.hibernate.cfg.Configuration - Hibernate Validator not found: ignoring
    
    14:25:38,305 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-1) Hibernate Validator 4.2.0.Final
    14:25:38,363 INFO  [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] (MSC service thread 1-1) Building new Hibernate SessionFactory
    14:25:38,371 ERROR [stderr] (MSC service thread 1-1) 337 [MSC service thread 1-1] INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
    
    14:25:38,378 ERROR [stderr] (MSC service thread 1-1) 343 [MSC service thread 1-1] INFO org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
    
    14:25:38,620 ERROR [stderr] (MSC service thread 1-1) 586 [MSC service thread 1-1] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
    
    14:25:38,629 ERROR [stderr] (MSC service thread 1-1) 595 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Database ->
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)        name : MySQL
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)     version : 5.5.8
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)       major : 5
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)       minor : 5
    
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1) 596 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Driver ->
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1)        name : MySQL-AB JDBC Driver
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1)     version : mysql-connector-java-5.1.18 ( Revision: tonci.grgin@oracle.com-20110930151701-jfj14ddfq48ifkfq )
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1)       major : 5
    14:25:38,632 ERROR [stderr] (MSC service thread 1-1)       minor : 1
    
    14:25:38,634 ERROR [stderr] (MSC service thread 1-1) 600 [MSC service thread 1-1] INFO org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
    
    14:25:38,635 ERROR [stderr] (MSC service thread 1-1) 601 [MSC service thread 1-1] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    
    14:25:38,636 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
    
    14:25:38,636 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
    
    14:25:38,636 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
    
    14:25:38,637 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
    
    14:25:38,637 ERROR [stderr] (MSC service thread 1-1) 603 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
    
    14:25:38,637 ERROR [stderr] (MSC service thread 1-1) 603 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
    
    14:25:38,638 ERROR [stderr] (MSC service thread 1-1) 604 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
    
    14:25:38,638 ERROR [stderr] (MSC service thread 1-1) 604 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
    
    14:25:38,639 ERROR [stderr] (MSC service thread 1-1) 605 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
    
    14:25:38,639 ERROR [stderr] (MSC service thread 1-1) 605 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
    
    14:25:38,639 ERROR [stderr] (MSC service thread 1-1) 605 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
    
    14:25:38,640 ERROR [stderr] (MSC service thread 1-1) 606 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
    
    14:25:38,640 ERROR [stderr] (MSC service thread 1-1) 606 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    
    14:25:38,641 ERROR [stderr] (MSC service thread 1-1) 607 [MSC service thread 1-1] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
    
    14:25:38,643 ERROR [stderr] (MSC service thread 1-1) 609 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
    
    14:25:38,643 ERROR [stderr] (MSC service thread 1-1) 609 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
    
    14:25:38,644 ERROR [stderr] (MSC service thread 1-1) 610 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
    
    14:25:38,647 ERROR [stderr] (MSC service thread 1-1) 613 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
    
    14:25:38,647 ERROR [stderr] (MSC service thread 1-1) 613 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
    
    14:25:38,648 ERROR [stderr] (MSC service thread 1-1) 614 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
    
    14:25:38,648 ERROR [stderr] (MSC service thread 1-1) 614 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
    
    14:25:38,648 ERROR [stderr] (MSC service thread 1-1) 614 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Check Nullability in Core (should be disabled when Bean Validation is on): disabled
    
    14:25:38,660 ERROR [stderr] (MSC service thread 1-1) 626 [MSC service thread 1-1] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
    
    14:25:38,666 ERROR [stderr] (MSC service thread 1-1) 632 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [wrapper_materialized_blob] overrides previous : org.hibernate.type.WrappedMaterializedBlobType@108c3db2
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 632 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [blob] overrides previous : org.hibernate.type.BlobType@6726799a
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 633 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [java.sql.Blob] overrides previous : org.hibernate.type.BlobType@6726799a
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 633 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [materialized_blob] overrides previous : org.hibernate.type.MaterializedBlobType@ef9a25e
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 633 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [clob] overrides previous : org.hibernate.type.ClobType@2712d100
    
    14:25:38,668 ERROR [stderr] (MSC service thread 1-1) 634 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [java.sql.Clob] overrides previous : org.hibernate.type.ClobType@2712d100
    
    14:25:38,668 ERROR [stderr] (MSC service thread 1-1) 634 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [characters_clob] overrides previous : org.hibernate.type.PrimitiveCharacterArrayClobType@44576b0a
    
    14:25:38,668 ERROR [stderr] (MSC service thread 1-1) 634 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [wrapper_characters_clob] overrides previous : org.hibernate.type.CharacterArrayClobType@47348093
    
    14:25:38,669 ERROR [stderr] (MSC service thread 1-1) 635 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [materialized_clob] overrides previous : org.hibernate.type.MaterializedClobType@47e5576a
    
    14:25:38,815 ERROR [stderr] (MSC service thread 1-1) 781 [MSC service thread 1-1] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
    
    14:25:38,817 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Bean 'sessionFactory' of type [class org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    14:25:38,827 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-1) Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@676b678d: defining beans [baseDeDatos,sessionFactory,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,UsuarioDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,jdbcTemplate,transactionManager,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
    14:25:38,873 INFO  [stdout] (MSC service thread 1-1) ******* Setea el constructor y asigna el factory org.hibernate.impl.SessionFactoryImpl@60822515 ********
    
    14:25:38,937 INFO  [org.springframework.orm.hibernate3.HibernateTransactionManager] (MSC service thread 1-1) Using DataSource [org.jboss.jca.adapters.jdbc.WrapperDataSource@24ae7f22] of Hibernate SessionFactory for HibernateTransactionManager
    14:25:38,941 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Root WebApplicationContext: initialization completed in 1998 ms
    14:25:38,997 INFO  [org.jboss.web] (MSC service thread 1-1) registering web context: /TestWeb
    14:25:39,013 INFO  [org.jboss.as] (MSC service thread 1-3) JBoss AS 7.0.2.Final "Arc" started in 10703ms - Started 207 of 266 services (59 services are passive or on-demand)
    14:25:39,066 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "TestWebEAR.ear"

Apparently everything seems ok, right?

When i try to access my /Start servlet to return simple user data, the server returns a 500 error, and this is what the console reports:

    14:25:46,460 INFO  [stdout] (http--127.0.0.1-8080-2) ******* Entra al servlet ********
    
    14:25:46,460 INFO  [stdout] (http--127.0.0.1-8080-2) ******* Setea el idUsuario a 1 ********
    
    14:25:46,461 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestWeb].[com.papito.servlet.Start]] (http--127.0.0.1-8080-2) Servlet.service() for servlet com.papito.servlet.Start threw exception: java.lang.NullPointerException
    	at com.papito.servlet.Start.doPost(Start.java:40) [classes:]
    	at com.papito.servlet.Start.doGet(Start.java:33) [classes:]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    	at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	[ TRIMMED BY StackOverflow text limit]
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at java.lang.Thread.run(Unknown Source) [:1.6.0_24]

Im REALLY stuck here with this simple example, since im just getting familiar with Spring, Hibernate, Annotations and everything else, i may be missing something pretty obvious that im not seeing, any help please would be greatly appreciated!!

Adrian
Spring Contextual Sessions, interface Dao, called from Servlet
===

im having the next issue when trying to access to my interface Dao using Annotations, let me put you some code:

My interface Dao:

    package com.papito.dao;

    import com.papito.bean.UserBean;

    public interface UsuarioDao {
    	public UserBean getUserById(Integer id);
    	public void addUser(UserBean user);
    	public void saveUser(UserBean user);
    }

My Dao Implementation:

    package com.papito.dao.impl;

    import org.hibernate.SessionFactory;
    import org.hibernate.classic.Session;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.stereotype.Repository;
    
    import com.papito.bean.UserBean;
    import com.papito.dao.UsuarioDao;
    
    @Repository
    public class UsuarioDaoImpl implements UsuarioDao {
    	private SessionFactory fabricaSesion;
    	
    	@Autowired
    	public UsuarioDaoImpl(SessionFactory fabricaSesion){
    		System.out.println("******* Setea el constructor y asigna el factory "+fabricaSesion.toString()+" ********");
    		this.fabricaSesion = fabricaSesion;
    	}
     	
    	private Session currentSession(){
    		System.out.println("******* Regresa el currentSession ********");
    		return fabricaSesion.getCurrentSession();
    	}
    	
     	public void addUser(UserBean user){
    		currentSession().save(user);
    	}
     	
    	public UserBean getUserById(Integer id){
    		System.out.println("***************** Si Entra al UserDaoImpl ********************");
    		return(UserBean)currentSession().get(UserBean.class,id);
    	}
    	
    	public void saveUser(UserBean user){
    		currentSession().update(user);
    	}
    }

My Servlet calling the Dao:
    
    package com.papito.servlet;

    import java.io.IOException;

    import javax.servlet.Servlet;
    import javax.servlet.ServletException;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;

    import org.springframework.beans.factory.annotation.Autowired;
    import com.papito.bean.UserBean;
    import com.papito.dao.UsuarioDao;
    
    @WebServlet("/Start")
    public class Start extends HttpServlet implements Servlet {
	private static final long serialVersionUID = 1L;
	
	@Autowired
	private UsuarioDao usuarioDao;

    public Start() {
        super();
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
       doPost(request,response);
    }

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		System.out.println("******* Entra al servlet ********");
		Integer idUsuario = 1;
		System.out.println("******* Setea el idUsuario a "+idUsuario+" ********");
		UserBean usu = usuarioDao.getUserById(idUsuario);
		System.out.println("******* Obtiene el bean de hibernate ********");
    		System.out.println("Usuario: " + usu.getFirstName() + " " + usu.getLastName());
    	}
    }

My UserBean:

    package com.papito.bean;
    
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.OneToOne;
    import javax.persistence.Table;

    @Entity
    @Table(name = "users")
    public class UserBean implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private Integer userId;
	private String userName;
	private String firstName;
	private String lastName;
	private String password;
	private UserDetailsBean details;
	
	@Id
	@Column(name = "user_id")
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	
	@Column(name = "username")
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	@Column(name = "firstName")
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	
	@Column(name = "lastName")
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	
	@Column(name = "password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	@OneToOne
	@JoinColumn(name = "user_id")
	public UserDetailsBean getDetails() {
		return details;
	}
	public void setDetails(UserDetailsBean details) {
		this.details = details;
	}
    }

my UserDetailsBean:
    
    package com.papito.bean;
    
    import java.io.Serializable;
    
    import javax.persistence.Column;
    
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Table;
    
    @Entity
    @Table(name = "user_details")
    public class UserDetailsBean implements Serializable {

	private static final long serialVersionUID = 1L;
	private Integer detailId;
	private String birthday;
	private String sex;
	private String country;
	private String email;
	private String phone;
	private String language;
	
	@Id
	@Column(name = "detail_id")
	public Integer getDetailId() {
		return detailId;
	}
	public void setDetailId(Integer detailId) {
		this.detailId = detailId;
	}
	
	@Column(name = "birthday")
	public String getBirthday() {
		return birthday;
	}
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}
	
	@Column(name = "sex")
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@Column(name = "country")
	public String getCountry() {
		return country;
	}
	public void setCountry(String country) {
		this.country = country;
	}
	
	@Column(name = "email")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	@Column(name = "phone")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Column(name = "language")
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
    }

My 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:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">

	<jee:jndi-lookup id="baseDeDatos" jndi-name="java:/jdbc/adrianDS"/>
	
	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="baseDeDatos"/>
		<property name="packagesToScan">
			<value>com.papito.bean</value>
		</property> 
		<property name="hibernateProperties">
			<props>
				<prop key="dialect">org.hibernate.dialect.MySQLDialect</prop>
			</props>
		</property>
	</bean>
	
	<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
		
	<context:component-scan base-package="com.papito.dao"/>
	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory"/>
	</bean>
</beans>

My web.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
    <display-name>TestWeb</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath*:**/*Context.xml</param-value>
	</context-param>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<servlet>
		<servlet-name>start</servlet-name>
		<servlet-class>com.papito.servlet.Start</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>start</servlet-name>
		<url-pattern>/start</url-pattern>
	</servlet-mapping>
    </web-app>

Ok i think that's it.

Im trying to follow the hibernate contextual sessions implementation according to the book Spring in Action: Third Edition, and my code seems to be fairly right, when i start jboss hibernate reports the mapping doing just fine, my db is a datasource configured on jboss AS7 standalone.xml with the correct information.

Here is an example of what the jboss log returns when starting my app:

    14:25:31,421 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) Bound data source [java:/jdbc/adrianDS]
    14:25:31,442 INFO  [org.jboss.as.deployment] (MSC service thread 1-5) Started FileSystemDeploymentService for directory J:\servers\jboss-as-web-7.0.2\standalone\deployments
    14:25:31,455 INFO  [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found TestWebEAR.ear in deployment directory. To trigger deployment create a file called TestWebEAR.ear.dodeploy
    14:25:31,483 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "TestWebEAR.ear"
    14:25:31,507 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "TestWeb.war"
    14:25:36,418 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) added javax.persistence.api dependency to TestWebEAR.ear
    14:25:36,420 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api dependency to TestWeb.war
    14:25:36,712 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) Deployment has its own Persistence Provider class org.hibernate.ejb.HibernatePersistence 
    14:25:36,913 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestWeb]] (MSC service thread 1-1) No Spring WebApplicationInitializer types detected on classpath
    14:25:36,942 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestWeb]] (MSC service thread 1-1) Initializing Spring root WebApplicationContext
    14:25:36,942 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Root WebApplicationContext: initialization started
    14:25:36,999 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Refreshing Root WebApplicationContext: startup date [Tue Feb 07 14:25:36 CST 2012]; root of context hierarchy
    14:25:37,541 INFO  [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] (MSC service thread 1-1) Loading XML bean definitions from "/J:/servers/jboss-as-web-7.0.2/standalone/deployments/TestWebEAR.ear/TestWeb.war/WEB-INF/classes/com/papito/config/ApplicationContext.xml"
    14:25:37,792 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-1) JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
    14:25:37,794 INFO  [org.springframework.context.annotation.ClassPathBeanDefinitionScanner] (MSC service thread 1-1) JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    14:25:37,922 INFO  [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (MSC service thread 1-1) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    14:25:38,012 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Bean 'baseDeDatos' of type [class org.springframework.jndi.JndiObjectFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    14:25:38,014 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Bean 'baseDeDatos' of type [class org.jboss.jca.adapters.jdbc.WrapperDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    14:25:38,109 ERROR [stderr] (MSC service thread 1-1) 75 [MSC service thread 1-1] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
    
    14:25:38,114 ERROR [stderr] (MSC service thread 1-1) 80 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - Hibernate 3.6.9.Final
    
    14:25:38,116 ERROR [stderr] (MSC service thread 1-1) 82 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - hibernate.properties not found
    
    14:25:38,119 ERROR [stderr] (MSC service thread 1-1) 85 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
    
    14:25:38,122 ERROR [stderr] (MSC service thread 1-1) 88 [MSC service thread 1-1] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
    
    14:25:38,210 ERROR [stderr] (MSC service thread 1-1) 176 [MSC service thread 1-1] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.papito.bean.UserBean
    
    14:25:38,238 ERROR [stderr] (MSC service thread 1-1) 204 [MSC service thread 1-1] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.papito.bean.UserBean on table users
    
    14:25:38,275 ERROR [stderr] (MSC service thread 1-1) 241 [MSC service thread 1-1] INFO org.hibernate.cfg.AnnotationBinder - Binding entity from annotated class: com.papito.bean.UserDetailsBean
    
    14:25:38,276 ERROR [stderr] (MSC service thread 1-1) 242 [MSC service thread 1-1] INFO org.hibernate.cfg.annotations.EntityBinder - Bind entity com.papito.bean.UserDetailsBean on table user_details
    
    14:25:38,286 ERROR [stderr] (MSC service thread 1-1) 251 [MSC service thread 1-1] INFO org.hibernate.cfg.Configuration - Hibernate Validator not found: ignoring
    
    14:25:38,305 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-1) Hibernate Validator 4.2.0.Final
    14:25:38,363 INFO  [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] (MSC service thread 1-1) Building new Hibernate SessionFactory
    14:25:38,371 ERROR [stderr] (MSC service thread 1-1) 337 [MSC service thread 1-1] INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
    
    14:25:38,378 ERROR [stderr] (MSC service thread 1-1) 343 [MSC service thread 1-1] INFO org.hibernate.connection.ConnectionProviderFactory - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
    
    14:25:38,620 ERROR [stderr] (MSC service thread 1-1) 586 [MSC service thread 1-1] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
    
    14:25:38,629 ERROR [stderr] (MSC service thread 1-1) 595 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Database ->
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)        name : MySQL
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)     version : 5.5.8
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)       major : 5
    14:25:38,630 ERROR [stderr] (MSC service thread 1-1)       minor : 5
    
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1) 596 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Driver ->
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1)        name : MySQL-AB JDBC Driver
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1)     version : mysql-connector-java-5.1.18 ( Revision: tonci.grgin@oracle.com-20110930151701-jfj14ddfq48ifkfq )
    14:25:38,631 ERROR [stderr] (MSC service thread 1-1)       major : 5
    14:25:38,632 ERROR [stderr] (MSC service thread 1-1)       minor : 1
    
    14:25:38,634 ERROR [stderr] (MSC service thread 1-1) 600 [MSC service thread 1-1] INFO org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
    
    14:25:38,635 ERROR [stderr] (MSC service thread 1-1) 601 [MSC service thread 1-1] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    
    14:25:38,636 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
    
    14:25:38,636 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
    
    14:25:38,636 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
    
    14:25:38,637 ERROR [stderr] (MSC service thread 1-1) 602 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
    
    14:25:38,637 ERROR [stderr] (MSC service thread 1-1) 603 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
    
    14:25:38,637 ERROR [stderr] (MSC service thread 1-1) 603 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
    
    14:25:38,638 ERROR [stderr] (MSC service thread 1-1) 604 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
    
    14:25:38,638 ERROR [stderr] (MSC service thread 1-1) 604 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
    
    14:25:38,639 ERROR [stderr] (MSC service thread 1-1) 605 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
    
    14:25:38,639 ERROR [stderr] (MSC service thread 1-1) 605 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
    
    14:25:38,639 ERROR [stderr] (MSC service thread 1-1) 605 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
    
    14:25:38,640 ERROR [stderr] (MSC service thread 1-1) 606 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
    
    14:25:38,640 ERROR [stderr] (MSC service thread 1-1) 606 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    
    14:25:38,641 ERROR [stderr] (MSC service thread 1-1) 607 [MSC service thread 1-1] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
    
    14:25:38,642 ERROR [stderr] (MSC service thread 1-1) 608 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
    
    14:25:38,643 ERROR [stderr] (MSC service thread 1-1) 609 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
    
    14:25:38,643 ERROR [stderr] (MSC service thread 1-1) 609 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
    
    14:25:38,644 ERROR [stderr] (MSC service thread 1-1) 610 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
    
    14:25:38,647 ERROR [stderr] (MSC service thread 1-1) 613 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
    
    14:25:38,647 ERROR [stderr] (MSC service thread 1-1) 613 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
    
    14:25:38,648 ERROR [stderr] (MSC service thread 1-1) 614 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
    
    14:25:38,648 ERROR [stderr] (MSC service thread 1-1) 614 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
    
    14:25:38,648 ERROR [stderr] (MSC service thread 1-1) 614 [MSC service thread 1-1] INFO org.hibernate.cfg.SettingsFactory - Check Nullability in Core (should be disabled when Bean Validation is on): disabled
    
    14:25:38,660 ERROR [stderr] (MSC service thread 1-1) 626 [MSC service thread 1-1] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
    
    14:25:38,666 ERROR [stderr] (MSC service thread 1-1) 632 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [wrapper_materialized_blob] overrides previous : org.hibernate.type.WrappedMaterializedBlobType@108c3db2
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 632 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [blob] overrides previous : org.hibernate.type.BlobType@6726799a
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 633 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [java.sql.Blob] overrides previous : org.hibernate.type.BlobType@6726799a
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 633 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [materialized_blob] overrides previous : org.hibernate.type.MaterializedBlobType@ef9a25e
    
    14:25:38,667 ERROR [stderr] (MSC service thread 1-1) 633 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [clob] overrides previous : org.hibernate.type.ClobType@2712d100
    
    14:25:38,668 ERROR [stderr] (MSC service thread 1-1) 634 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [java.sql.Clob] overrides previous : org.hibernate.type.ClobType@2712d100
    
    14:25:38,668 ERROR [stderr] (MSC service thread 1-1) 634 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [characters_clob] overrides previous : org.hibernate.type.PrimitiveCharacterArrayClobType@44576b0a
    
    14:25:38,668 ERROR [stderr] (MSC service thread 1-1) 634 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [wrapper_characters_clob] overrides previous : org.hibernate.type.CharacterArrayClobType@47348093
    
    14:25:38,669 ERROR [stderr] (MSC service thread 1-1) 635 [MSC service thread 1-1] INFO org.hibernate.type.BasicTypeRegistry - Type registration [materialized_clob] overrides previous : org.hibernate.type.MaterializedClobType@47e5576a
    
    14:25:38,815 ERROR [stderr] (MSC service thread 1-1) 781 [MSC service thread 1-1] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
    
    14:25:38,817 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (MSC service thread 1-1) Bean 'sessionFactory' of type [class org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
    14:25:38,827 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-1) Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@676b678d: defining beans [baseDeDatos,sessionFactory,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,UsuarioDao,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,jdbcTemplate,transactionManager,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
    14:25:38,873 INFO  [stdout] (MSC service thread 1-1) ******* Setea el constructor y asigna el factory org.hibernate.impl.SessionFactoryImpl@60822515 ********
    
    14:25:38,937 INFO  [org.springframework.orm.hibernate3.HibernateTransactionManager] (MSC service thread 1-1) Using DataSource [org.jboss.jca.adapters.jdbc.WrapperDataSource@24ae7f22] of Hibernate SessionFactory for HibernateTransactionManager
    14:25:38,941 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Root WebApplicationContext: initialization completed in 1998 ms
    14:25:38,997 INFO  [org.jboss.web] (MSC service thread 1-1) registering web context: /TestWeb
    14:25:39,013 INFO  [org.jboss.as] (MSC service thread 1-3) JBoss AS 7.0.2.Final "Arc" started in 10703ms - Started 207 of 266 services (59 services are passive or on-demand)
    14:25:39,066 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "TestWebEAR.ear"

Apparently everything seems ok, right?

When i try to access my /Start servlet to return simple user data, the server returns a 500 error, and this is what the console reports:

    14:25:46,460 INFO  [stdout] (http--127.0.0.1-8080-2) ******* Entra al servlet ********
    
    14:25:46,460 INFO  [stdout] (http--127.0.0.1-8080-2) ******* Setea el idUsuario a 1 ********
    
    14:25:46,461 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TestWeb].[com.papito.servlet.Start]] (http--127.0.0.1-8080-2) Servlet.service() for servlet com.papito.servlet.Start threw exception: java.lang.NullPointerException
    	at com.papito.servlet.Start.doPost(Start.java:40) [classes:]
    	at com.papito.servlet.Start.doGet(Start.java:33) [classes:]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    	at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	[ TRIMMED BY StackOverflow text limit]
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    	at java.lang.Thread.run(Unknown Source) [:1.6.0_24]

Im REALLY stuck here with this simple example, since im just getting familiar with Spring, Hibernate, Annotations and everything else, i may be missing something pretty obvious that im not seeing, any help please would be greatly appreciated!!

Adrian