Compilation errors occur when you run the HCL Commerce Build tool

When using the HCL Commerce Build tool, you can encounter Java compilation errors caused by missing Java classes.The omission of these files is due to the limitations of the Java Development Kit.


When using the Build tool to build packages for deployment, a Java error similar to the following is displayed:
[javac] Compiling 5 source files to /opt/WebSphere/CommerceServer90/wcbd/working/compile/global/bin
[javac] /opt/WebSphere/CommerceServer90/wcbd/working/compile/global/src/com/synaigy/commerce/order/facade/server/commands/ error: cannot access EFactory
[javac] userdata = CommerceFoundationFactory.eINSTANCE.createUserDataType();
[javac] ^
[javac] class file for org.eclipse.emf.ecore.EFactory not found
[javac] Note: /opt/WebSphere/CommerceServer90/wcbd/working/compile/global/src/com/synaigy/commerce/order/facade/server/commands/ uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error
[zip] Building zip: /opt/WebSphere/CommerceServer90/wcbd/logs/local-ts-demo-20190218024915/


Manually add the required Java classes to the Java path for the HCL Commerce Build tool.
  1. Navigate to the following directory depending on where you are using the Build tool.
    • WCDE_installdir/wcbd/ on a development environment.
    • /opt/WebSphere/CommerceServer90/wcbd/ within the Utility server Docker container.
  2. Open the wcbd-build-shared-classpath.xml file for editing.
  3. Add the required class reference to the path. For example, <path refid="was.class.path" />.
  4. Save and close the file.


Upon running the Build tool, the error should be resolved. Additional classes might need to be added to complete the build.