FAQs and Troubleshooting

Q: I get the "Incorrect string value" error during installation or setting-up. What to do?

 Caused by: java.sql.SQLException: Incorrect string value: '\xD0\x93-\xD0\xBD.' for column 'val' at row 1

A: Please, follow the instructions to configure the encoding in your SQL server.

Q: I get the "Table already exists" error during installation or setting-up. What to do?

[INFO] Current version of schema `samplestore`: << Empty Schema >>
[INFO] Migrating schema `samplestore` to version 1.5.2 - init
[INFO] Migrating schema `samplestore` to version 1.5.2.1 - init
[WARNING] DB: Table 'abstract_filter' already exists (SQL State: 42S01 - Error Code: 1050)
[ERROR] Migration of schema `samplestore` to version 1.5.2.1 - init failed! Please restore backups and roll back database and code!
[ERROR]
Migration Samplestore1.5.2.1__init.sql failed
Message    : Table *** already exists

A: The problem is caused by multiple init scripts in /migration folder which are executed during db initialization phase. What you need to do is to delete all outdated versions of the script in /target/classes/db/migration/[YOUR_DB_OF_CHOICE] folder, re-run

mvn clean install

and then repeat the db initialization process. Follow this guide.

Q: How to solve the rat-plugin error?

Failed to execute goal org.apache.rat:apache-rat-plugin:0.11:check (rat-check) Too many files with unapproved license[]

A: This means that you have added source files which do not have the following license header:

/*
 * nemesis Platform - NExt-generation Multichannel E-commerce SYStem
 *
 * Copyright (c) 2010 - 2017 nemesis
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of nemesis
 * ("Confidential Information"). You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the
 * license agreement you entered into with nemesis.
 */

To check which files are missing the license header you can inspect the 'target/rat.txt' file and add the license header to those files, or alternatively you can simply disable the plugin by going to your project’s 'pom.xml' file and adding the following property:

 <maven-rat-plugin.skip>true</maven-rat-plugin.skip>

Q: How to solve the "Cannot resolve symbol" error. Projects fail to build in IntelliJ Idea IDE and certain classes cannot be found, but I can build everything successfully in the terminal. What to do?

A: Try re-importing Maven projects to resolve Maven dependencies: 1. In the IDE, go to 'Maven Projects' Tool Window and select 'Reimport All Projects'. 2. Modify the paths to generated sources in the new .iml files (a module file created by IntelliJ Idea to save the module paths, dependencies, and other settings), that are messed up by Idea after re-imports: * For nemesis-archetype modify samplestore.iml:
In <sourceFolder url="…​" isTestSource="false" generated="true" /> truncate everything after "file://$MODULE_DIR$/target/generated-sources/annotations/" and remove duplicated rows. * For nemesis-platform modify .iml files in /modules/nemesis-module-name for each particular module, /nemesis-platform-core and /nemesis-platform-facade:
In <sourceFolder url="…​" isTestSource="true" generated="true" /> truncate everything after "file://$MODULE_DIR$/target/generated-test-sources/test-annotations" and remove duplicated rows.
Example:

<sourceFolder url="file://$MODULE_DIR$/target/generated-test-sources/test-annotations/com/nemesis/platform/core/entity" isTestSource="true" generated="true" />

must be changed to

<sourceFolder url="file://$MODULE_DIR$/target/generated-test-sources/test-annotations" isTestSource="true" generated="true" />

If the paths are not correctly set, you can get AssertionError when building your project in the IDE.

Information:java: Errors occurred while compiling module 'nemesis-platform-core'
Information:javac 1.8.0_112 was used to compile java sources
Information:Some files were changed during the build. Additional compilation may be required.
Information:25.07.17 16:26 - Compilation completed with 2 errors and 0 warnings in 7s 656ms
Error:java: java.lang.AssertionError
Error:java: at com.sun.tools.javac.util.Assert.error(Assert.java:126)

If the re-import didn’t work, several other things could be done: * In IntelliJ Idea, open 'File' → 'Project Structure' and check if 'Project language level' is set to '8 - Lambdas, type annotations etc' and if you have also chosen the correct Java version (Java 8). If these settings are incorrect, you may have an error like:

Error:(48, 19) java: lambda expressions are not supported in -source 1.6 (use -source 8 or higher to enable lambda expressions)
  • Make sure that in 'File' → 'Settings' → 'Build, Execution, Deployment' → 'Maven' → 'Maven Home Directory' the correct version of Maven is used to import the project (Maven 3).

  • Make sure that in 'File' → 'Settings' → 'Build, Execution, Deployment' → 'Maven' → 'Importing' you have 'VM options for importer' set to at least '-Xmx2G'. If these settings are incorrect, you may have an error like:

Problems: Parent '***.BUILD_SNAPSHOT' has problems. java.lang.OutOfMemoryError:GC overhead limit exceeded.
  • Due to a known issue with re-imports and resolving Maven dependencies in Idea Ultimate 2017.2 - https://youtrack.jetbrains.com/issue/IDEA-176131, to make the re-import work do the following steps first and then do 'Reimport All Projects' again:

    1. Browse to the top-level folder of your project (/nemesis-archetype, /nemesis-platform, etc), search for all .iml files and .idea folder and delete them.

    2. Update your .m2/repository if you have it listed in 'File' → 'Settings' → 'Build, Executionn, Deployment' → 'Maven' → 'Repositories'. This will update the indexing of your repository.

  • Sometimes it may also help to invalidate the Idea cache before trying other fixes and then repeat the re-import. This can be done from 'File' → 'Invalidate chache/Restart'. The alternative way is to manually delete /system directory (it has all Maven indexes and caches), which is located in .IntelliJIdea directory (hidden), usually in your home directory. The /system directory will be created again after you restart your IDE.

Q: How to start manually 'Product Exporting Job' if products are not listed on the site after a successful start with mvn spring-boot:run?

A: Execute the following command by substituting with Nemesis 'admin credentials' in terminal (example for B2C site):

curl -k -v --user [USER]:[PASSWORD] -X POST "https://localhost:8112/storefront/platform/job/run/samplestoreB2CSearchProductExportFullJob"

Q: I get the "Maven Checkstyle" error during installation or setting-up. What to do?

Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.1:check (findbugs-check) on project ***

A: Try to re-run the build with -Pquick.

mvn clean install -Pquick

Q: I get a maven-failsafe-plugin error while running integration tests. What to do?

Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20:integration-test (default) on project platform: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.)

A: You are not running the test from the correct module folder. Browse to the top-level folder of the module you are trying to test (the one containing the pom.xml of the module being tested) and re-run the test via:

mvn clean install -Ptest -Dit.test=YOUR_MODULE_TEST_NAME

Q: I get the 'Address already in use' error during installation or setting-up. What to do?

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.857 s
[INFO] Finished at: 2017-07-27T10:28:30+03:00
[INFO] Final Memory: 437M/1698M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20:integration-test (default) on project platform: No tests were executed!  (Set -DfailIfNoTests=false to ignore this error.)

A: Make sure you have only one instance of IDE or terminal with your project running. If getting rid of other instances does not help, you can kill all java and redis proccesses on your machine first and then re-run mvn spring-boot:run.

pkill -9 java | pkill -9 redis | mvn spring-boot:run

Q: I get the 'No site matches given url' warning while trying to open Solarapprel or other related sites. What to do?

io.nemesis.platform.module.cms.storefront.filter.PathLocaleFilter [http-nio-8111-exec-1] WARN : There was no extracted site from the requested URL. No site matches given url 'http://localhost:8111/storefront/en/US?site=solar'

A: Make sure you are using the correct URLs. The latest URLs have been changed according to https://github.com/nemesis-software/nemesis-archetype/issues/194 and are as follows:

Q: I get the 'None of the configured nodes are available' error during installation or setting-up. What to do?

org.springframework.batch.core.step.AbstractStep [main] ERROR: Encountered an error executing step search-product-clear in job searchProductExportJob
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{7yzI2JMcQOS03EYXW01l8w}{localhost}{127.0.0.1:9300}]]

A: Check if you have configured an Elasticsearch node on your local machine. In application.properties look in #Elasticsearch section and delete .cluster-nodes property.

# Elasticsearch
spring.data.elasticsearch.cluster-nodes=localhost:9300
spring.data.elasticsearch.properties.path.data=target/esindex/data
spring.data.elasticsearch.properties.path.logs=target/esindex/logs
spring.data.elasticsearch.properties.http.enabled=true