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

Can't load pom.properties when jar not on default drive on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.2.0.CR1
    • 6.0.0.Final
    • None
    • Hide

      1) Use a Windows system with at least two drive letters defined.
      2) Change current directory to be on one of the drives, with a java application using Drools on the other drive.
      3) Run java using a classpath that points to the jars on the other drive.
      4) Drools can't find the jar file on the other drive to read its pom.properties file.

      Show
      1) Use a Windows system with at least two drive letters defined. 2) Change current directory to be on one of the drives, with a java application using Drools on the other drive. 3) Run java using a classpath that points to the jars on the other drive. 4) Drools can't find the jar file on the other drive to read its pom.properties file.

      I'm using Apache Tomcat to run my web application, which includes Drools 6.0.0.Final and getting rules files out of the classpath. However, the webapps directory (the appBase in Tomcat's server.xml) is on a different drive than the main Tomcat installation. When Drools is trying to get its pom properties (ClasspathKieProject's getPomProperties method, starting on line 167) it looks like it first strips off the Windows drive letter. It then tries to find the path, but on the drive of the Windows current directory (in this case, the drive where Tomcat is installed) instead of the drive where the file actually is. This means that it can't find the jar file, so I get the "Unable to load pom.properties" "as jarPath cannot be found" error. I'm not sure why it's trying to strip off the drive letter, since I think it would be able to find the file correctly if that weren't the case.

      Thank you.

              mfusco@redhat.com Mario Fusco
              petercooperjr-efi Peter Cooper (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: