I'm new to MyBatis.
Ive been trying to configure mybatis in a webservice I'm writing but with no luck yet.
What I've done already is,
- UserInfoMapper interface
- UserInfoMapper.xml with mapper namespace with my UserInfoMapper interface and a select
- mybatis-config.xml with typeAlias to use as result type in UserInfoMapper.xml
- dataSource bean for oracle (I get connected) in datasourceContext.xml
- org.mybatis.spring.mapper.MapperScannerConfigurer bean with basePackage pointing to my UserInfoMapper interface in datasourceContext.xml
- sqlSessionFactory bean ie. org.mybatis.spring.SqlSessionFactoryBean with property for my dataSource and configLocation
- userInfoMapper bean ie. org.mybatis.spring.mapper.MapperFactoryBean with property mapperInterface (value="is.simnn.act.web.ngs.persistence.UserInfoMapper") and sqlSessionFactory property (ref="sqlSessionFactory") in datasourceContext.xml
- then in my applicationContext.xml I have following,
<import resource="classpath:META-INF/wsContext.xml" />
<import resource="classpath:META-INF/db/datasourceContext.xml" />
In my test case I keep getting NullPointerException when I call jaxws:endpoint and it leads me to my UserInfoMapper interface.
Any idea or hints to what might be wrong with my config?
Thanks, Gunnlaugur