[
https://issues.jboss.org/browse/JBRULES-3243?page=com.atlassian.jira.plug...
]
Edson Tirelli resolved JBRULES-3243.
------------------------------------
Fix Version/s: 5.3.0.Final
Resolution: Won't Fix
Richard,
Thank you for reporting this. There are 2 parts to the problem reported here:
1. Your test case is wrong because it is only serializing one package, making your kbase
inconsistent. Your test should serialize all packages and not only one of them:
{code:title=snipped.java}
//...
Package[] pkgs = pkgBuilder.getPackages();
for( int i = 0; i < pkgs.length; i ++ ) {
File pkgF = new File("/tmp/my.pkg"+i);
FileOutputStream out = new FileOutputStream(pkgF);
try {
DroolsStreamUtils.streamOut(out, pkgs[i]);
} finally {
out.close();
}
}
//...
for( int i = 0; i < pkgs.length; i ++ ) {
File pkgFile = new File("/tmp/my.pkg"+i);
builder.add(ResourceFactory.newFileResource(pkgFile), ResourceType.PKG);
}
//...
{code}
2. The second part is Drools should be providing a proper error message for that, but at
the moment Drools has no concept of dependency management. We plan to implement this in
the future, and when that is done, then Drools will be able to detect that you are missing
a package, but at the moment it is just impossible to do so.
I will close this ticket and we will take care of part 2 when we add dependency
management.
NullPointerException ReteooFactHandleFactory.java:56 when using Event
from another package
------------------------------------------------------------------------------------------
Key: JBRULES-3243
URL:
https://issues.jboss.org/browse/JBRULES-3243
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.3.0.CR1, 5.3.0.Final
Environment: Ubuntu, JDK 2.6.0.26
Reporter: Richard Ambridge
Assignee: Edson Tirelli
Fix For: 5.3.0.Final
Attachments: files.tar
If an item is declared @role (event) and the package name for that item is not the same
as the package name of the rules, a Null pointer is thrown.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira