[rules-users] FileNotFoundException for drl file in classpath

PAYET, Manuel manuel.payet at capgemini.com
Fri May 28 03:47:06 EDT 2010


If it's in the package com.abc.xyz, so you have to use:
ResourceFactory.newClassPathResource("/com/abc/xyz/keyRykes.drl") 
Or 
ResourceFactory.newClassPathResource("com/abc/xyz/keyRykes.drl")
I don't remember, it's one of those :p

-----Message d'origine-----
De : rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] De la part de bcarlson
Envoyé : vendredi 28 mai 2010 06:13
À : rules-users at lists.jboss.org
Objet : [rules-users] FileNotFoundException for drl file in classpath


Hello, 

I'm relatively new to drools, and although I've gotten my first app working from the command line, I am not incorporating it into a web app, and having a heck of a time getting the drl file found!

Long story short, the drl file is in the package: com.abc.xyz 

I'm trying to load it with the following:

kbuilder.add(ResourceFactory.newClassPathResource("keyRules.drl",this.getClass()),ResourceType.DRL);

and I've placed it in about 42 places throughout my app in the futile attempt to get it to load. What am I missing? Can someone help me understand the whole classpath loading? I mean, I've put the path to the .drl file in my classpath, and it's simply not finding the file.

Thanks for your help!

-an exasperated newbie drools user
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/FileNotFoundException-for-drl-file-in-classpath-tp850700p850700.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users






This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this message.





More information about the rules-users mailing list