[ 
https://issues.apache.org/jira/browse/CASSANALYTICS-103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stefan Miklosovic updated CASSANALYTICS-103:
--------------------------------------------
     Bug Category: Parent values: Code(13163)Level 1 values: Bug - Unclear 
Impact(13164)
       Complexity: Low Hanging Fruit
    Discovered By: User Report
    Fix Version/s: 0.2
         Severity: Low
         Assignee: Stefan Miklosovic
           Status: Open  (was: Triage Needed)

> mismatched version of guice between Sidecar and Analytics
> ---------------------------------------------------------
>
>                 Key: CASSANALYTICS-103
>                 URL: https://issues.apache.org/jira/browse/CASSANALYTICS-103
>             Project: Apache Cassandra Analytics
>          Issue Type: Bug
>          Components: Build
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 0.2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I am getting this one when I am extending 
> {{SharedClusterIntegrationTestBase}} in my downstream project
> {code}
> java.lang.NoSuchMethodError: 'com.google.inject.Module 
> com.google.inject.util.Modules.disableCircularProxiesModule()'
>         at 
> org.apache.cassandra.sidecar.modules.SidecarModules.all(SidecarModules.java:47)
>         at 
> org.apache.cassandra.sidecar.modules.SidecarModules.all(SidecarModules.java:73)
>         at 
> org.apache.cassandra.sidecar.testing.SharedClusterIntegrationTestBase.startSidecarWithInstances(SharedClusterIntegrationTestBase.java:364)
>         at 
> com.instaclustr.cassandra.AbstractIntegrationTest.startSidecar(AbstractIntegrationTest.java:94)
>         at 
> org.apache.cassandra.sidecar.testing.SharedClusterIntegrationTestBase.setup(SharedClusterIntegrationTestBase.java:194)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>         at 
> io.vertx.junit5.VertxExtension.interceptBeforeAllMethod(VertxExtension.java:130)
>         at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> {code}
> there is 
> {code}
> sidecarServerInjector = 
> Guice.createInjector(Modules.override(SidecarModules.all()).with(testModule));
> {code}
> that one calls:
> {code}
>     public static List<Module> all(@Nullable Path confPath)
>     {
>         // To prevent unexpected circular dependency chains in your code, we 
> recommend that you disable Guice's circular proxy feature.
>         return List.of(Modules.disableCircularProxiesModule(),
>                        new ApiModule(),
> {code}
> but {{disableCircularProxiesModule}} is not present / is red in e.g. IDEA.
> That is because Sidecar uses Guice 7.0.0 where that makes sense, but when I 
> move it to my project where I am depending on 
> {{org.apache.cassandra:cassandra-analytics-integration-framework_spark3_2.12:jar:0.2.0:compile}},
>  then this will resolve Guice of version 4.2.2 (it is visible e.g. from mvn 
> dependency:tree of a custom project we pull this dependency in).
> 4.2.2 is also used currently in:
> {{cassandra-analytics-integration-framework}}
> {{cassandra-analytics-integration-tests}}
> I think that we should be on same Guice for these projects as well to be 
> aligned with what we use in Sidecar project.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to