what is the cause of this openliberty docker error - open-liberty

Just following Product documentation instructions:
Please see Error log message.
Not sure what the error is and how to fix it.
mvn liberty:devc
[INFO] Scanning for projects...
[INFO]
[INFO] ------------< io.openliberty.guides:guide-getting-started >-------------
[INFO] Building guide-getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- liberty-maven-plugin:3.3.4:devc (default-cli) # guide-getting-started ---
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty- kernel:null:21.0.0.3:zip.
[INFO] CWWKM2102I: Using installDirectory : /home/zahid/Liberty-eclipse/guide-getting-started/start/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /home/zahid/Liberty-eclipse/guide-getting-started/start/target/liberty/wlp/usr/servers/defaultServer.
[INFO] Running maven-compiler-plugin:compile
[INFO] Copying 1 file to /home/zahid/Liberty-eclipse/guide-getting-started/start/target/liberty/wlp/usr/servers/defaultServer
[INFO] CWWKM2144I: Update server configuration file server.xml from /home/zahid/Liberty-eclipse/guide-getting-started/start/src/main/liberty/config/server.xml.
[INFO] Building Docker image...
[INFO] docker build --pull -f /tmp/tempDockerfile17415566016391532686 -t guide-getting-started-dev-mode /home/zahid/Liberty-eclipse/guide-getting-started/start
[ERROR] unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /tmp/tempDockerfile17415566016391532686: no such file or directory
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.343 s
[INFO] Finished at: 2021-03-20T16:28:39Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.3.4:devc (default-cli) on project guide-getting-started: Could not build Docker image using Dockerfile: /home/zahid/Liberty-eclipse/guide-getting-started/start/Dockerfile. Address the following docker build error and then start dev mode again: unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /tmp/tempDockerfile17415566016391532686: no such file or directory RC=1 -> [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/MojoExecutionException

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat
Resolution: Remove the snappy version from Ubuntu 20.04
$ sudo snap remove docker
then install using these instructions
https://docs.docker.com/engine/install/ubuntu/#uninstall-docker-engine
Problem: Snappy installation of docker was broken.

Related

CodeHaus Maven JAXB2 plugin error MojoExecutionException: NoSchemasException

I am trying to build my project ,in that i got error called [ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.4:xjc (One) on project tg-tg-tems-ota-common-service: : MojoExecutionException: NoSchemasException -> [Help 1]
we are using java8 ,apache maven 3.6.3 ,jaxb2 plugin 2.4
Please find below error
INFO] Building TravelGrid-Tems-Ota-Service 3.0.0-SNAPSHOT [2/3]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # tg-tg-tems-ota-common-service ---
[INFO]
[INFO] --- jaxb2-maven-plugin:2.4:xjc (One) # tg-tg-tems-ota-common-service ---
[INFO] Created EpisodePath [D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer\tg-tems-ota-common-service\target\generated-sources\jaxb\emt\hotelSearchRequest\META-INF\JAXB]: true
[INFO] Ignored given or default xjbSources [D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer\tg-tems-ota-common-service\src\main\xjb], since it is not an existent file or directory.
[INFO] Ignored given or default sources [D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer\tg-tems-ota-common-service\src\main\xsd], since it is not an existent file or directory.
[WARNING] No XSD files found. Please check your plugin configuration.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for tg-servicelayer 3.0.0-SNAPSHOT:
[INFO]
[INFO] tg-servicelayer .................................... SUCCESS [ 0.697 s]
[INFO] TravelGrid-Tems-Ota-Service ........................ FAILURE [ 0.909 s]
[INFO] TravelGrid-Subsystems .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.941 s
[INFO] Finished at: 2020-06-30T15:50:30+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:2.4:xjc (One) on project tg-tg-tems-ota-common-service: : MojoExecutionException: NoSchemasException -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :tg-tg-tems-ota-common-service
D:\Sushma_Project\TG_UPGRADATION\Project\branches\3.0.0-SNAPSHOT\tems\tg-tems-servicelayer>
I am new to jaxb plugin ,can anyone help me
Please user "mvn clean install" it will clean the target folder and regenerate everything from scratch.

Jenkins Maven integration failed

I am trying to integrate Jenkins with Maven. Through terminal I am able to execute the Maven command (clean install). But from Jenkins it fails.
Getting following error:
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building BrowserStackDemo 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # BrowserStackDemo ---
[INFO] Deleting /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.090 s
[INFO] Finished at: 2018-02-04T16:17:27+01:00
[INFO] Final Memory: 11M/190M
[INFO] ------------------------------------------------------------------------
**[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project BrowserStackDemo:** Failed to clean project: Failed to delete /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target/.DS_Store -> [Help 1]
[ERROR]
[JENKINS] Archiving /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml to BrowserStack/BrowserStackDemo/0.0.1-SNAPSHOT/BrowserStackDemo-0.0.1-SNAPSHOT.pom
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
/Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/pom.xml is not inside /Users/Shared/Jenkins/Home/workspace/MavenJenkinsIntegration1/Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/; will archive in a separate pass
[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/MojoExecutionException
channel stopped
Finished: FAILURE
Note:
I am not using any server like Tomcat. My problem is not able to delete the target folder from Jenkins, when ever I taken a clean build, target folder will create newly, so I am unable to give the access for the target folder.
Your Jenkins executor is unable to delete the target folder of project . The error statements points it out clearly.
*[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project BrowserStackDemo:** Failed to clean project: Failed to delete /Users/krishna/eclipse-workspace/Tools/LearnBroswserStack/target/.DS_Store -> [Help 1]
Such error occurs when the access to file is denied at the OS filesystem level OR the target folder's files are already being used somewhere in some other process and they are left in OPEN state. Try deleting the target folder manually.

Building SonarQube with maven and batch_boostrap/index cannot be found

I'm running mvn sonar:sonar in the directory of the project I'm running. I already have my pom.xml updated:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.7.1</version>
</plugin>
After running sudo mvn sonar:sonar (I am on ubuntu 14.04) in my terminal, I get the following error:
eschwartz#LATITUDE:~/ideaprojects/xQueryEngine$ sudo mvn sonar:sonar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xQueryEngine (Solr 4 REX) 1.11.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.7.1:sonar (default-cli) # xqe ---
[INFO] User cache: /root/.sonar/cache
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.854s
[INFO] Finished at: Wed Feb 17 15:56:59 EST 2016
[INFO] Final Memory: 17M/302M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project xqe: Fail to download libraries from server: Status returned by url : 'http://localhost:9000/batch_bootstrap/index' is invalid : 404 -> [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/MojoExecutionException
Anyone know how to fix this?
Thanks.
You have to set sonar.host.url=http://localhost:9000/sonar. You can do this by passing -Dsonar.host.url=... to mvn, or ideally set it in your Maven Global/Project Settings so that you don't always have to pass it as a command line argument.
Details: if your dashboard is at localhost:9000/sonar then it means you're using sonar.web.context=/sonar , which is different from the default (/). So you need to tell the scanner where to find SonarQube.

Allow Maven to automatically create directories in Ubuntu

I am running Maven 3.0.4 in Ubuntu 12.04. I have Java version 1.7.0_25. I am trying to use the mvn package command, but am continually running into errors, which are always along the lines of:
Failure executing javac, but could not parse the error:
javac: directory not found: /......../target/[some folder]
I couldn't figure out what this was originally but now understand from some basic googling that this is because the destination directory has to exist. The generally suggested way to handle this problem is to create an ant script which does it for you (I think).
However, I have no idea what folders actually need to be created. This is not my project I'm compiling, just something I've downloaded. Can an Ant script still be used and, if so, could anybody point me in the right direction as I have never used an ant script before, much less created one, and could quite accurately be called a Ubuntu "noob"!
Full Maven output as requested
Directory is:
flume-sources - containing
flume.conf
pom.xml
src
main
java
com
cloudera
flume
source
TwitterSource.java
TwitterSourceConstants.java
Maven error is:
andrew#andrew-VirtualBox:~/flume-sources$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flume-sources 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # flume-sources ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/andrew/flume-sources/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # flume-sources ---
[INFO] Compiling 2 source files to /home/andrew/flume-sources/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: directory not found: /home/andrew/flume-sources/target/classes
Usage: javac <options> <source files>
use -help for a list of possible options
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.470s
[INFO] Finished at: Mon Jul 08 12:35:58 BST 2013
[INFO] Final Memory: 9M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project flume-sources: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] javac: directory not found: /home/andrew/flume-sources/target/classes
[ERROR] Usage: javac <options> <source files>
[ERROR] use -help for a list of possible options
[ERROR] -> [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/MojoFailureException
andrew#andrew-VirtualBox:~/flume-sources$
No, you don't need to create the folder by hand or with an ant script.
If the target folder doesn't exist when you run mvn, it will create it
So my guess is that you have a permissions issue
The user running maven can't create folders in /home/andrew/flume-sources
just as a test, run mvn as root
sudo mvn package
if that works then it is what I said and you will need to 1) chown the folder so that the user running maven can create folders in it (rw) or 2) run mvn from the same user that owns the folder (which i'm guessing is andrew)

maven error BUILD FAILURE

I am following a maven tutorial. I am trying to execute this command which is my 1st maven command. Tutorial says it will crate a directory named my-app, but it didn't. This is command & its output,
command:
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
output:
C:\Users\Babar>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=m
y-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) # standalone-pom >>
>
[INFO]
[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) # standalone-pom <<
<
[INFO]
[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) # standalone-pom --
-
[INFO] Generating project in Batch mode
[INFO] -------------------------------------------------------------------------
---
[INFO] Using following parameters for creating project from Old (1.x) Archetype:
maven-archetype-quickstart:1.0
[INFO] -------------------------------------------------------------------------
---
[INFO] Parameter: groupId, Value: com.mycompany.app
[INFO] Parameter: packageName, Value: com.mycompany.app
[INFO] Parameter: package, Value: com.mycompany.app
[INFO] Parameter: artifactId, Value: my-app
[INFO] Parameter: basedir, Value: C:\Users\Babar
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.971s
[INFO] Finished at: Fri Nov 18 00:07:12 EET 2011
[INFO] Final Memory: 6M/11M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.1:generate (default-cli) on project standalone-pom: Directory my-app already ex
ists - please run from a clean directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
'cmd' is not recognized as an internal or external command,
operable program or batch file.
error msg says directory already exists but it's not. I execute this command more than oncw
EDIT
command(suggested in answer)
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archet
ypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPS
HOT
OUTPUT
C:\Users\Babar>mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archet
ypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPS
HOT
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.1:generate (default-cli) # standalone-pom >>
>
[INFO]
[INFO] <<< maven-archetype-plugin:2.1:generate (default-cli) # standalone-pom <<
<
[INFO]
[INFO] --- maven-archetype-plugin:2.1:generate (default-cli) # standalone-pom --
-
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from [org.apache.maven.archet
ypes:maven-archetype-quickstart:1.1] found in catalog remote
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.552s
[INFO] Finished at: Fri Nov 18 01:09:15 EET 2011
[INFO] Final Memory: 6M/12M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2
.1:generate (default-cli) on project standalone-pom: The desired archetype does
not exist (org.apache.maven.archetypes:maven-archetype-quickstart:5-SNAPSHOT) ->
[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
'cmd' is not recognized as an internal or external command,
operable program or batch file.
Close your eclipse
Delete the .m2 folder which shows the server connnection
Re-run your eclipse.
Try this one, it works for maven 3-3-9 for win7 32bit
mvn archetype:generate -DgroupId="com.mycompany.app" -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Try this :
mvn archetype:generate -DgroupId="com.mycompany.app" -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Your sentences have been modified -DgroupId="com.mycompany.app". You need to use double quotes.
I´ve worked on windows 8 and it works. I don´t know if it happens on Linux.
I faced the same issue, and I resolved by run the commond(MVN Clean) from inside the folder where pom.xml located. Please follow below steps:
Open Eclipse
Open your Maven project.
Right Click on pom.xml
Click on properties
5.Copy pom.xml location URL
Open cmd
Write and paste the pom.xml location in the cmd until before /pom.xml as below,
cd C:\Users\X\eclipse-workspace\Your project Name
Hit Enter.
Run mvn clean commond again.
You will note that the original error said
Directory my-app already exists - please run from a clean directory
Did you possibly run that command from a directory where there is already a Maven project (one with a pom.xml file)? If so please start with a clean location.
When I ran the command you used verbatim on an empty directory, it ran without error and created a directory called my-app.
This line is of concern:
[INFO] Using following parameters for creating project from Old (1.x)
Archetype: maven-archetype-quickstart:1.0
Looking at the maven docs page at http://maven.apache.org/archetype/maven-archetype-bundles/maven-archetype-quickstart/, i see that the command you should be using is:
mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPSHOT
Which is not exactly what you are running (you are missing the -DarchetypeVersion=5-SNAPSHOT part).

Resources