I did a bit of research on this.

The problem stems from an invalid POM for the artifact javax.ws.rs-api with
version 2.1.1. javax.ws.rs-api gets somehow included as a transitive
dependency by tika-parsers:1.20 (running *./gradlew dependencies *reveal
dependency list for the project) and *javax.ws.rs-api:2.1.1* has an invalid
POM definition for the packaging.

I checked file
https://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.pom
and this is what I see -

<packaging>${packaging.type}</packaging>

So after reading this POM, gradle tries to actually go to
https://jcenter.bintray.com/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.$%7Bpackaging.type%7D
instead
of

https://jcenter.bintray.com/javax/ws/rs/javax.ws.rs-api/2.1.1/javax.ws.rs-api-2.1.1.
jar which is a valid URL and JAR does exist.

So the first issue is that the POM file is messed up and it is actually an
issue with other versions as well of the artifact *javax.ws.rs-api. *The
other issue is that Gradle falls back on a default packaging type 'jar' if
URL can't be resolved but it does not appear to be working. Therefore,
there are two ways this can be fixed as suggested here -
https://github.com/gradle/gradle/issues/3065

1. Exclude *javax.ws.rs-api *from *tika-parsers:1.20* and add it's
dependency explicitly using @jar to indicate the packaging type. This will
make sure proper packaging type is used to download dependency. We will go
back to tika-parsers:1.20 because the later version is creating dependency
hell problems as pointed out by Jacopo.

compile 'org.apache.tika:tika-core:1.20'
compile('org.apache.tika:tika-parsers:1.20') {
    exclude group: 'javax.ws.rs'
}

compile "javax.ws.rs:javax.ws.rs-api:2.1.1@jar" // @jar will make sure
packaging 'jar' is used to resolve the URL

I have tested the above fix and it is working properly. No 404 issue
while the solr test is running too.

2. Upgrade Gradle version to 4.5 (see the explanation at
https://github.com/gradle/gradle/issues/3065).
    I have tested upgrading to 4.5 while being on commit
*2d15771d56ab1637efa5685799f86a7bb118cee4.
*I think Gradle upgrade will be a big upgrade for the release and would
probably require proper testing. I am personally not for Gradle upgrade.

I've created a PR for this issue using the first fix.

https://github.com/apache/ofbiz-framework/pull/249

Let me know what everyone thinks of this and we can have a further
discussion around this.

Best,
Girish


























































On Sun, Jan 3, 2021 at 3:32 PM Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Though one clue is perhaps that it works in trunk
>
> Le 03/01/2021 à 10:15, Jacques Le Roux a écrit :
> > That makes sense Jacopo, how to solve the conundrum is less obvious. I
> have reopened OFBIZ-12100 as a blocker.
> >
> > Jacques
> >
> > Le 03/01/2021 à 09:44, Jacopo Cappellato a écrit :
> >> I suspect that the new version of the tika libraries are dependent on a
> >> version of Guava that is not compatible with the one required by the
> solr
> >> component.
> >>
> >> Jacopo
> >>
> >>
> >> On Sun, Jan 3, 2021 at 9:40 AM Jacopo Cappellato <
> >> jacopo.cappell...@gmail.com> wrote:
> >>
> >>> I am actually getting the same error on R17.
> >>> The error is the one reported in:
> >>> https://issues.apache.org/jira/browse/OFBIZ-9444
> >>> In fact disabling the "solr" component resolves the issue.
> >>>
> >>> Jacopo
> >>>
> >>>
> >>> On Sun, Jan 3, 2021 at 9:22 AM jler...@apache.org <jler...@apache.org>
> >>> wrote:
> >>>
> >>>> Hi Deepak, All,
> >>>>
> >>>> The same error (not failure) exists in both R17 and R18. I reproduce
> >>>> locally with R18. It seems related to OFBIZ-9442 and OFBIZ-9444
> >>>>
> >>>> Reverting the change allows
> >>>>
> >>>>      gradlew "ofbiz --test component=solr --test suitename=solrtests"
> >>>>
> >>>> to pass
> >>>>
> >>>> I believe this is a blocker for the releases.
> >>>>
> >>>> HTH
> >>>>
> >>>> Jacques
> >>>>
> >>>>
> >>>> Le 31/12/2020 à 14:33, Deepak Dixit a écrit :
> >>>>> I don't think this build failure due to dependency update
> >>>>>
> >>>>> solrTests is failing
> >>>>>
> >>>>
> /=============================================================================/
> >>>>> /2020-12-31 11:58:34,947 |main |TestRunContainer |I| [JUNIT] Pass:
> >>>> false | # Tests: 5 | # Failed: 0 # Errors: 1 2020-12-31 11:58:34,947
> |main
> >>>>> |TestRunContainer |I| [JUNIT] ----------------------------- ERRORS
> >>>> ----------------------------- [JUNIT] 2020-12-31 11:58:34,947 |main
> >>>>> |TestRunContainer |I| -->
> >>>> testAddProductToIndex(org.apache.ofbiz.solr.test.SolrTests): Could not
> >>>> commit transaction for service [solrProductsSearch]
> >>>>> call: Roll back error, could not commit transaction, was rolled back
> >>>> instead because of: Error in Service [runSolrQuery]:
> >>>>> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
> >>>> Error from server at https://localhost:8443/solr/solrdefault
> >>>>> <https://localhost:8443/solr/solrdefault>:
> >>>> java.lang.NoSuchMethodError:
> >>>>
> com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
> >>>> 2020-12-31 11:58:34,948 |main |TestRunContainer
> >>>>> |I| org.apache.ofbiz.service.GenericServiceException: Could not
> commit
> >>>> transaction for service [solrProductsSearch] call: Roll back error,
> could
> >>>> not
> >>>>> commit transaction, was rolled back instead because of: Error in
> >>>> Service [runSolrQuery]:
> >>>>> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
> >>>> Error from server at https://localhost:8443/solr/solrdefault
> >>>>> <https://localhost:8443/solr/solrdefault>:
> >>>> java.lang.NoSuchMethodError:
> >>>>
> com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
> >>>> at
> >>>>
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:563)
> >>>> /
> >>>>> /
> >>>>> /
> >>>>>
> >>>>
> /=============================================================================/
> >>>>> Thanks & Regards
> >>>>> --
> >>>>> Deepak Dixit
> >>>>> ofbiz.apache.org <http://ofbiz.apache.org>
> >>>>>
> >>>>>
> >>>>>      The Buildbot has detected a new failure on builder
> >>>> ofbizBranch17FrameworkPlugins while building ofbiz-framework. Full
> details
> >>>> are available at:
> >>>>
> https://ci.apache.org/builders/ofbizBranch17FrameworkPlugins/builds/621 <
> >>>>
> https://ci.apache.org/builders/ofbizBranch17FrameworkPlugins/builds/621>
> >>>>>      Buildbot URL: https://ci.apache.org/ <https://ci.apache.org/>
> >>>>>
> >>>>>      Buildslave for this Build: asf946_ubuntu
> >>>>>
> >>>>>      Build Reason: downstream
> >>>>>      Build Source Stamp: [branch release17.12]
> >>>> 24d9328cdf6489ba0e4c2d9b849f08c66658a5e2
> >>>>>      Blamelist: Deepak Dixit <deepak.di...@hotwax.co <mailto:
> >>>> deepak.di...@hotwax.co>>
> >>>>>      BUILD FAILED: failed shell_7
> >>>>>
> >>>>>      Sincerely,
> >>>>>       -The Buildbot
> >>>>>
> >>>>>
> >>>>>
>

Reply via email to