`
hxy52088
  • 浏览: 10132 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

怪问题啊,请高手解决

阅读更多
我用的是tomcat5.X,jdk5.0,spring2.5,cxf2.3,用dbcp时没问题,但是换bonecp连接池就报如下错误:
[2010-12-28 11:05:18250] [WARN ] [org.springframework.beans.factory.support.DisposableBeanAdapter:214] - Invocation of destroy method 'shutdown' failed on bean with name 'cxf'
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.jolbox.bonecp.BoneCPDataSource] for bean with name 'dataSource' defined in class path resource [applicationContext-common.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class file
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:222)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:303)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
at org.apache.cxf.bus.spring.SpringBeanLocator.getBeansOfType(SpringBeanLocator.java:59)
at org.apache.cxf.bus.CXFBusImpl.getExtension(CXFBusImpl.java:99)
at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:185)
at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:208)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:165)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:487)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:462)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:430)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:388)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
... 46 more
[2010-12-28 11:05:18265] [ERROR] [org.springframework.web.context.ContextLoader:215] - Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.jolbox.bonecp.BoneCPDataSource] for bean with name 'dataSource' defined in class path resource [applicationContext-common.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class file
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
... 33 more
[2010-12-28 11:05:18265] [ERROR] [org.apache.catalina.core.StandardContext:3768] - Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.jolbox.bonecp.BoneCPDataSource] for bean with name 'dataSource' defined in class path resource [applicationContext-common.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: Bad version number in .class file
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1144)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
... 33 more
2010-12-28 11:05:18 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2010-12-28 11:05:18 org.apache.catalina.core.StandardContext start
严重: Context [/OPRS] startup failed due to previous errors
2010-12-28 11:05:19 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2010-12-28 11:05:19 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2010-12-28 11:05:19 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2010-12-28 11:05:19 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2010-12-28 11:05:19 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/47  config=null
2010-12-28 11:05:19 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2010-12-28 11:05:19 org.apache.catalina.startup.Catalina start
信息: Server startup in 8000 ms
分享到:
评论
1 楼 smesoft 2011-12-22  
我的也是这样的问题,更换了jar包。bonecp-0.6.7.2.jar没有问题。
用这个包 bonecp-0.7.1.RELEASE.jar就有问题。不知道为啥。
<!-- 数据源配置,使用BoneCP数据库连接池 -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy">
<property name="targetDataSource">
<ref local="bonecpDataSource"/>
</property>
</bean>

<bean id="bonecpDataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/dbname" />
<property name="username" value="root" />
<property name="password" value="" />
<property name="idleConnectionTestPeriod" value="60" />
<property name="idleMaxAge" value="240" />
<property name="maxConnectionsPerPartition" value="30" />
<property name="minConnectionsPerPartition" value="10" />
<property name="partitionCount" value="3" />
<property name="acquireIncrement" value="5" />
<property name="statementsCacheSize" value="100" />
<property name="releaseHelperThreads" value="3" />
</bean>

相关推荐

    asp中点击下一步提交有问题,请高手解决

    asp中点击下一步提交有问题,请高手解决

    模拟实现用位图法管理文件存储空间的分配与回收,运行结果有问题,请高手解决!

    运行结果有问题,请高手解决!

    11堂极简系统思维课:怎样成为解决问题的高手.pdf

    系统思维的重要性在于,它可以帮助我们更好地解决问题。例如,在一个自然保护区中,老虎、鹿和草地之间存在着复杂的关系。老虎太多,鹿就会大幅度减少,而鹿大量繁殖,草地又受不了。系统思维可以帮助我们厘清这些...

    菜鸟TO高手 帮助解决个人电脑问题

    【标题】"菜鸟TO高手 帮助解决个人电脑问题" 涵盖了一系列的初级到进阶的电脑使用技巧和故障排除方法,旨在帮助电脑新手独立解决日常遇到的问题,提高自我解决计算机问题的能力。 【描述】"电脑不求人"强调了这个...

    求高手帮忙解决下问题,谢谢

    标题"求高手帮忙解决下问题,谢谢"表明了用户可能遇到了宏无法正常运行的困境,他们正在寻求专业帮助来解决这个问题。这可能涉及到宏错误、兼容性问题、安全设置或者VBA代码的语法错误等。 描述中的"宏计算,无法...

    高手支招解决新补丁引发Windows 7黑屏问题.docx

    标题中的“高手支招解决新补丁引发Windows 7黑屏问题”指的是Windows 7操作系统在安装了某个新更新补丁后出现了显示异常,即黑屏的问题。这可能是由于更新与系统之间的兼容性问题或者补丁本身的问题导致的。描述中...

    高手教你解决无线路由器自动掉线问题.pdf

    解决无线路由器自动掉线问题 在今天的数字时代,,无线路由器已经成为我们生活中不可或缺的一部分。然而,有时我们会遇到无线路由器自动掉线的问题,这对我们的工作和生活造成了很大的影响。那么,今天我们就来讨论...

    跨平台高手必修课-Flutter动态化解决方案实战

    跨平台高手必修课--Flutter动态化解决方案实战之手把手带你自研一套Flutter动态热更新框架。 Flutter作为跨平台首选框架,未来可期,但动态化问题一直是行业诟病的问题。所以,各大公司都急需一套成熟且高效的动态...

    计算机各种问题解决 日常电脑问题 详尽解决

    "计算机各种问题解决 日常电脑问题 详尽解决"这个资源旨在帮助用户从初学者到高手的转变,提供一系列针对日常电脑问题的解决方案。 首先,让我们了解一下电脑问题的常见类别。这些问题大致可以分为系统故障、软件...

    解决电脑故障大全,全方位解决电脑常见问题必备

    在电脑使用过程中,遇到各种故障是常有的事,无论你是新手还是老手,都...这个"菜鸟TO高手"压缩包将是你成为电脑故障解决专家的宝贵资源,通过学习和实践,你将能够从容应对各种电脑问题,从而提升自己的电脑使用体验。

    问题请教高手

    问题请教高手问题请教高手

    Scratch高手密码:编程思维改变未来应对人工智能挑战.pptx

    本书《Scratch高手密码:编程思维改变未来应对人工智能挑战》是一本关于编程思维和挑战的书籍,旨在帮助读者掌握Scratch编程语言,并运用编程思维解决问题。本书首先介绍了Scratch编程语言的基础知识,包括Scratch的...

    java java核心问题 java高手必懂

    java java核心问题 java高手必懂 java java核心问题 java高手必懂 java java核心问题 java高手必懂

    DOS高手速成 DOS高手速成

    DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成DOS高手速成...

    高手教你解决win7开机画面异常问题.docx

    本文将教你如何通过简单的步骤来解决这个问题。 首先,当你的Win7开机画面出现异常时,不要惊慌。解决这个问题的第一步是在已经成功登录到桌面的情况下进行。点击屏幕左下角的“Windows”图标,然后从弹出的菜单中...

    XP一键共享 1.2完美解决局域网上工作组模式的互访问题

    XP一键共享 1.2完美解决局域网上工作组模式的互访问题 软件分类:网络软件 / 浏览辅助 软件类别:国产软件 软件授权:免费版 软件语言:简体中文 应用平台:WinXp, Win2003, Win2000, WinVista, Win9x 完美解决...

    高手教你如何解决交换机和路由器不通故障.pdf

    这篇文章将教您如何解决交换机和路由器不通故障的问题,并详细介绍解决问题的步骤。 解决交换机和路由器不通故障需要我们具备一定的网络知识和分析能力。只有通过仔细的分析和排除,我们才能找到问题的根源并解决...

    金山重装高手暂不支持解决方法.docx

    总之,解决金山重装高手“暂不支持重装系统”或“多系统用户不支持重装”的问题,用户需要检查自己的系统版本、MBR信息以及硬盘分区状态。如果以上方法都无法解决问题,建议联系金山公司的技术支持获取更具体的解决...

    如何成为伟大的软件开发高手?

    综上所述,成为一个伟大的软件开发高手需要深厚的技术功底、清晰的问题理解和分析能力、高效的时间管理技巧、出色的编码质量、对代码和解决方案的自信、强烈的客户需求意识、持续的学习动力和架构设计思维。...

Global site tag (gtag.js) - Google Analytics