Menu

Showing posts with label Error. Show all posts
Showing posts with label Error. Show all posts

No goals have been specified for this build

When we started a maven project without setting the run goal then the Maven build will get failed and generate the below error "No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]". 

In this case, we have to set the maven goal e.g. clean install to successfully build and run the project or application. 

Resolution

If you are running using IDE then please set the command line as mentioned below and restart the build. To set the command line with IntelliJ, please go to Run >> Edit Configurations >> Select your project >> Select Parameters tab from left >> put clean install in command line field.

Now rerun the maven build.


Error while running the Maven project.

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.882 s
[INFO] Finished at: 2021-06-09T07:28:32+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR] 
[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.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException

Process finished with exit code 1

Diamond operator is not supported in source

While running a Java project with IntelliJ, we might face an error stating "diamond operator is not supported in -source 1.5", which means we are trying to run the project on a lower version of Java which is developed on a higher version.

Error statement 

java: diamond operator is not supported in -source 1.5

  (use -source 7 or higher to enable diamond operator)


Solution/Apply the following fix

Go to File option from menu >> Project Structure >> Project Settings >> Modules. Here in Module, we need to use the higher version of language level under the Source tab 


Hope this helps you!



Error during replication of ReplicationAction | AEM to Demandware

Error during content replication from Adobe experience manager(AEM) to Demandware. If you are seeing this error logged in AEM error.log file or demandware replication agent log, then it means credential configured in configuration Demandware TransportHandler Plugin for WebDAV to transport the data and content from AEM to Demandware is not valid.

*ERROR* [sling-threadpool-a430ddf1-339b-4140-b796-18d2fc7b5a66-(apache-sling-job-thread-pool)-7-com_day_cq_replication_job_demandware(com/day/cq/replication/job/demandware)] com.day.cq.replication.Agent.demandware Error during replication of ReplicationAction{type=ACTIVATE, path[0]='/content/dam/website/content/january/sample_image_winter.jpg', time=1578013615072, userId='rashidjorvee@jorvee.com', revision='null'}: com.day.cq.replication.ReplicationException: com.github.sardine.impl.SardineException: Unexpected response (401 )
03.01.2020 01:07:56.111 *INFO* [sling-threadpool-a430ddf1-339b-4140-b796-18d2fc7b5a66-(apache-sling-job-thread-pool)-7-com_day_cq_replication_job_demandware(com/day/cq/replication/job/demandware)] com.day.cq.replication.Agent.demandware.queue Job for agent demandware processed in 281ms. Failed.

com.day.cq.replication.ReplicationException: com.github.sardine.impl.SardineException: Unexpected response (401 )

Solution:

This error you seeing because of bad WebDev credential. Check the configured WebDev login credential under AEM config manager (http://localhost:4502/system/console/configMgr)   in configuration Demandware TransportHandler Plugin for WebDAV

Demandware TransportHandler Plugin for WebDAV
Demandware TransportHandler Plugin for WebDAV


If you think your credential in valid then please try login directly on the Demanware instance URL with configured credential to verify the credential is valid and working.

Reference:

Error: Can't find Python executable "python", you can set the PYTHON env variable.

This error you are getting because npm need Python and your computer doesn't have Python install into it.
So please go ahead and install the Python in your machine, and run the npm install command after installing the Python. 

How to install python?

Go to the Python official website and download the latest release of Python, and simple install it.
Once installation has been successfully completed, then set the python variable in your machine environment variable. To know more, you could see our blog on How to set an environment variable in windows.

Or you could set the variable using this command.
npm config set python C:\Python\Python27\python.exe
If you don't wants to install Python manually and wants all things to be get downloaded by npm itself then you could run npm install -g windows-build-tools, this will download all the required dependencies for you and bring npm in working mode.
To run this command please make sure you have open your node command prompt and cmd with administrative privilege. To do so, go to start and search for node cmd and cmd >> then right click on the application shortcut and use the option run as administrator.
after that just copy and paste the command
npm install -g windows-build-tools

This command will download the Python and install the Python at the below directory in your machine. Go to this path and find the python.exe and set environment variable in CLASSPATH variable.
C:\Users\nodejs\.windows-build-tools\python27\