3 Replies Latest reply on Mar 27, 2013 10:57 AM by Fred DERNBACH

    No String constructor found on type [org.drools.builder.ResourceType]

    Ashok Kuppuswamy Newbie

      I am trying to integrate with spring and I am stuck on this error

       

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Adding [systemProperties] PropertySource with lowest search precedence

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Adding [systemEnvironment] PropertySource with lowest search precedence

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Initializing new StandardEnvironment

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Adding [systemProperties] PropertySource with lowest search precedence

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Adding [systemEnvironment] PropertySource with lowest search precedence

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Initializing new StandardEnvironment

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Adding [systemProperties] PropertySource with lowest search precedence

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Adding [systemEnvironment] PropertySource with lowest search precedence

      2012-12-05 04:43:45 [main] DEBUG org.springframework.core.env.StandardEnvironment  - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]

      2012-12-05 04:43:45 [main] DEBUG org.springframework.beans.BeanUtils  - No property editor [org.drools.builder.ResourceTypeEditor] found for type org.drools.builder.ResourceType according to 'Editor' suffix convention

      2012-12-05 04:43:45 [main] DEBUG org.springframework.beans.TypeConverterDelegate  - 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:197)

                at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470)

                at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)

                at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510)

       

       

      This is the config I have

       

      <jbpm:kbase id="kbase">

          <jbpm:resources>

            <jbpm:resource type="BPMN2" source="classpath:Evaluation.bpmn"/>

          </jbpm:resources>

        </jbpm:kbase>

       

      Any help is greatly appreciated.

        • 1. Re: No String constructor found on type [org.drools.builder.ResourceType]
          Maciej Swiderski Master

          what version of drools-spring do you use? Here you can find simple (not yet finished) spring example and it seems to work fine (CR1 thou).

           

          HTH

          • 2. Re: No String constructor found on type [org.drools.builder.ResourceType]
            Fred DERNBACH Newbie

            Hello,

             

            I have exactly the same error.

             

            I have integrated jbpm 5.4.0.Final in my application and started to run very simple process. As soon as I created a new Gateway (my first one). it gets impossible forme to deploy my war application.

             

            I'm using 5.5.0.Final of drools-spring.

             

            I have extracted drools-spring-1.7.0.xsd Schema Definition file so I can point to it with xml code as follows:

            <beans xmlns="http://www.springframework.org/schema/beans"

                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                   xmlns:jbpm="http://drools.org/schema/drools-spring"

                   xsi:schemaLocation="http://www.springframework.org/schema/beans

                                       http://www.springframework.org/schema/beans/spring-beans-3.2.xsd

                                       http://drools.org/schema/drools-spring

                                       classpath:drools-spring-1.7.0.xsd">   

                <!-- JPBM Entity Manager Factory -->

                <bean id="jbpmEMF" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

                    <property name="persistenceUnitName" value="org.jbpm.persistence.jta"/>

                </bean>

             

            .../...

            </beans>

             

            Still I get the exception, whever my unique process includes a Gateway:

            DEBUG 351014[RMICallHandler-6](TypeConverterDelegate.java:226) - 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(Unknown Source)

                at java.lang.Class.getConstructor(Unknown Source)

                at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:220)

                at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:450)

                at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:496)

                at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:490)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1437)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:271)

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)

                at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1391)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:589)

                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

                at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)

                at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

                at java.lang.reflect.Constructor.newInstance(Unknown Source)

                at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)

                at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121)

                at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:280)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1049)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)

                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

                at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607)

                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

                at org.springframework.context.access.ContextSingletonBeanFactoryLocator.initializeDefinition(ContextSingletonBeanFactoryLocator.java:143)

                at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:381)

                at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.getBeanFactoryReference(SpringBeanAutowiringInterceptor.java:156)

                at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.getBeanFactory(SpringBeanAutowiringInterceptor.java:137)

                at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.doAutowireBean(SpringBeanAutowiringInterceptor.java:117)

                at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(SpringBeanAutowiringInterceptor.java:97)

                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 com.evermind.server.ejb.interceptor.MethodBasedInterceptor.invoke(MethodBasedInterceptor.java:47)

                at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)

                at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)

                at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)

                at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)

                at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)

                at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)

                at com.evermind.server.ejb.LifecycleManager.invokeLifecycleMethod(LifecycleManager.java:262)

                at com.evermind.server.ejb.LifecycleManager.invokeLifecycleMethod(LifecycleManager.java:252)

                at com.evermind.server.ejb.LifecycleManager.postConstruct(LifecycleManager.java:113)

                at com.evermind.server.ejb.StatelessSessionBeanPool.createContextImpl(StatelessSessionBeanPool.java:40)

                at com.evermind.server.ejb.BeanPool.createContext(BeanPool.java:418)

                at com.evermind.server.ejb.BeanPool.allocateContext(BeanPool.java:244)

                at com.evermind.server.ejb.StatelessSessionEJBHome.getContextInstance(StatelessSessionEJBHome.java:25)

                at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)

                at SiteService_RemoteProxy_67ad7no.getOpcoSites(Unknown Source)

                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.remoting.rmi.RmiClientInterceptorUtils.invokeRemoteMethod(RmiClientInterceptorUtils.java:111)

                at org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:99)

                at org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invokeInContext(AbstractRemoteSlsbInvokerInterceptor.java:141)

                at org.springframework.ejb.access.AbstractSlsbInvokerInterceptor.invoke(AbstractSlsbInvokerInterceptor.java:189)

                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)