Spring-Boot project build fails if stored on Desktop MacOS - spring-boot

If I am trying to run my SpringBoot project while it is stored in any folder located on Desktop on my MacBook - build fails.
If I move project to any other directory except Desktop - it builds fine.
What can be the reason?
Error message after maven clean - install:
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # my-blog-springboot-v1 ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running ua.shamray.myblogspringbootv1.repository.AccountRepositoryTest
17:49:32.502 [main] DEBUG org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTestContextBootstrapper - Neither #ContextConfiguration nor #ContextHierarchy found for test class [AccountRepositoryTest]: using SpringBootContextLoader
17:49:32.508 [main] DEBUG org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [ua.shamray.myblogspringbootv1.repository.AccountRepositoryTest]: no resource found for suffixes {-context.xml, Context.groovy}.
17:49:32.509 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [ua.shamray.myblogspringbootv1.repository.AccountRepositoryTest]: AccountRepositoryTest does not declare any static, non-private, non-final, nested classes annotated with #Configuration.
17:49:32.804 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Failed to complete search in directory [/Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/test-classes/ua/shamray] for files matching pattern [*.class]: java.nio.file.NoSuchFileException: /Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/test-classes/ua/shamray
17:49:32.805 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Failed to complete search in directory [/Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/classes/ua/shamray] for files matching pattern [*.class]: java.nio.file.NoSuchFileException: /Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/classes/ua/shamray
17:49:32.806 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Failed to complete search in directory [/Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/test-classes/ua] for files matching pattern [*.class]: java.nio.file.NoSuchFileException: /Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/test-classes/ua
17:49:32.807 [main] DEBUG org.springframework.core.io.support.PathMatchingResourcePatternResolver - Failed to complete search in directory [/Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/classes/ua] for files matching pattern [*.class]: java.nio.file.NoSuchFileException: /Users/nikitashamray/Desktop/IDEA%20Projects/my-blog-springboot-v1/target/classes/ua
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.012 s <<< FAILURE! - in ua.shamray.myblogspringbootv1.MyBlogSpringbootV1ApplicationTests
[ERROR] ua.shamray.myblogspringbootv1.MyBlogSpringbootV1ApplicationTests Time elapsed: 0.012 s <<< ERROR!
java.lang.IllegalStateException: Unable to find a #SpringBootConfiguration, you need to use #ContextConfiguration or #SpringBootTest(classes=...) with your test
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] MyBlogSpringbootV1ApplicationTests » IllegalState Unable to find a #SpringBoot...
[ERROR] AccountControllerTest » IllegalState Unable to find a #SpringBootConfiguration...
[ERROR] AccountRepositoryTest » IllegalState Unable to find a #SpringBootConfiguration...
[ERROR] AccountServiceImplUnitTest » IllegalState Unable to find a #SpringBootConfigur...
[ERROR] MyUserDetailsServiceImplUnitTest » IllegalState Unable to find a #SpringBootCo...
[ERROR] PostServiceImpUnitTest » IllegalState Unable to find a #SpringBootConfiguratio...
[ERROR] RoleServiceImplUnitTest » IllegalState Unable to find a #SpringBootConfigurati...
[INFO]
[ERROR] Tests run: 7, Failures: 0, Errors: 7, Skipped: 0
[INFO]

Related

create spring boot 2.7 'mvn spring-boot:build-image' failed

Building docker image using spring-boot-maven-plugin failing.
[INFO] Retrying request to {}->docker://localhost:2376
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [2] No such file or directory
[INFO] Retrying request to {}->docker://localhost:2376
[INFO] > Pulling builder image 'docker.io/paketobuildpacks/builder:base' 100%
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.805 s
[INFO] Finished at: 2022-11-19T00:13:53+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.5:build-image (default-cli) on project demodocker: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.7.5:build-image failed: Connection to the Docker daemon at 'localhost' failed with error "[2] No such file or directory"; ensure the Docker daemon is running and accessible: com.sun.jna.LastErrorException: [2] No such file or directory -> [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/PluginExecutionException
build a docker image with spring-boot-maven-plugin not working.

protobuf java runtime installation

I'm trying to build the Java runtime library for Protocol Buffers on Windows. I have downloaded and installed the binary distribution of protoc: protoc-3.3.0-win32 . I have downloaded the protobuf-master from https://github.com/google/protobuf. and tried to build Java runtime library using Maven. I ran mvn test from D:\protobuf-master\java
These errors occured when I ran mvn test.
`[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] MapTest.testPut:1248 ╗ IllegalArgument
[ERROR] MapTest.testPutForUnknownEnumValues:494 ╗ IllegalArgument
[INFO]
[ERROR] Tests run: 908, Failures: 0, Errors: 2, Skipped: 0
[INFO]
[INFO] --------------------------------------------------------------------
----
[INFO] Reactor Summary:
[INFO]
[INFO] Protocol Buffers [Parent] .......................... SUCCESS [
0.000 s]
[INFO] Protocol Buffers [Core] ............................ FAILURE [01:23
min]
[INFO] Protocol Buffers [Util] ............................ SKIPPED
[INFO] --------------------------------------------------------------------
----
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------
----
[INFO] Total time: 01:24 min
[INFO] Finished at: 2017-06-27T20:40:21+02:00
[INFO] Final Memory: 32M/720M
[INFO] --------------------------------------------------------------------
----
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
plugin:2.20:test (default-test) on project protobuf-java: There are test
failures.
[ERROR]
[ERROR] Please refer to D:\protobuf-master\java\core\target\surefire-
reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump,
[date].dumpstream and [date]-jvmRun[N].dumpstream.
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :protobuf-java`
The behavior was changed after 3.3.0 so either checkout v3.3.0 or compile newer version of protoc.
Commit

Error while executing test via Jenkins

I'm having this error while running my test suite from jenkins and when i run in eclipse via Maven it's working fine,
I'm using the same pom.xml for jenkins which is giving this error:
Running TestSuite
INFO [main] (BrowserManager.java:124) - Connecting to http://chromedriver.storage.googleapis.com/ to check lastest chromedriver release
INFO [main] (BrowserManager.java:112) - Latest driver version: 2.9
INFO [main] (Downloader.java:56) - Binary driver previously downloaded /var/lib/jenkins/.m2/repository/webdriver/chromedriver/linux64/2.9/chromedriver
INFO [main] (Downloader.java:60) - Exporting webdriver.chrome.driver as /var/lib/jenkins/.m2/repository/webdriver/chromedriver/linux64/2.9/chromedriver
Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 2.904 sec <<< FAILURE! - in TestSuite
Setup(webautomation.GetApp) Time elapsed: 2.218 sec <<< FAILURE!
java.lang.NoClassDefFoundError: org/openqa/selenium/ElementNotSelectableException
at webautomation.GetApp.Setup(GetApp.java:57)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.ElementNotSelectableException
at webautomation.GetApp.Setup(GetApp.java:57)
Results :
Failed tests:
webautomation.GetApp.Setup(webautomation.GetApp)
Run 1: GetApp.Setup:57 » NoClassDefFound org/openqa/selenium/ElementNotSelectableExce...
Run 2: PASS
Tests run: 3, Failures: 1, Errors: 0, Skipped: 2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.671 s
[INFO] Finished at: 2016-10-06T17:27:37+05:00
[INFO] Final Memory: 26M/200M
[INFO] ------------------------------------------------------------------------

neo4j spark connector: mvn clean install assembly:single error

I am working on neo4j-spark connector. After cloning and moving to the directory, I did mvn clean install assembly:single. It throws error :
Tests in error:
runMatrixQueryDFSchema(org.neo4j.spark.Neo4jDataFrameTest): Job aborted due to stage failure: Task 0 in stage 3.0 failed 1 times, most recent failure: Lost task 0.0 in stage 3.0 (TID 12, localhost): java.util.NoSuchElementException: None.get
Tests run: 7, Failures: 0, Errors: 1, Skipped: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.538s
[INFO] Finished at: Wed Aug 24 19:18:07 IST 2016
[INFO] Final Memory: 72M/1016M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project neo4j-spark-connector: There are test failures.
[ERROR]
[ERROR] Please refer to /data/neo4j-spark-connector/target/surefire-reports for the individual test results.
[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
How do I get rid of it? Do I need to do anything else to build target/neo4j-spark-connector_2.11-full-2.0.0-M1.jar for Scala 2.11. I have installed Spark 2.0.0 installed. I have it saved in the directory same as that for neo4j-spark-connector. Do I need to save it somewhere else? How do I get it to work?
This issue has been resolved now. You can take latest pull from the neo4j-spark-connector repository and get it to work.
Thanks.

mvn install: Failure executing javac, but could not parse error

It's the first time I try using mavan and I got the following error when I issued "mvn install" (running on vista):
[ERROR] Failure executing javac, but could not parse the error:
C:\Users\Kaze Kun\.m2\respository\org\jboss\resteasy\resteasy-jaxrs\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar. error in opening zip file
I googled and found some threads about needing to set the JAVA_HOME environment variable. However, this seems not the case for me since I've already set my JAVA_HOME variable at C:\Java\jdk1.6.0_24. Just wondering what can be the cause of the problem?
Below is the more detail capture of the error messages from maven:
[WARNING] File encoding has not been set, using platform encoding MS932, i.e. bu
ild is platform dependent!
[INFO] Compiling 3 source files to C:\resteasy-jaxrs-2.2.1.GA\examples\oreilly-w
orkbook\ex03_1\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
エラー:C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxrs\2.2.1.
GA\resteasy-jaxrs-2.2.1.GA.jar の読み込みエラーです。error in opening zip file
エラー 1 個
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:22.828s
[INFO] Finished at: Sat Jul 09 11:11:17 CST 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project workbook-ex03_1: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] エラー:C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxr
s\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar の読み込みエラーです。error in opening zi
p file
[ERROR] エラー 1 個
[ERROR] -> [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]
C:\resteasy-jaxrs-2.2.1.GA\examples\oreilly-workbook\ex03_1>
The error seems to indicate that the resteasy-jaxrs-2.2.1.GA.jar is corrupt.
You should try deleting this file
C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxr
s\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar
and retrying.

Resources