Skip to content

Commit

Permalink
First fix for Issue #41 and #42 of Vitam
Browse files Browse the repository at this point in the history
This version of Waarp-Vitam is compatible with Vitam 2.15.3 and 3.0.2.

This is a short fix for Change Behavior from Vitam client side. It should
not get any issue for Waarp-Vitam users but we follow this issue with Vitam
Team.

See ProgrammeVitam/vitam#41
and ProgrammeVitam/vitam#42

Note that this module is compiled against Java 8, thus allowing anyone
to use it with Java 8, 9, 10, 11 and follow, so with Vitam 2.15 and Vitam 3.0.

Vitam jar are not include in the all dependencies jar anymore to counter-act
the Java 11 issue from Vitam side, letting final users to choose between
Java 8 and above and V2 of Vitam OR Java 11 and above and V3 of Vitam.
  • Loading branch information
fredericBregier committed Apr 22, 2020
1 parent 1eb4dd0 commit 5aa5307
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,18 @@ Vitam introduces a version V3 that has the following issues:
* Java 11 is now mandatory, despite the large usage of Java 8 out of there. This prevents a lot if final users or co-project as this one to follow easily the path taken by Vitam team. Java 11 is not yet quite a success, considering a huge number of Java projects still using Java 8 as the minimal requirement.
* Several issues were encountered in using Version 3 compares to Version 2.X (last being 2.15.3): while Java API are the same, the behaviors are not, those preventing an clean upgrade from V2 to V3.

Therefore, except if V3 evolves in Java 8 and fixing those functional issues, or except if clients command to have a compatible version with V3 of Vitam, Waarp-Vitam will stay on V2 versions.

However we work with Vitam team to get a Waarp version available for both versions 2 and 3. Note that the "all jar" versions does not include any more the Vitam jar, in order to allow you to use either v2.15.3 or v3.0.1 and following versions.

You therefore need to ass the following jars with the Waarp-Vitam library:

* fr.gouv.vitam:ingest-external-client
* fr.gouv.vitam:common-public-client
* fr.gouv.vitam:ingest-external-api
* fr.gouv.vitam:access-external-client
* fr.gouv.vitam:common-public
* fr.gouv.vitam:common-http-interface
* fr.gouv.vitam:access-external-api
* fr.gouv.vitam:common-database-public


Support
Expand Down
14 changes: 8 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,17 @@
<waarp.directory.version>test</waarp.directory.version>
<waarp.module.version>test</waarp.module.version>
<waarp.version>3.3.2</waarp.version>
<waarp-vitam.version>1.0.2</waarp-vitam.version>
<waarp-vitam.version>1.0.3</waarp-vitam.version>
<revision>${waarp-vitam.version}</revision>

<!-- Dependencies versions -->
<vitam3.version>3.0.1</vitam3.version><!-- Upgrade not possible since incompatibility issues on Vitam side -->
<vitam.version>3.0.2</vitam.version><!-- Upgrade not possible since incompatibility issues on Vitam side -->
<!-- Java 11 is one difficulty, all those using Java < 11 are out of version 3 -->
<!-- But 2 other issues prevent to upgrade: the Java API are the same BUT the API and/or behavior are not,
thus preventing to upgrade or to use at runtime either version 2 or version 3, since 3 will not anymore
work for no reason: kind of bad change management examples
-->
<vitam.version>2.15.3</vitam.version>
<vitam2.version>2.15.3</vitam2.version>
<netty.version>4.1.48.Final</netty.version>
<netty-tcnative.version>2.0.30.Final</netty-tcnative.version>
<waarp-shaded.version>1.0.1</waarp-shaded.version><!-- Netty HTTP and Selenuum -->
Expand Down Expand Up @@ -676,6 +676,7 @@
<exclude>org.apache.ant</exclude>
<exclude>Oracle</exclude>
<exclude>com.oracle.jdbc</exclude>
<exclude>fr.gouv.vitam</exclude>
</excludes>
</artifactSet>
</configuration>
Expand Down Expand Up @@ -1016,7 +1017,7 @@
<target>${java.version}</target>
<testSource>1.8</testSource>
<testTarget>1.8</testTarget>
<!-- <release>8</release> if used with Java 11 -->
<release>11</release>
<debug>true</debug>
<optimize>true</optimize>
<showDeprecation>true</showDeprecation>
Expand All @@ -1034,9 +1035,10 @@
<maxmem>2048m</maxmem>
</configuration>
</plugin>
<plugin>
<!-- ensure that only methods available in java 1.6 can
be used even when compiling with java 1.7+ -->
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>${animal-sniffer-maven-plugin.version}</version>
Expand All @@ -1059,7 +1061,7 @@
</execution>
</executions>
</plugin>

-->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.version}</version>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/waarp/vitam/dip/DipManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ int select(final DipRequestFactory dipRequestFactory,
logger.error(ISSUE_SINCE_SELECT_PRODUCES_AN_ERROR, e);
// Should retry select from the beginning
try {
dipRequest.setStep(DIPStep.RETRY_SELECT, 0, dipRequestFactory);
dipRequest.setStep(DIPStep.ERROR, 500, dipRequestFactory);
// Will inform back of error which could not be fixed when reloaded
// Ignore: dipRequest.setStep(DIPStep.RETRY_SELECT, 0, dipRequestFactory);
} catch (InvalidParseOperationException ex) {
// very bad
logger.error("FATAL: Very bad since cannot save DipRequest", ex);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/waarp/vitam/ingest/IngestManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ boolean getStatusOfATR(final IngestRequestFactory ingestRequestFactory,
}
} catch (VitamClientException e) {
logger.warn("Issue since ingest client produces an error", e);
ingestRequest.setStep(IngestStep.ERROR, 500, ingestRequestFactory);
} finally {
// Shall read all InputStream
StreamUtils.consumeAnyEntityAndClose(response);
Expand Down

0 comments on commit 5aa5307

Please sign in to comment.