Guice creation errors
使用mybatis-guice遇到的问题,下面是错误信息,此错误在tomcat启动时时有时无,很是无奈,特求大神帮忙。
信息: Deploying web application directory alading
com.google.inject.
CreationException: Guice creation errors:
1) Error in custom provider,
java.lang.NullPointerException
at org.mybatis.guice.MyBatisModule.bindDataSourceProviderType(MyBatisModule.java:215)
while locating javax.sql.DataSource
for field at org.mybatis.guice.environment.EnvironmentProvider.dataSource(EnvironmentProvider.java:57)
at org.mybatis.guice.environment.EnvironmentProvider.class(EnvironmentProvider.java:32)
while locating org.mybatis.guice.environment.EnvironmentProvider
at org.mybatis.guice.MyBatisModule.internalConfigure(MyBatisModule.java:105)
while locating org.apache.ibatis.mapping.Environment
for parameter 0 at org.mybatis.guice.configuration.ConfigurationProvider.<init>(ConfigurationProvider.java:116)
at org.mybatis.guice.configuration.ConfigurationProvider.class(ConfigurationProvider.java:43)
while locating org.mybatis.guice.configuration.ConfigurationProvider
at org.mybatis.guice.MyBatisModule.internalConfigure(MyBatisModule.java:106)
while locating org.apache.ibatis.session.Configuration
for parameter 0 at org.mybatis.guice.session.SqlSessionFactoryProvider.createNewSqlSessionFactory(SqlSessionFactoryProvider.java:64)
at org.mybatis.guice.session.SqlSessionFactoryProvider.class(SqlSessionFactoryProvider.java:31)
while locating org.mybatis.guice.session.SqlSessionFactoryProvider
at org.mybatis.guice.MyBatisModule.internalConfigure(MyBatisModule.java:107)
while locating org.apache.ibatis.session.SqlSessionFactory
for parameter 0 at org.mybatis.guice.session.SqlSessionManagerProvider.createNewSqlSessionManager(SqlSessionManagerProvider.java:55)
at org.mybatis.guice.session.SqlSessionManagerProvider.class(SqlSessionManagerProvider.java:31)
while locating org.mybatis.guice.session.SqlSessionManagerProvider
at org.mybatis.guice.AbstractMyBatisModule.configure(AbstractMyBatisModule.java:51)
while locating org.apache.ibatis.session.SqlSessionManager
for field at org.mybatis.guice.mappers.MapperProvider.sqlSessionManager(MapperProvider.java:40)
while locating org.mybatis.guice.mappers.MapperProvider
at com.google.inject.util.Providers$3.initialize(Providers.java:101)
at org.mybatis.guice.AbstractMyBatisModule.bindMapper(AbstractMyBatisModule.java:76)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:175)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.chinarewards.alading.listener.