J2EE does not allow File I/O so it may be that your app server does not
allow it by default and you need to give your application permission to do
it. This would generally be done in a policy file (in WebSphere it is
was.policy).
Steve
On 4/5/07, vista2007 <my_vista2007(a)yahoo.com> wrote:
I want to call rules from session bean. I implement this by calling a
utility
callss from the Session bean method.
That Utility class load the rule file as
"final Reader source = new
InputStreamReader(BaseRuleImpl.class.getResourceAsStream(rulefile));"
this gives the result as expected. But it throws an exception in the
server
as follows,(Server log)
java.lang.Throwable
at
com.sun.enterprise.loader.EJBClassLoader$SentinelInputStream.<init>(
EJBClassLoader.java:1123)
at
com.sun.enterprise.loader.EJBClassLoader$InternalJarURLConnection.getInputStream
(EJBClassLoader.java:1216)
at java.net.URL.openStream(URL.java:1009)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java
:1161)
at
com.sun.enterprise.loader.EJBClassLoader.getResourceAsStream(
EJBClassLoader.java:782)
at java.lang.Class.getResourceAsStream(Class.java:2030)
at org.drools.semantics.java.RuleBuilder.<clinit>(Unknown Source)
at org.drools.compiler.PackageBuilder.addRule(Unknown Source)
at org.drools.compiler.PackageBuilder.addPackage(Unknown Source)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(Unknown
Source)
at
com.argosoftware.rules.impl.BaseRuleImpl.readRule(BaseRuleImpl.java:29)
at com.argosoftware.rules.impl.RuleImpl.fireRule(RuleImpl.java:54)
at
com.argosoftware.rules.ejb.session.LogicHandlerBean.ruleHandler(
LogicHandlerBean.java:42)
I think this is because of the IO operation.
Can anybody kindly suggest a solution for this.?
--
View this message in context:
http://www.nabble.com/Help-%3A-drools-implementing-tf3530032.html#a9851208
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Steven Williams
Supervising Consultant
Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
stevenw(a)objectconsulting.com.au
www.objectconsulting.com.au
consulting | development | training | support
our experience makes the difference