Jestem nowy w Mybatis i próbuję zaimplementować mybatis z wiosną, ale otrzymuję poniższy błąd runtime podczas uruchamiania tomcat.jest java.lang.NoClassDefFoundError: org/apache/ibatis/session/SqlSessionFactory z mybatis i wiosną
Oto moja pom.xml
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.0.0</version>
</dependency>
i aplikacja kontekst:
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="uactivityDS"/>
<property name="configLocation" value="classpath:mybatis-config.xml"/>
</bean>
Błąd jest:
the resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/ibatis/session/SqlSessionFactory
Plik mybatis-spring-1.0.0.jar
istnieje w war/web-inf/lib
, choć.
Każdy pomysł, co się dzieje w tym scenariuszu?
Got to rozwiązane poprzez dodanie org.mybatis mybatis 3.0.4 W pom.xml –