Announcement Announcement Module
Collapse
No announcement yet.
Error in Spring Dm 2.0M6 - when using <task> namespace Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error in Spring Dm 2.0M6 - when using <task> namespace

    Hi,

    I tried using Spring 3 - TaskExecutor and TaskSchedulor with spring Dm 2.0 M6

    I get error when i use the namespace in the xml.

    Code:
      	<task:executor id="taskExecutor" pool-size="2-5" queue-capacity="25"/>
             <task:scheduler id="schedulor"/>
             <task:annotation-driven scheduler="mySchedulor"/>
    When i change the namespace to use specific classes they work fine

    Code:
      <bean id="mySchedulor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler"></bean>
    
      
      <bean class="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor">
             <property name="scheduler" ref="mySchedulor"></property>
      </bean>
    
    
    	<bean id="taskExecutor"
    		class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
    		<property name="corePoolSize" value="2" />
    		<property name="maxPoolSize" value="5" />
    		<property name="queueCapacity" value="25" />
    	</bean>

    Is this a BUG ? the error trace is as follows

    Code:
      
    Caused by: org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.springframework.scheduling.config.TaskNamespaceHandler] for namespace [http://www.springframework.org/schema/task]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ThreadPoolExecutor$AbortPolicy
    	at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:139)
    	at org.springframework.osgi.extender.internal.support.NamespacePlugins$Plugin.resolve(NamespacePlugins.java:82)
    	at org.springframework.osgi.extender.internal.support.NamespacePlugins.doResolve(NamespacePlugins.java:168)
    	at org.springframework.osgi.extender.internal.support.NamespacePlugins.resolve(NamespacePlugins.java:131)
    	at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.springframework.osgi.context.support.TrackingUtil$OsgiServiceHandler.invoke(TrackingUtil.java:123)
    	at $Proxy34.resolve(Unknown Source)
    	at org.springframework.osgi.context.support.DelegatedNamespaceHandlerResolver.resolve(DelegatedNamespaceHandlerResolver.java:56)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1322)
    	at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1317)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:134)
    	at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:91)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:475)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:372)
    	... 21 common frames omitted
    Caused by: java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ThreadPoolExecutor$AbortPolicy
    	at org.springframework.scheduling.config.TaskNamespaceHandler.init(TaskNamespaceHandler.java:31)
    	at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:130)
    	... 36 common frames omitted

    I tried soling this classNotFound edu/emory/mathcs/backport/java/util/concurrent/ThreadPoolExecutor$AbortPolicy

    By adding com.springsource.edu.emory.mathcs.backport-3.1.0.jar in repository/ext folder.

    But still no luck :-(

    I keep getting teh same error .

    Since the error is shown in the class -
    org.springframework.beans.factory.xml.DefaultNames paceHandlerResolver

    I checked the shell console - It(spring-context-bundle) is not able to get this package -edu/emory/mathcs/backport/java/util/concurrent.


    Does it mean that com.springsource.edu.emory.mathcs.backport-3.1.0.jar shoudl be in teh kernel region ?

    Is the kernel region bundle able to see bundle places in usr directory ?

  • #2
    It has nothing to do with dm server, there was an issue with the namespace support depending directly on on the edu.memory.backport stuff, it has been fixed in newer releases of Spring 3.

    Comment


    • #3
      Thanks Marten.

      I was using Spring Dm 2.0M6 which was internally using Spring 3.0RC2.

      So i assume this issue was in that version. Can i assume that this issue is fixed in Spring 3.0 RC3 , and use that for my standalone testing ?

      Comment


      • #4
        That should work, you could also install RC3 into dm server in theory it should work .

        Comment


        • #5
          Originally posted by Marten Deinum View Post
          It has nothing to do with dm server, there was an issue with the namespace support depending directly on on the edu.memory.backport stuff, it has been fixed in newer releases of Spring 3.
          Thanks Marten, you just saved me a couple of hours of digging

          Comment


          • #6
            Originally posted by sudheerk84 View Post
            Thanks Marten.

            I was using Spring Dm 2.0M6 which was internally using Spring 3.0RC2.

            So i assume this issue was in that version. Can i assume that this issue is fixed in Spring 3.0 RC3 , and use that for my standalone testing ?
            RC3 works nicely in dm Server. You can grab one of the latest snapshot builds to try it out.

            Comment

            Working...
            X