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.

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:

**Common Jar for both V2 and V3 versions of Vitam**

*Vitam jars:*
 * 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

**Specific to V2 version of Vitam**

*Vitam jars:*
 * fr.gouv.vitam:access-external-common:jar:2.15.3
 * fr.gouv.vitam:logbook-common-client:jar:2.15.3
 * fr.gouv.vitam:logbook-common:jar:2.15.3

*Other jars: Those jars are included by default, even if Vitam V3 does not need them (no issue).*
 * com.github.fge:json-schema-validator:jar:2.2.6
 * com.googlecode.libphonenumber:libphonenumber:jar:6.2
 * com.github.fge:json-schema-core:jar:1.2.5
 * com.github.fge:uri-template:jar:0.9
 * org.mozilla:rhino:jar:1.7R4
 * javax.mail:mailapi:jar:1.4.3
 * net.sf.jopt-simple:jopt-simple:jar:4.6
  • Loading branch information
fredericBregier committed Apr 23, 2020
1 parent a5ab587 commit 82f92ac
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 9 deletions.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,37 @@ 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:

**Common Jar for both V2 and V3 versions of Vitam**

*Vitam jars:*
* 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

**Specific to V2 version of Vitam**

*Vitam jars:*
* fr.gouv.vitam:access-external-common:jar:2.15.3
* fr.gouv.vitam:logbook-common-client:jar:2.15.3
* fr.gouv.vitam:logbook-common:jar:2.15.3

*Other jars:*
* com.github.fge:json-schema-validator:jar:2.2.6
* com.googlecode.libphonenumber:libphonenumber:jar:6.2
* com.github.fge:json-schema-core:jar:1.2.5
* com.github.fge:uri-template:jar:0.9
* org.mozilla:rhino:jar:1.7R4
* javax.mail:mailapi:jar:1.4.3
* net.sf.jopt-simple:jopt-simple:jar:4.6



Expand Down
52 changes: 45 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,18 @@
<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>
<netty.version>4.1.48.Final</netty.version>
<vitam2.version>2.15.3</vitam2.version>
<netty.version>4.1.49.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 -->
<netty.http.version>1.3.1</netty.http.version><!--Java6 shaded version -->
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 Expand Up @@ -2364,6 +2366,42 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- Dependencies for Vitam V2 for simplicity of V2 vs V3 JAR -->
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>json-schema-validator</artifactId>
<version>2.2.6</version>
</dependency>
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>json-schema-core</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>uri-template</artifactId>
<version>0.9</version>
</dependency>
<dependency>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>libphonenumber</artifactId>
<version>6.2</version>
</dependency>
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7R4</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mailapi</artifactId>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId>
<version>4.6</version>
</dependency>
</dependencies>

</project>
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 82f92ac

Please sign in to comment.