Before you use the massload utility, change configuration
variables to suit your environment.
The massload utility
is deprecated for WebSphere Commerce Version 7 Feature Pack 6. The
Data Load utility is the recommended command-line loading utility.
If you are currently using the mass load utility, you are recommended
to switch to the Data Load utility to load your CSV and XML input
files into your target database. If your system contains scheduled
and automated processes that use massload, it is recommended that
you update these processes to use the Data Load utility. Other WebSphere
Commerce utilities that use the massload utility, such as the acpload
utility, continue to use the massload utility in WebSphere Commerce
Version 7 Feature Pack 6. If you have business reasons to continue
using the massload utility, you can continue to use this utility.
For more information about the Data Load utility, see Overview of the Data Load utility.
You can switch to the Data Load utility by using the TableObjectMediator
to
load your data when no business object mediator exists for the data
that you are loading. For more about the TableObjectMediator
formation,
see Data Load utility table-based mediator and builder.
Procedure
- Change the Java virtual machine (JVM) heap size that is
used for the massload utility.
By default, the maximum
amount of memory that is allocated to the JVM heap is 64 MB. If this
heap size is not increased, the JVM can eventually run out of memory
during the load process. The maximum amount of memory that is allocated
to the Java heap can be varied by using the JVM -mx
option
in the Java command. If you are loading files that are more than 500
MB, then increase the JVM heap size to 512 MB or 1024 MB.
To
modify the JVM heap size for the massload utility:
- Open the following massload utility file in a text editor:
- WC_installdir/bin/massload.sh
- WC_installdir\bin\massload.cmd
- WCDE_installdir\bin\massload.bat
- Change the JVM heap size to 1024 MB by specifying the
-Xms
and -Xmx
options
of the Java command:
- If the
-Xms
and -Xmx
parameters
are already specified in the file, change the values to the heap size
that you want. Ensure that you update all occurrences of -Xms
and -Xmx
.
- If the
-Xms
and -Xmx
parameters
are not specified in the file, change all occurrences of %JAVA_HOME%\bin\java in
the utility command file to %JAVA_HOME%\bin\java -Xms1024M
-Xmx1024M.
- Save your changes.
- Optional: Change the directory for the massload
utility error log. By default, the massload utility writes the error
log to the following directory:
- The directory where the
input file resides.
- WC_userdir/instances/ instance_name/logs
- Open the following massload utility file in a text editor:
- WC_installdir/bin/massload.sh
- WC_installdir\bin\massload.cmd
- WCDE_installdir\bin\massload.bat
- Change error report location setting:
- If the
-Dcom.ibm.wcm.ErrorReporterDir
parameter
is already specified in the file, change the directory to the new
location for the massload utility error log. Ensure that you update
all occurrences of -Dcom.ibm.wcm.ErrorReporterDir
.
- If the
-Dcom.ibm.wcm.ErrorReporterDir
parameter
is not specified in the file, change all occurrences of %JAVA_HOME%\bin\java
%PM_ARGS% in the utility command file to %JAVA_HOME%\bin\java
%PM_ARGS% -Dcom.ibm.wcm.ErrorReporterDir= error_log_directory .
Important: The directory that you specify must exist.
The massload utility does not create the directory for you. If the
specified directory does not exist, no error log file is produced.
Additionally, if message logging is configured for the massload utility,
a DirNotExististException
message is logged in the
message log
- Save your changes.
- By default, the massload utility uses
the Oracle thick JDBC client. To change the massload utility to use
the Oracle thin JDBC client:
Note: The massload utility
must be using the thick client during instance creation and the migration
process. The bootstrap data gets processed during these processes.
- Extract
DbConnectionImplIDProperty.properties
from
the following file:
- WC_installdir/lib/loader/oracle/dbconnect.zip
- WCDE_installdir\workspace\wc\lib\loader\dbconnect.zip
- Open DbConnectionImplIDProperty.properties in
a text editor.
- Locate the following text:
ConnectStringID =
jdbc:oracle:oci8:@
Note: By
default, the
dbconnect.zip compressed file does
not contain this text string. When the
setdbtype
utility
script runs to switch the database type to an Oracle database, this
compressed file is replaced. The compressed file is replaced with
a version that contains the property information for Oracle databases.
When this script runs, the
dbconnect.zip compressed
file with the Oracle information is copied from the following directory:
- WC_installdir/wc.ear.ext/oracle/loader
- WCDE_installdir\wc.modules\loader\oracle
- Change the text to match the following text:
ConnectStringID
= jdbc:oracle:thin:@
Depending on your system
and massload needs, update the string value to use on the following
specifications:
Select
the specification that matches the information that is passed into
the massload utility. The information that is passed into the utility
is appended to value of the ConnectionStringID key.
- If you want to use a TNS name, for instance, a name that is defined
in tnsnames.ora, use:
ConnectStringID
= jdbc:oracle:oci:@
On the command line when you use this ConnectStringID
value, include the -dbname tnsname
parameter and
value specification.
- If you are using the massload stand-alone utility, which is invoked
by using massload.bat, massload.sh,
or massload.cmd and want to use a SID specification
use:
jdbc:oracle:thin:@
On the command line
when you use this ConnectStringID value, include the -dbname
host:port:SID
parameter and value specification.
Along
with invoking massload as a stanad-alone utility, you can invoke the massload
utility as part of another operations, such as instance creation.
- If you want to use a Service specification, use:
jdbc:oracle:thin:@//
On
the command line when you use this ConnectStringID value, include
the -dbname host:port/service
parameter and value
specification.
Beginning with Fix Pack 8, the ConnectionStringID
value is used only to determine which type of JDBC driver to use.
For instance, if the value includes the keyword OCI, the OCI (thick)
driver is used. Otherwise, the thin driver is used. The actual connection
specification is derived from the information that is provided to
the -dbname parameter. For instance, if -dbname
tnsname is used, the OCI driver is automatically used.
If -dbname host:port:sid or -dbname
host:port/service is used, an attempt is made to connect
to the service. If the connection attempt fails, an attempt is made
to connect to the SID.
If you pass in a fully qualified JDBC
URL, the URL is used unmodified to acquire the connection. The keyword
specification in the ConnectionStringID is ignored.
- If you use the following URL, the utility acquires a SID connection
explicitly: jdbc:oracle:thin:@host:port:SID
- If you use the following URL, the utility acquires a service-based
connection explicitly: jdbc:oracle:thin:@//host:port/service
- If you use the following URL, the utility uses the thick driver
to acquire a connection to the given tns name: jdbc:oracle:oci:@tnsname
- Save your changes.
- Add the updated DbConnectionImplIDProperty.properties file
to the WC_installdir/lib/loader/oracle/dbconnect.zip file.
Overwrite the existing file in the archive.
- Copy dbconnect.zip and paste it
one directory level higher.
For example, in this
example, it would go in the WC_installdir/lib/loader folder.
- Configure
the MassLoadCustomizer.properties file.