[rules-users] Upgrade to protobuf 2.5 - Prevents Upgrading to Drools 6.x

mikerod mjr4184 at gmail.com
Tue Mar 11 10:50:22 EDT 2014


Note: I originally tried posting this  as a reply to this
<http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-and-how-to-work-with-Protobuf-td4023028.html> 
, before I realized it was the wrong mailing list.

_____

It looks like moving from protobuf-java v.2.4.1 to v.2.5.0 has non-passive
changes that are causing more troubles preventing an upgrade to Drools
v.6.x.

Explained here <https://code.google.com/p/protobuf/issues/detail?id=493>  

Our Drools rules are ran in an environment that must share a classpath with
Hadoop libs.  These libs are still using protobuf-java v.2.4.1 and cannot
easily be upgraded.

The problem comes down to a runtime error:
```
2014-03-11 06:39:25,229 FATAL org.apache.hadoop.mapred.Child: Error running
child : java.lang.VerifyError: class
org.drools.compiler.kie.builder.impl.KieModuleCache$KModuleCache overrides
final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;
  at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.createCacheBuilder(KieBuilderImpl.java:269)
	at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:224)
	at
org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194)
	
	<... application level omitted ...>
```

This error makes sense given the changes in protobuf-java v.2.5.

I do not believe that our use-case of the Drools rules engine involves the
use of any of the features of the `KieModuleCache` and
marshalling/unmarshalling libs associated with it.  
However, I do not see any sort of configuration that would avoid this error.

I tried to simply use the "legacy" Drools knowledge-api when upgrading to
Drools v.6.x, but this has failed us since there are several unimplemented
methods in the `org.drools.impl.adapters.KnowledgeRuntimeAdapter`, such as
`org.drools.impl.adapters.KnowledgeRuntimeAdapter#getQueryResults`.

Side note:  I expected the knowledge-api to be fully-functional and
implemented in Drools v6.x for backwards compatibility and for  tooling
integration
<http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/index.html#KIEModuleIntroductionBuildingIntroductionSection> 
.
However, this does not seem to be the case at this point.

We are eager to move to Drools v6.x to avoid some performance issues we are
facing due to performance issues with  eagerly evaluating `AccumulateNode`
results that are accumulating large collections
<http://drools.46999.n3.nabble.com/Object-size-impact-on-session-insertion-performance-td4028244.html> 
.

Do you have any suggestions?	




--
View this message in context: http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-Prevents-Upgrading-to-Drools-6-x-tp4028636.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list