Troubleshooting issues when developing code-based applications


This topic describes steps to resolve issues that you might encounter while developing code-based applications.


Issue

Cause

Workaround

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-arch lugin:3.2.0:generate failed: A required class was missing while executing org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate: org/apache/commons/lang/StringUtils

To create a project for application development, run the following command:

mvn archetype:generate -DarchetypeGroupId=com.bmc.arsys -DarchetypeArtifactId=rx-sdk-archetype-application -DarchetypeCatalog=local
  1. Delete the local .m2/repository contents.
  2. Install BMC Helix Innovation Studio SDK.
  3. Run the command to create a project for application development.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project hello-world: Fatal error compiling: invalid target release: 11 -> [Help 1]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

You install BMC Helix Innovation Studio SDK and the components required to develop applications. 

Create a JAVA_HOME environment variable pointing to  C:\Tools\Java\ jdk-11.0.7.

For more information, see Setting-up-your-IDE-and-installing-BMC-Helix-Innovation-Studio-SDK.

[INFO] Authenticating User developer
[ERROR] User [developer] is not authenticated.
javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized

To deploy the package, you run the following command:

mvn clean install -Pdeploy
  1. Open the parent pom.xml file located in project folder.
    For example, projects\work-order-lib\pom.xml.
  2. Enter the correct developer username that you created while requesting a sandbox.

For more information, see Creating a Project using Maven and the Archetype.

The REST Resource is not found at run-time.

If you have bundled REST resource with the deployed application or library. 

Register the REST resource in the application bundle. 

registerRestfulResource(new <bundleClass>());


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*