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

Kie-spring read resources on EAP not working

    XMLWordPrintable

Details

    • NEW
    • NEW

    Description

      had to touch little bit the Kie-Spring to get the resources correctly. This is the only class I had to touch:

      https://gist.github.com/dvirgiln/0f65d184c2004127b1db#file-gistfile1-txt-L90-L95

      getClass().getResource("/") is failing on EAP, it returns null

      This code needs to get the path of the kie-spring.jar. This is the only way I found to get the containing jar path.

      This code is working. Maybe you know another way.

      ClassLoader cl = getClass().getClassLoader();
      URL url = getClass().getProtectionDomain().getCodeSource().getLocation();
      configFilePath = url.getPath();
      if (configFilePath.endsWith("!/"))

      { configFilePath = configFilePath.substring(0, configFilePath.length() - 2); }

      Attachments

        Issue Links

          Activity

            People

              psiroky_jira Petr Široký (Inactive)
              virchete_jira David virgil naranjo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: