still don't working
the code -
private static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newFileResource(
"c:/com.jspeed.brms.fire.pkg" ),
ResourceType.PKG );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
return kbase;
}
Error -
java.lang.RuntimeException: java.io.EOFException
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:544)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at com.jspeed.brms.fire.Alarm2.readKnowledgeBase(Alarm2.java:75)
at com.jspeed.brms.fire.Alarm2.main(Alarm2.java:27)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readInt(Unknown Source)
at java.io.ObjectInputStream.readInt(Unknown Source)
at
org.drools.rule.JavaDialectRuntimeData.readExternal(JavaDialectRuntimeData.java:112)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
--
View this message in context:
http://drools.46999.n3.nabble.com/how-to-run-pkg-from-java-tp2848164p2849...
Sent from the Drools: User forum mailing list archive at
Nabble.com.