The full Error -
java.lang.ClassCastException: java.io.ObjectInputStream cannot be cast to
org.drools.common.DroolsObjectInput
at
org.drools.rule.JavaDialectRuntimeData.readExternal(JavaDialectRuntimeData.java:111)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.util.HashMap.readObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at
org.drools.rule.DialectRuntimeRegistry.readExternal(DialectRuntimeRegistry.java:59)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.drools.rule.Package.readExternal(Package.java:194)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at com.jspeed.brms.fire.Alarm2.readKnowledgeBase(Alarm2.java:66)
at com.jspeed.brms.fire.Alarm2.main(Alarm2.java:24)
Exception in thread "main" java.lang.NullPointerException
at com.jspeed.brms.fire.Alarm2.main(Alarm2.java:28)
I get this Error in this line :
KnowledgePackage kp = (KnowledgePackage) o;
--
View this message in context:
http://drools.46999.n3.nabble.com/how-to-run-pkg-from-java-tp2848164p2848...
Sent from the Drools: User forum mailing list archive at
Nabble.com.