Upgrade to protobuf 2.5 - Prevents Upgrading to Drools 6.x

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrade to protobuf 2.5 - Prevents Upgrading to Drools 6.x

mikerod
Note: I originally tried posting this as a reply to this, 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

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.
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.

Do you have any suggestions?
Reply | Threaded
Open this post in threaded view
|

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

ge0ffrey
Administrator
I believe Edson had to make code changes in drools-core/compiler itself
to upgrade it from protobuf v.2.4.1 to v.2.5.0.
That implies that it's impossible to run drools 6 with protobuf 2.4.1.
Both the knowledige-api and kie-api both use the same implementation
(which is drools-core/compiler).

Any chance of upgrading hadoop?

On 11-03-14 15:50, mikerod wrote:

> 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.
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users
>


_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|

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

mikerod
Upgrading Hadoop is not possible for sometime still.  It requires a fairly large coordinated effort.

I don't suppose there is any chance that there will be a workaround for this in Drools 6?
Perhaps a configuration options or something?
Reply | Threaded
Open this post in threaded view
|

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

Mark Proctor

On 20 May 2014, at 02:37, mikerod <[hidden email]> wrote:

> Upgrading Hadoop is not possible for sometime still.  It requires a fairly
> large coordinated effort.
>
> I don't suppose there is any chance that there will be a workaround for this
> in Drools 6?
> Perhaps a configuration options or something?
If some one submits a pull request for this, we can consider it. But we don’t have the time to do this ourselves right now.
http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

Mark

>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-Prevents-Upgrading-to-Drools-6-x-tp4028636p4029616.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users