AtlasOfLivingAustralia / ala-install

Ansible playbooks for installing the ALA components
https://www.ala.org.au
Apache License 2.0
26 stars 52 forks source link

ala-demo: Rough ala-bie #185

Open javier-molina opened 6 years ago

javier-molina commented 6 years ago

Still running the command below.

ansible-playbook -i inventories/ala-demo ala-demo-cassandra3-solr6.yml  --become    --ask-become-pass

This is what does dot work

  1. Exception while issuing a simple search

    Error 500: Internal Server Error
    URI
    /ala-bie/search
    Class
    java.lang.NoClassDefFoundError
    Message
    Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/httpclient/util/URIUtil
    Caused by
    org/apache/commons/httpclient/util/URIUtil
    Trace
    Line | Method
    ->>   44 | getQueryString   in au.org.ala.bie.webapp2.SearchRequestParamsDTO
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    |     14 | searchBie        in au.org.ala.bie.BieService
    |     82 | doCall . . . . . in au.org.ala.bie.SpeciesController$_closure2
    |    223 | invoke           in org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker
    |    188 | invoke . . . . . in org.grails.core.DefaultGrailsControllerClass
    |     90 | handle           in org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter
    |    967 | doDispatch . . . in org.springframework.web.servlet.DispatcherServlet
    |    901 | doService        in     ''
    |    970 | processRequest . in org.springframework.web.servlet.FrameworkServlet
    |    861 | doGet            in     ''
    |    846 | service . . . .  in     ''
    |     55 | doFilterInternal in org.springframework.boot.web.filter.ApplicationContextHeaderFilter
    |     77 | doFilterInternal in org.grails.web.servlet.mvc.GrailsWebRequestFilter
    |    203 | doFilter         in au.org.ala.cas.client.UriFilter
    |     97 | doFilter . . . . in org.jasig.cas.client.session.SingleSignOutFilter
    |     67 | doFilterInternal in org.grails.web.filters.HiddenHttpMethodFilter
    |    117 | doFilter . . . . in org.springframework.boot.web.support.ErrorPageFilter
    |     61 | access$000       in     ''
    |     92 | doFilterInternal in org.springframework.boot.web.support.ErrorPageFilter$1
    |    110 | doFilter         in org.springframework.boot.web.support.ErrorPageFilter
    |   1149 | runWorker . . .  in java.util.concurrent.ThreadPoolExecutor
    |    624 | run              in java.util.concurrent.ThreadPoolExecutor$Worker
    ^    748 | run . . . . . .  in java.lang.Thread
  2. ala-bie seems not to be using CSS styles at all.

Screen Shot 2018-08-13 at 12.22.56 pm.png

djtfmartin commented 6 years ago

ive reproduced this too. Im attempting to fix the ala-bie build which is currently broken due to missing SNAPSHOT dependencies

nickdos commented 5 years ago

This has happened again with bie-plugin version 1.4.4. Can't see what has caused it this time, as no missing SNAPSHOT deps are present. Seems like some libs are simply not being included in the jar file...

ansell commented 5 years ago

org/apache/commons/httpclient/util/URIUtil is a class from commons-httpclient-3, which isn't on the classpath looking at what is deployed on nectar-bie-test. Could be useful to upgrade the code to use httpclient-4 which is on the classpath.

nickdos commented 5 years ago

We're pulling it in via compile "commons-httpclient:commons-httpclient:3.1". When running "in line" I can click though to this library from the code that is calling it (which fails above).

ansell commented 5 years ago

The diff of the dependent jars in WEB-INF/libs between ala-bie-1.4.3 and ala-bie-1.4.5 is fairly large (reduced from 223 jars to 139 jars):

$ diff -u ala-bie-1.4.*
--- ala-bie-1.4.3-deps.txt  2018-10-23 12:36:43.000000000 +1100
+++ ala-bie-1.4.5-deps.txt  2018-10-23 12:36:56.000000000 +1100
@@ -1,60 +1,27 @@
-HikariCP-2.4.7.jar
-activation-1.1.jar
 ala-admin-plugin-2.0.jar
 ala-auth-3.1.0.jar
 ala-bootstrap3-3.0.6.jar
 ala-cas-client-2.4.jar
-ala-charts-plugin-2.0.jar
-ala-name-matching-2.4.7.jar
-amqp-client-3.1.4.jar
-aopalliance-1.0.jar
 args4j-2.0.26.jar
-asm-3.3.1.jar
 aspectjrt-1.8.10.jar
 aspectjweaver-1.8.10.jar
 asset-pipeline-core-2.14.1.jar
 asset-pipeline-grails-2.14.1.jar
-bie-plugin-1.4.2.2.jar
+bie-plugin-1.4.5.jar
 cache-3.0.3.jar
 cas-client-core-3.4.1.jar
-cglib-2.2.2.jar
-checklistbank-common-2.61.jar
 classmate-1.3.3.jar
 closure-compiler-externs-v20160713.jar
 closure-compiler-unshaded-v20160713.jar
-commons-beanutils-1.9.3.jar
-commons-cli-1.2.jar
 commons-codec-1.10.jar
 commons-collections-3.2.2.jar
-commons-compress-1.10.jar
-commons-digester3-3.2.jar
-commons-httpclient-3.1.jar
-commons-io-2.5.jar
 commons-lang-2.6.jar
-commons-lang3-3.5.jar
 commons-logging-1.2.jar
-commons-math3-3.6.1.jar
 commons-validator-1.5.1.jar
 concurrentlinkedhashmap-lru-1.4.2.jar
 converter-moshi-2.4.0.jar
 dom4j-1.6.1.jar
-download-query-tools-1.18.jar
-dwc-api-1.17.jar
-dwca-io-1.32.jar
-ehcache-core-2.0.0.jar
 external-config-1.1.1.jar
-ezmorph-1.0.6.jar
-freemarker-2.3.26-incubating.jar
-gbif-api-0.55.jar
-gbif-common-0.37.jar
-gbif-common-mybatis-0.28.jar
-gbif-common-service-0.16.jar
-gbif-common-ws-0.40.jar
-gbif-doi-1.5.jar
-gbif-httputils-0.10.jar
-gbif-parsers-0.30.jar
-gbif-postal-service-0.24.jar
-gmetric4j-1.0.7.jar
 gpars-1.2.1.jar
 grails-async-3.2.11.jar
 grails-bootstrap-3.2.11.jar
@@ -108,68 +75,28 @@
 gs-collections-api-5.1.0.jar
 gson-2.7.jar
 guava-19.0.jar
-guice-4.0.jar
-guice-multibindings-4.0.jar
-guice-servlet-4.0.jar
 h2-1.4.194.jar
 hibernate-jpa-2.1-api-1.0.0.Final.jar
 hibernate-validator-5.4.2.Final.jar
-http-builder-0.7.1.jar
 httpclient-4.5.3.jar
 httpcore-4.4.6.jar
-images-client-plugin-1.0.jar
 jackson-annotations-2.8.8.jar
 jackson-core-2.8.8.jar
-jackson-core-asl-1.9.13.jar
 jackson-databind-2.8.8.jar
-jackson-datatype-guava-1.9.2.jar
-jackson-jaxrs-1.9.13.jar
-jackson-mapper-asl-1.9.13.jar
-jackson-xc-1.9.2.jar
 javassist-3.20.0-GA.jar
-javax.inject-1.jar
-jaxb-api-2.2.2.jar
-jaxb-impl-2.2.3-1.jar
 jboss-logging-3.3.1.Final.jar
 jcl-over-slf4j-1.7.25.jar
-jcommander-1.60.jar
-jersey-apache-client4-1.19.3.jar
-jersey-client-1.19.3.jar
-jersey-core-1.19.3.jar
-jersey-guice-1.19.3.jar
-jersey-json-1.19.3.jar
-jersey-server-1.19.3.jar
-jersey-servlet-1.19.3.jar
-jettison-1.1.jar
-json-lib-2.3-jdk15.jar
-jsoup-1.8.3.jar
 jsr166y-1.7.0.jar
-jsr250-api-1.0.jar
-jsr305-3.0.1.jar
-jsr311-api-1.1.1.jar
+jsr305-1.3.9.jar
 jta-1.1.jar
-jts-1.13.jar
 jul-to-slf4j-1.7.25.jar
-log4j-1.2.17.jar
 log4j-over-slf4j-1.7.25.jar
 logback-classic-1.1.11.jar
 logback-core-1.1.11.jar
-mail-1.4.7.jar
-metrics-core-3.1.4.jar
-metrics-ganglia-3.1.4.jar
 moshi-1.5.0.jar
 moshi-adapters-1.5.0.jar
-mybatis-3.4.1.jar
-mybatis-ehcache-1.0.0.jar
-mybatis-guice-3.7.1.jar
-name-parser-2.24.jar
-nekohtml-1.9.22.jar
 okhttp-3.10.0.jar
 okio-1.14.0.jar
-oncrpc-1.0.7.jar
-opencsv-2.4.jar
-owasp-java-html-sanitizer-20160924.1.jar
-postgresql-9.4.1212.jre7.jar
 protobuf-java-2.5.0.jar
 reactive-streams-1.0.0.jar
 reactor-bus-2.0.8.RELEASE.jar
@@ -177,17 +104,11 @@
 reactor-spring-context-2.0.7.RELEASE.jar
 reactor-spring-core-2.0.7.RELEASE.jar
 reactor-stream-2.0.8.RELEASE.jar
-registry-doi-2.71.jar
-registry-identity-2.71.jar
-registry-metadata-2.71.jar
-registry-surety-2.71.jar
-registry-ws-client-2.71.jar
 retrofit-2.4.0.jar
 rhino-1.7R4.jar
 serializer-2.7.2.jar
 sitemesh-2.4.jar
 slf4j-api-1.7.25.jar
-slf4j-log4j12-1.7.25.jar
 snakeyaml-1.17.jar
 spring-aop-4.3.9.RELEASE.jar
 spring-aspects-4.3.9.RELEASE.jar
@@ -207,9 +128,6 @@
 spring-tx-4.3.9.RELEASE.jar
 spring-web-4.3.9.RELEASE.jar
 spring-webmvc-4.3.9.RELEASE.jar
-stax-api-1.0-2.jar
-threetenbp-1.3.2.jar
-tika-core-1.15.jar
 tomcat-embed-core-8.5.13.jar
 tomcat-embed-el-8.5.13.jar
 tomcat-embed-logging-log4j-8.5.2.jar
@@ -218,6 +136,4 @@
 tomcat-juli-8.5.13.jar
 userdetails-service-client-1.4.0.jar
 validation-api-1.1.0.Final.jar
-xercesImpl-2.11.0.jar
 xml-apis-1.4.01.jar
-xml-resolver-1.2.jar
nickdos commented 5 years ago

I've found the problem. The bie-plugin had a publishing task in build.gradle (link) that resulted in the travis triggering 2 publishing events, one of type publishMavenJarPublicationToNexusRepository and another of publishMavenPublicationToNexusRepository. The problem with release versions was the second event would fail, as it was trying to (re-)generate the jar file (and pom file, etc) on nexus and would fail due to the restriction of not allowing files to be overridden for release versions.

The fix was to remove the publishing section (which had a mavenJar(MavenPublication) entry - note the jar reference) from build.gradle and allow just publishMavenPublicationToNexusRepository to run. We originally had this code in the file to remove any dependencies with NO version info, but it appears this was a work-around for a Grails issue that has since been resolved and so its not needed any more.