Mule 3.3.0 NoSuchMethodException javax.sql.DataSource

时间:2012-07-12 20:51:59

标签: mule

我有一个基于maven的mule项目,它原创于mule版本3.2.1。当我更新我的pom.xml以将mule.version3.2.1更改为3.3.0时,运行我的应用时出现以下异常。

我通过启动`org.mule.MuleServer -config src / main / app / mule-config.xml'在Eclipse中运行应用程序

这与3.2.1一起工作正常。如果我编辑我的pom.xml并将mule.version更改回3.2.1它继续正常运行。但是,我真的需要一些包含在3.3.0中的错误修复。

有什么想法吗?

[07-12 16:36:01] ERROR MuleServer [main]: 
********************************************************************************
Message               : could not find constructor on class: interface javax.sql.DataSource, with matching arg params: 
Type                  : org.mule.api.lifecycle.InitialisationException
Code                  : MULE_ERROR-71999
JavaDoc               : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/InitialisationException.html
Object                : org.mule.config.bootstrap.SimpleRegistryBootstrap@12133926
********************************************************************************
Exception stack is:
1. could not find constructor on class: interface javax.sql.DataSource, with matching arg params:  (java.lang.NoSuchMethodException)
  org.mule.util.ClassUtils:408 (null)
2. could not find constructor on class: interface javax.sql.DataSource, with matching arg params:  (org.mule.api.lifecycle.InitialisationException)
  org.mule.config.bootstrap.SimpleRegistryBootstrap:169 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/lifecycle/InitialisationException.html)
********************************************************************************
Root Exception stack trace:
java.lang.NoSuchMethodException: could not find constructor on class: interface javax.sql.DataSource, with matching arg params: 
    at org.mule.util.ClassUtils.instanciateClass(ClassUtils.java:408)
    at org.mule.util.ClassUtils.instanciateClass(ClassUtils.java:447)
    at org.mule.util.ClassUtils.instanciateClass(ClassUtils.java:419)
    at org.mule.config.bootstrap.SimpleRegistryBootstrap.registerObject(SimpleRegistryBootstrap.java:325)
    at org.mule.config.bootstrap.SimpleRegistryBootstrap.registerObjects(SimpleRegistryBootstrap.java:292)
    at org.mule.config.bootstrap.SimpleRegistryBootstrap.initialise(SimpleRegistryBootstrap.java:165)
    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:597)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:89)
    at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:109)
    at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:116)
    at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:73)
    at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
    at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
    at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:101)
    at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:57)
    at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:46)
    at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
    at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:80)
    at org.mule.MuleServer.initialize(MuleServer.java:375)
    at org.mule.MuleServer.run(MuleServer.java:284)
    at org.mule.MuleServer.start(MuleServer.java:271)
    at org.mule.MuleServer.main(MuleServer.java:142)

********************************************************************************

[07-12 16:36:01] ERROR MuleServer [main]: 
********************************************************************************
* A Fatal error has occurred while the server was running:                     *
* could not find constructor on class: interface javax.sql.DataSource, with    *
* matching arg params:  (java.lang.NoSuchMethodException)                      *
*                                                                              *
* The error is fatal, the system will shutdown                                 *
********************************************************************************

1 个答案:

答案 0 :(得分:1)

确保类路径上的所有Mule工件都是3.3.0版。看来你的版本不匹配,因为mule-core-3.3.0.jar中的SimpleRegistryBootstrap第169行被注释掉了。