Adding the Base CEReplicate Java Code- A Replication Java Program for IBM FileNet Object Stores

The base CEReplicate.java code is pasted in from the standard code module as a starting point for the development and comments and new Java code added for changes for our functionality.

Figure 4-24The base Java Code is added for CEReplicate.java

Adding the IBM FileNet Libraries to the AUDIT_CEReplicate Classpath

IBM FileNet P8 5.5.x standard libraries are added to the AUDIT_CEReplicate Project Classpath. This should correct the flagged issues on the missing imports from the standard IBM FileNet API jace.jar and its supporting library .jar files.

Figure 4-25IBM FileNet P8 .jar libraries are added to the Classpath

Figure 4-26The Apply and Close command button is clicked to add the library .jar files

The other projects are similarly created as described in Table 4-1 (with the code copied from the Java code listings in the following subsections).

Adding the Apache Commons Codec 1.5 Library

 

Figure 4-27The latest Commons Codec Version 1.5 is downloaded from the Apache site

The URL https://commons.apache.org/proper/commons-code.codec.cgi is entered in the Firefox browser, as shown in Figure 4-27, to download the commons-codec-1.15-bin.tar.gz file for our Linux Eclipse project.

Figure 4-28The downloaded commons-codec-1.15-bin.tar.gz file is saved

The downloaded commons-codec-1.15-bin.tar.gz file is saved to the /root/Downloads browser folder.

Figure 4-29The downloaded commons-codec-1.15-bin.tar.gz file is unpacked

The downloaded commons-codec-1.15-bin.tar.gz file is unpacked using the Linux File Explorer desktop utility by double-clicking the .gz file to view the packed files.

Figure 4-30The unpacked .gz file displays the commons-codec-1.15.jar file

The commons-codec-1.15.jar file is now copied to the /opt/FileNetJars folder.

Figure 4-31The /opt/FileNetJars folder is browsed to copy the commons-codec-1.15.jar

Adding the Supporting External Library JAR Files

The properties for the AUDIT_CEReplicate project show the Java Build Path, and we can use the Add External JARs command button to browse and select the highlighted commons-code-1.15.jar file from the /opt/FileNetJars folder path.

Figure 4-32The Add External JARs command button is used to load the JAR files required

The commons-code-1.15.jar file we downloaded earlier is used for the password encryption in the config.xml file.

Figure 4-33The commons-codec-1.15.jar is selected from the /opt/FileNetJars folder

The Eclipse properties Java Build Path for the AUDIT_CEReplicate project is updated to include the commons-codec-1.15.jar file which is missing from the import statement, highlighted in Figure 4-34, it can be seen that the addition of the Jar file has fixed the flagged issue of the missing Base64 class.

 

Figure 4-34The import org.apache.commons.codec.binary.Base64 class is now fixed

Adding the Xerces Java Library for XML File Processing

Figure 4-35The Xerces-J-bin.1.4.4.zip file is downloaded from the Apache website

The Xerces-J-bin.1.4.4.zip file is downloaded from the https://archive.apache.org/dist/xml/xerces-j/Xerces-J-bin.1.4.4.zip Apache jar download site.

Figure 4-36The Xerces-J-bin.1.4.4.zip file is shown in the /root/Downloads Linux folder

The Xerces-J-bin.1.4.4.zip file is downloaded and unpacked using the Extract function of the Linux File Explorer desktop utility.

Figure 4-37The xerces.jar file is extracted from the Xerces-J-bin.1.4.4.zip file

The unpacked xerces.jar file is extracted to the /opt/FileNetJars folder location.

Figure 4-38The unpacked xerces.jar file is extracted to the /opt/FileNetJars folder

The xerces.jar file is used to satisfy the XML parsing requirements for the Java replication program.

Figure 4-39The unpacked xerces.jar file is added to the Java Build Path

The properties of the AUDIT_CEReplicate project are selected to add the xerces.jar file to the Java Build Path property.

Figure 4-40The xerces.jar is now added to the Java Build Path

The import statement needed to be updated to adjust the package path of the OutputFormat class as shown in Figure 4-41.

 

Figure 4-41The adjusted import statement for the OutputFormat class

Leave a Reply

Your email address will not be published. Required fields are marked *