`
xgbjmxn
  • 浏览: 266754 次
  • 性别: Icon_minigender_1
  • 来自: 新乡
社区版块
存档分类
最新评论

在spring osgi中取得datasource时出现问题

    博客分类:
  • osgi
阅读更多
在spring osgi中取得datasource时出现问题
2011-11-2

java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/osgidb
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:165)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:128)
at com.javaworld.sample.osgi.spring.contact.impl.ContactDAOImpl.getContactList(ContactDAOImpl.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy3.getContactList(Unknown Source)
at com.javaworld.osgi.spring.HelloWorld.start(HelloWorld.java:14)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
at java.lang.Thread.run(Unknown Source)
分享到:
评论

相关推荐

    spring osgi相关资源

    Spring OSGi是Spring框架与OSGi(Open Service Gateway Initiative)规范相结合的一种技术,它允许在OSGi容器中运行和管理Spring应用。OSGi是一种模块化系统,为Java应用程序提供了动态部署、版本控制和依赖管理的...

    spring osgi 中文

    - Spring中的核心模块化单元是applicationcontext,它包含了多个由Spring管理的对象(beans)。applicationcontexts可以分级配置,子applicationcontext可以看到其父级定义的beans。 - 在一个激活的bundle中可以包含...

    Spring OSGI 快速入门中文教程

    Spring OSGi是Spring框架与OSGi服务的结合,使得在OSGi环境中使用Spring变得简单。本教程将帮助初学者快速理解并掌握Spring OSGi的基础概念和应用。 **1. OSGi基本概念** - **模块化系统**:OSGi的核心是模块化,每...

    在Eclipse RCP中应用Spring OSGI 管理bean(一)

    标题中的“在Eclipse RCP中应用Spring OSGI 管理bean(一)”表明这是一篇关于如何在Eclipse Rich Client Platform (RCP)应用程序中集成Spring框架,并利用OSGi服务来管理Bean的教程。Eclipse RCP是一个用于构建桌面...

    spring-osgi-1.2.0-rc1-with-dependencies.zip

    开发者在使用Spring OSGi时,需要了解如何编写OSGi兼容的jar包,以及如何在Spring配置文件中声明和管理OSGi服务。此外,调试和测试OSGi环境下的应用程序也是一项挑战,因为它们涉及到复杂的生命周期管理和依赖关系...

    spring-osgi-1.2.1.rar

    Spring OSGi是Spring框架与OSGi(Open Service Gateway Initiative)规范相结合的产物,它允许在OSGi容器中使用和管理Spring应用。OSGi是一种Java模块化系统,它提供了动态部署、版本控制和依赖管理等功能,极大地...

    OSGISpring OSGISpring

    10. **实战应用**:学习如何在实际项目中应用OSGISpring,如构建分布式系统、微服务架构等,了解如何解决实际遇到的问题。 为了深入了解OSGI与Spring的整合,阅读"OSGI入门和整合Spring.pdf"文档将是十分有价值的。...

    spring-osgi.jar及其依赖包

    Spring OSGi是Spring框架与OSGi(Open Service Gateway Initiative)规范集成的产物,它使得在OSGi环境中使用Spring变得更加方便。OSGi是一种模块化系统,用于Java应用程序,提供了动态服务发现、版本控制和依赖管理...

    Spring OSGi 入门.rar

    Spring OSGi 是一个将流行的Spring框架与OSGi(Open Service Gateway Initiative)规范结合的开源项目,它允许开发者在OSGi环境中充分利用Spring的功能。OSGi是一种模块化系统,旨在创建可伸缩、灵活且可维护的Java...

    spring-osgi-1.2.1-with-dependencies

    而Spring OSGi则是Spring框架与OSGi(Open Service Gateway Initiative)规范的结合,它为Spring应用提供了在OSGi容器中运行的能力。本文将围绕“spring-osgi-1.2.1-with-dependencies”这一完整包展开,详细解析其...

    spring-osgi-1.2.0.zip

    在实际开发中,Spring OSGi使得开发者能够利用OSGi的动态性,例如,可以在运行时安装、卸载、更新和启动Spring服务,而无需重启整个应用程序。此外,OSGi的模块化特性有助于减少类路径冲突,并使应用更加可维护和可...

    Eclipse RCP与Spring OSGi技术详解与最佳实践

    《Eclipse RCP与Spring OSGi:技术详解与最佳实践》由资源的Eclipse专家亲自执笔,并得到了Eclipse官方技术社区的强烈推荐,权威性毋庸置疑!内容全面,系统讲解了利用Eclipse RCP和Spring OSGi开发大规模Java应用的...

    osgi spring实例

    OSGi(Open Services Gateway Initiative)和Spring是两个在Java开发中广泛应用的技术框架。OSGi是一种模块化系统,它允许开发者创建可热插拔的模块,称为"bundles",以实现更灵活、可维护的软件架构。Spring则是一...

    Spring OSGi 入门.pdf

    总结,Spring OSGi 为开发者提供了一种强大的工具,可以在模块化、动态的环境中构建和管理 Java 应用。通过理解 OSGi 的核心概念和 Spring OSGi 的集成方式,我们可以创建更灵活、更易于维护的软件系统。

    spring osgi 规范 中文版

    Spring中的核心模块化单元是应用上下文(Application Context),管理一系列bean。应用上下文可以有层次结构,子上下文可以访问父上下文的bean,但反之则不行。 Spring OSGi将bundle与应用上下文关联起来:每个激活...

    Spring与OSGI整合 计算器例子(转) +附整合代码和spring-osgi核心jar

    标题中的“Spring与OSGI整合 计算器例子(转) +附整合代码和spring-osgi核心jar”表明我们将探讨如何将Spring框架与OSGi(Open Services Gateway Initiative)模块化系统进行集成,并通过一个计算器的例子来说明这个...

    spring osgi 入门

    Spring Dynamic Modules (Spring DM) 是Spring Framework的一个扩展项目,它使得Spring可以在OSGi环境中运行,进而为开发者提供了模块化的应用程序开发能力。通过将Spring与OSGi相结合,开发者能够享受到以下优势: ...

Global site tag (gtag.js) - Google Analytics