]
Vijay Dharap commented on DROOLS-354:
-------------------------------------
To give my scneario details;
1. drools rules kjar project built and installed from D drive. (got installed on C:\ in
M2_REPO) - mvn install
2. java jar project is trying to utilize the installed kjar module for exec:java maven
goal to run a commandline java program.
Following is the error log:
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ yyyy-web ---
[com.xxxx.yyyy.util.ReportCalculator.main()] INFO
org.drools.compiler.kie.builder.impl.ClasspathKieProject - Found kmodule:
jar:file:/C:/Users/vijay_dharap/.m2/repository/com/xxxx/yyyy-rules/0.0.1-SNAPSHOT/yyyy-rules-0.0.1-SNAPSHOT.jar!/META-INF/kmodule.xml
[com.xxxx.yyyy.util.ReportCalculator.main()] ERROR
org.drools.compiler.kie.builder.impl.ClasspathKieProject - Unable to load pom.properties
from/C:/Users/vijay_dharap/.m2/repository/com/xxxx/yyyy-rules/0.0.1-SNAPSHOT/yyyy-rules-0.0.1-SNAPSHOT.jar
as jarPath cannot be found
/Users/vijay_dharap/.m2/repository/com/xxxx/yyyy-rules/0.0.1-SNAPSHOT/yyyy-rules-0.0.1-SNAPSHOT.jar
[com.xxxx.yyyy.util.ReportCalculator.main()] ERROR
org.drools.compiler.kie.builder.impl.ClasspathKieProject - Unable to load pom.properties
from/C:/Users/vijay_dharap/.m2/repository/com/xxxx/yyyy-rules/0.0.1-SNAPSHOT/yyyy-rules-0.0.1-SNAPSHOT.jar
\Users\vijay_dharap\.m2\repository\com\xxxx\yyyy-rules\0.0.1-SNAPSHOT\yyyy-rules-0.0.1-SNAPSHOT.jar
(The system cannot find the path specified)
[com.xxxx.yyyy.util.ReportCalculator.main()] ERROR
org.drools.compiler.kie.builder.impl.ClasspathKieProject - Unable to build index of
kmodule.xml
url=jar:file:/C:/Users/vijay_dharap/.m2/repository/com/xxxx/yyyy-rules/0.0.1-SNAPSHOT/yyyy-rules-0.0.1-SNAPSHOT.jar!/META-INF/kmodule.xml
null
Can't load pom.properties when jar not on default drive on
Windows
------------------------------------------------------------------
Key: DROOLS-354
URL:
https://issues.jboss.org/browse/DROOLS-354
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 6.0.0.Final
Environment: Windows
Reporter: Peter Cooper
Assignee: Mark Proctor
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.