icatproject / icat.server

The ICAT server offering both SOAP and "RESTlike" interfaces to a metadata catalog.
Other
1 stars 5 forks source link

261 datapublications for investigations #271

Closed kevinphippsstfc closed 2 years ago

kevinphippsstfc commented 2 years ago

Closes #261

RKrahl commented 2 years ago

I get a large number of compile time errors when I try build that branch:

$ mvn install
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< org.icatproject:icat.server >---------------------
[INFO] Building ICAT Server 5.0.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ icat.server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ icat.server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 130 source files to /home/abuild/src/icat.server/target/classes
[INFO] 
[INFO] --- miredot-plugin:1.6.2:restdoc (miredot) @ icat.server ---
[ERROR] License key expired on 01 Apr 2022
[WARNING] Custom output location is not supported by the free version of MireDot. Ignored.
[WARNING] Changing the baseUrl is not supported by the free version of MireDot. Configuration parameter ignored.
[WARNING] Miredot is unable to document the status codes of rest interfaces, unless a statusCodes-block is specified in pom.xml
[WARNING] Rest Framework not explicitly set, using JAX-RS by default.
[INFO] Building reflective model of API and reading annotations...
[... lots of warnings from MireDot not relevant here skipped ...]
[INFO] Built.
[INFO] Reading javadoc comments from sourcefiles...
[WARNING] No source files found in /home/abuild/src/icat.server/target/generated-sources/annotations !
[INFO] Read.
[INFO] Merging reflective and javadoc models...
[INFO] Merged.
[INFO] Performing issue analysis...
[INFO] Analysis done.
[INFO] Constructing Html documentation
[WARNING] Intro file is not supported in the free version of Miredot. Ignored.
[INFO] MireDot: Completed
[INFO] 
[INFO] --- exec-maven-plugin:1.5.0:java (Generate doc) @ icat.server ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ icat.server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ icat.server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 15 source files to /home/abuild/src/icat.server/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[21,23] cannot find symbol
  symbol:   class DataCollectionInvestigation
  location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[22,23] cannot find symbol
  symbol:   class DataPublication
  location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[23,23] cannot find symbol
  symbol:   class DataPublicationDate
  location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[24,23] cannot find symbol
  symbol:   class DataPublicationType
  location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[563,16] cannot find symbol
  symbol:   class DataPublicationType
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[574,56] cannot find symbol
  symbol:   class DataPublicationType
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[573,16] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[592,62] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[592,16] cannot find symbol
  symbol:   class DataPublicationDate
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[8,23] cannot find symbol
  symbol:   class DataPublication
  location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[9,23] cannot find symbol
  symbol:   class DataPublicationDate
  location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[10,23] cannot find symbol
  symbol:   class DataPublicationType
  location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[473,33] cannot find symbol
  symbol:   class DataCollectionInvestigation
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[473,95] cannot find symbol
  symbol:   class DataCollectionInvestigation
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[475,47] cannot find symbol
  symbol:   method getDataCollectionInvestigations()
  location: variable dataCollection of type org.icatproject.DataCollection
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[565,17] cannot find symbol
  symbol:   class DataPublicationType
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[565,55] cannot find symbol
  symbol:   class DataPublicationType
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[576,17] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[576,55] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[594,17] cannot find symbol
  symbol:   class DataPublicationDate
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[594,55] cannot find symbol
  symbol:   class DataPublicationDate
  location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[76,17] cannot find symbol
  symbol:   class DataPublicationType
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[81,17] cannot find symbol
  symbol:   class DataPublicationType
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[86,17] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[88,17] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[90,17] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[96,17] cannot find symbol
  symbol:   class DataPublicationDate
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[106,17] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[106,40] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[110,46] cannot find symbol
  symbol:   class DataPublicationDate
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[111,48] cannot find symbol
  symbol:   class DataPublicationDate
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[115,17] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[115,40] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[121,17] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[121,40] cannot find symbol
  symbol:   class DataPublication
  location: class org.icatproject.integration.TestDataPublication
[INFO] 35 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.650 s
[INFO] Finished at: 2022-05-06T12:55:20Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:testCompile (default-testCompile) on project icat.server: Compilation failure: Compilation failure: 
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[21,23] cannot find symbol
[ERROR]   symbol:   class DataCollectionInvestigation
[ERROR]   location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[22,23] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[23,23] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[24,23] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[563,16] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[574,56] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[573,16] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[592,62] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[592,16] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[8,23] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[9,23] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[10,23] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: package org.icatproject
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[473,33] cannot find symbol
[ERROR]   symbol:   class DataCollectionInvestigation
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[473,95] cannot find symbol
[ERROR]   symbol:   class DataCollectionInvestigation
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[475,47] cannot find symbol
[ERROR]   symbol:   method getDataCollectionInvestigations()
[ERROR]   location: variable dataCollection of type org.icatproject.DataCollection
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[565,17] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[565,55] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[576,17] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[576,55] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[594,17] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/WSession.java:[594,55] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: class org.icatproject.integration.WSession
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[76,17] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[81,17] cannot find symbol
[ERROR]   symbol:   class DataPublicationType
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[86,17] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[88,17] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[90,17] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[96,17] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[106,17] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[106,40] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[110,46] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[111,48] cannot find symbol
[ERROR]   symbol:   class DataPublicationDate
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[115,17] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[115,40] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[121,17] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] /home/abuild/src/icat.server/src/test/java/org/icatproject/integration/TestDataPublication.java:[121,40] cannot find symbol
[ERROR]   symbol:   class DataPublication
[ERROR]   location: class org.icatproject.integration.TestDataPublication
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

This is on openSUSE Leap 15.3, my Java version is java-1_8_0-openjdk-devel-1.8.0.322-3.64.2.x86_64. Not sure what other version information would be relevant.

I tried to trace down the issue checking the individual commits. The version at 51cb1fb5 still compiles fine. I get errors from the integration tests …

Results :

Failed tests: 
  TestWS.entities:260 expected:<49> but was:<51>
  TestWS.testInvestigation:1933 expected:<28> but was:<29>

Tests run: 67, Failures: 2, Errors: 0, Skipped: 4

… but I assume that is due to the fact that the tests are not updated with respect to the new classes in this version and thus this is expected. When I try the version at 58297db8, I get the compiler errors cited above. This commit only adds src/test/java/org/icatproject/integration/TestDataPublication.java. So I guess, something must go wrong with the imports at the top of this file.

kevinphippsstfc commented 2 years ago

Hi Rolf,

Thanks for looking at this. I think the problem is because I forgot to update the icat.client version to 5.0.0-SNAPSHOT so I have just added that to this PR. Then all the new classes referenced in WSession and TestDataPublication will be available.

This means that you will have to generate an icat.client 5.0.0-SNAPSHOT on the machine where you are running the tests before the tests will run correctly. To do this I think you need to build icat.server by skipping the tests and install it somewhere so that you can build an icat.client 5.0.0-SNAPSHOT from it. Then you can rebuild icat.server without skipping the tests (there may be a better way to do this!)

Cheers,

Kevin

RKrahl commented 2 years ago

Yes, I believe you are right, you need an update of icat.client to compile. And yes, I believe you need a running icat.server 5.0.0-SNAPSHOT in order to build a suitable icat.client 5.0.0-SNAPSHOT. I stumbled over this kind of a chicken and egg problem before, but I didn't remember it now.

It will be much easier if we have the snapshots out, because then we'll have a icat.client 5.0.0-SNAPSHOT in the maven repo to fetch. For the moment, I guess, I'll just going to cripple the integration tests for my testing.

RKrahl commented 2 years ago

There is an issue with the upgrade script for mysql that we should look into. Otherwise I had only two very minor comments. Besides the upgrade script issue, everything looks good for me and works nicely.

As indicated in the other comment above, I skipped creating the update for icat.client, but removed all references on the new classes from the integration tests instead. I'll have another round of checking the integration tests, but I'll do it after having checked the other PR and integrating them all in once, not for each branch separately.

kevinphippsstfc commented 2 years ago

Thanks for spotting the incorrect constraint names @RKrahl. I've corrected those and extended the other description as requested.