Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-69

java.lang.NoSuchMethodException: org.drools.builder.ResourceType.<init>(java.lang.String)

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Rejected
    • Affects Version/s: 5.5.0.Final
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Tested on Windows 7 / Linux Ubuntu. Application is running on Spring Framework 3.0.5.RELEASE, Drools 5.5.0 and commons-logging 1.0.3

    • Steps to Reproduce:
      Hide

      1. Create a Java project
      2. Add dependencies - Spring 3.0.5.RELEASE, Drools 5.4.0/5.5.0.Final, commons-logging 1.0.3
      3. Initialize ApplicationContext

      As an attachment I've placed a project that is already configured to reproduce the issue

      Show
      1. Create a Java project 2. Add dependencies - Spring 3.0.5.RELEASE, Drools 5.4.0/5.5.0.Final, commons-logging 1.0.3 3. Initialize ApplicationContext As an attachment I've placed a project that is already configured to reproduce the issue

      Description

      While running the application, when the Spring container is starting up I'm getting the following exception:

      2013-03-07 00:38:41,907 DEBUG [main] org.springframework.beans.TypeConverterDelegate:197 No String constructor found on type [org.drools.builder.ResourceType]
      java.lang.NoSuchMethodException: org.drools.builder.ResourceType.<init>(java.lang.String)
      at java.lang.Class.getConstructor0(Class.java:2706)
      at java.lang.Class.getConstructor(Class.java:1657)
      at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:191)
      at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:447)
      at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:499)
      at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:493)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1371)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
      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:563)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
      at com.blogspot.justanothercoding.DroolsTest.main(DroolsTest.java:15)
      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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

      The exception can be seen only if the following dependency is placed in the pom.xml

      <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.0.3</version>
      </dependency>

        Gliffy Diagrams

          Attachments

          1. log.txt
            23 kB
          2. Test.zip
            4 kB

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                marcin.grzejszczak Marcin Grzejszczak
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: