Deployment of bundle fails due to issue in mybatis-spring-1.0.0.jar in Vergo server
Hi Experts,
I'm using Virgo as my OSGi conatiner, one of my bundle has a dependency with the mybatis-spring-1.0.0.jar file. I've copied the mybatis-spring-1.0.0.jar file to repository/usr and deployed the bundle. But whenever I try to access the bundle API I'm getting the below error.
org.springframework.beans.factory.CannotLoadBeanCl assException: Cannot find class [org.mybatis.spring.SqlSessionFactoryBean] for bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/scdform-servlet.xml]; nested exception is java.lang.ClassNotFoundException: org.mybatis.spring.SqlSessionFactoryBean
Below is my springcontext configuration file.
---------------------------------
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@cihcissdb484.corporate.ge .com:1662:scd1"/>
<property name="username" value="sandjavadba01"/>
<property name="password" value="o1ympic"/>
</bean>
<!-- Mybatis configuration -->
<bean class="org.mybatis.spring.SqlSessionFactoryBean" id="sqlSessionFactory">
<property name="dataSource" ref="dataSource"/>
</bean>
----------------------------
The jar file is there in the user folder, but still I'm getting class not found exception.
Also I tried to deploy the mybatis-spring-1.0.0.jar file using Virgo Admin UI, then I'm getting the below error in the virgo console.
----------------------------------------------
[2011-07-19 16:53:26.729] http-8080-3 <DE0000I> Installing bundle 'org.mybatis.mybatis-spring' version '1.0.0'.
[2011-07-19 16:53:27.852] http-8080-3 <ME0003I> Dump 'serviceability\dump\2011-07-19-16-53-826' generated
[2011-07-19 16:53:27.868] http-8080-3 <DE0002E> Installation of bundle 'org.mybatis.mybatis-spring' version '1.0.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSa tisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'org.mybatis.mybatis-spring' at version '1.0.0': Cannot resolve: org.mybatis.mybatis-spring
Resolver report:
Uses violation: <Import-Package: org.springframework.jdbc.datasource; version="0.0.0"> in bundle <org.mybatis.mybatis-spring_1.0.0>
Resolver reported uses conflict for import
at org.eclipse.virgo.kernel.install.pipeline.stage.re solve.internal.QuasiResolveStage.process(QuasiReso lveStage.java:45)
at org.eclipse.virgo.kernel.install.pipeline.internal .StandardPipeline.doProcessTree(StandardPipeline.j ava:62)
at org.eclipse.virgo.kernel.install.pipeline.internal .CompensatingPipeline.doProcessTree(CompensatingPi peline.java:72)
at org.eclipse.virgo.kernel.install.pipeline.stage.Ab stractPipelineStage.process(AbstractPipelineStage. java:41)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
at org.springframework.osgi.service.importer.support. LocalBundleContextAdvice.invoke(LocalBundleContext Advice.java:59)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.doProceed(DelegatingIntroductionIn terceptor.java:131)
at org.springframework.aop.support.DelegatingIntroduc tionInterceptor.invoke(DelegatingIntroductionInter ceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:563)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase.java:563)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.eclipse.virgo.web.tomcat.ApplicationNameTracki ngValve.invoke(ApplicationNameTrackingValve.java:2 9)
at org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:555)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
[2011-07-19 16:53:27.874] http-8080-3 <DE0003E> Install failed for bundle 'org.mybatis.mybatis-spring' version '1.0.0'.
[2011-07-19 16:53:27.879] http-8080-3 <DE0500E> Unable to install application from URI 'file:/C:/virgo-web-server-2.1.0.RELEASE/work/org.eclipse.virgo.region.user_0.0.0/upload/mybatis-spring-1.0.0.jar'. Cannot satisfy constraints for bundle 'org.mybatis.mybatis-spring' version '1.0.0'. Cannot resolve: org.mybatis.mybatis-spring
Resolver report:
Uses violation: <Import-Package: org.springframework.jdbc.datasource; version="0.0.0"> in bundle <org.mybatis.mybatis-spring_1.0.0>
Resolver reported uses conflict for import
. org.eclipse.virgo.kernel.osgi.framework.UnableToSa tisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'org.mybatis.mybatis-spring' at version '1.0.0': Cannot resolve: org.mybatis.mybatis-spring
Resolver report:
Uses violation: <Import-Package: org.springframework.jdbc.datasource; version="0.0.0"> in bundle <org.mybatis.mybatis-spring_1.0.0>
Resolver reported uses conflict for import
-----------------------------------------------
Any help would be appreciated.
Thanks,
Sunil