Hi,
I've tried to serialize the KnowledgeBase to use later but when I do that, I get
NullPointer in few rules that doesn't happens when running while building it form
scrap:
Caused by: javax.ejb.EJBException: Exception executing consequence for rule "process
sentence" in my.rules: java.lang.NullPointerException
--
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at
org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:42)
at sun.reflect.GeneratedMethodAccessor277.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
Im afraid that some transient attributes are used. Should I cache it on RAM?
Thanks in advance.
Paulo Reis
casmeiron(a)gmail.com
On Aug 23, 2012, at 2:24 PM, Paulo Reis <casmeiron(a)gmail.com> wrote:
Thank you guys.
I will take the advices, will try storing the bytes on the db and later recasting to
object or putting on the server memory.
I didn't know I could serialize KnowledgeBase.
Thanks.
Paulo Reis
casmeiron(a)gmail.com
On Aug 23, 2012, at 12:39 PM, lhorton <LHorton(a)ABCLegal.com> wrote:
> At my shop, our design is to build the knowledge bases only once, when the
> rules server starts up. Each knowledge base stays in server memory, and a
> session (we use stateless) is created for each request, when the request
> comes in. Creating the knowledge base is slow, but session creation is
> very fast (we have thousands of rules). If you search this forum on
> "knowledge base expensive" you'll find lots of tuning advice.
>
>
>
> --
> View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Marshalling-Unmarshalling-K...
> Sent from the Drools: User forum mailing list archive at
Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users