Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-3762

Spring XD Dynamic Module ClassLoader Issue

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: To Do
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Labels:
      None
    • Story Points:
      1
    • Rank (Obsolete):
      9223372036854775807

      Description

      According to the documentation we can load jars dynamically at module creation time by exploiting the attribute module.classloader in the .properties file :

      http://docs.spring.io/spring-xd/docs/1.3.1.RELEASE/reference/html/#module-class-loading

      I spent two days trying to test this feature. It does not work. The option module.classloader seems to be simply ignored

      I did not find any string named module.classloader in the XD code. But I found another one called module.classpath in this class:

      https://github.com/spring-projects/spring-xd/blob/master/spring-xd-module/src/main/java/org/springframework/xd/module/options/ModuleUtils.java

      The code in the above class seems to match the documentation. But unfortunalletely it does not work too. My classes are not found and I get java.lang.ClassNotFoundException

      I have module option named dir4jars where I put the jars to load at creation time (when I issue job create --name xx --defintion ..). It's a directory, and I have tested the following possibilities, with both module.classpath and module.classloader :

      module.classpath=${dir4jars}/*.jar
      module.classloader=${dir4jars}/*.jar
      .
      .
      job create --name jobName --definition "myJobModuleName --dir4jars=C:/ELS/Flash/libxd" --deploy
      
      and
      
      job create --name jobName --definition "myJobModuleName --dir4jars=file:C:/ELS/Flash/libxd" --deploy 
      
      

      I need the dir4jars to be absolute and outside XD home.

      What's the right option to use for this dynamic load? module.classpath or module.classloader ? Is't a bug in the documentation ?

      How can I set an absolute directory as I mentioned above?

      Many thanks.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Fado Issam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: