Proxy « DAO « JPA Q&A





1. NullReferenceException in DAO store() method - proxy issues?    forum.hibernate.org

HibernateUtil hibernateUtil = new HibernateUtil(); //creates hibernate session MapperFactory mapperFactory = new MapperFactory(hibernateUtil); UserMapper userMapper = mapperFactory.getUserMapper(); User user= userMapper.findByUserName("aroyer"); user.setLastName("royer2"); if (user.mapper == null) System.out.println("MAPPER IS NOT NULL); ...