Maven jdk Error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven jdk Error

Oguz
Hi,
I got this error when I changed jdk to 14
 
(PreviewFailed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on
project Cookies: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The
forked VM terminated without saying properly goodbye. VM crash or
System.exit called ?
 
Here is my output when I deployed
 
/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java
-Dmaven.multiModuleProjectDirectory=/Users/oguzkeremyildiz/Dropbox/Cookies
"-Dmaven.home=/Applications/IntelliJ
IDEA.app/Contents/plugins/maven/lib/maven3"
"-Dclassworlds.conf=/Applications/IntelliJ
IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf"
"-Dmaven.ext.class.path=/Applications/IntelliJ
IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar"
"-javaagent:/Applications/IntelliJ
IDEA.app/Contents/lib/idea_rt.jar=58562:/Applications/IntelliJ
IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
"/Applications/IntelliJ
IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ
IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar"
org.codehaus.classworlds.Launcher -Didea.version2020.1.1 deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< io.github.oguzkeremyildiz:Cookies
>-----------------
[INFO] Building Cookies 1.2.4
[INFO] -------------------------------[ jar
]--------------------------------
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ Cookies

[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ Cookies —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @
Cookies —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/Users/oguzkeremyildiz/Dropbox/Cookies/src/test/resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @
Cookies —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ Cookies —
[INFO] Surefire report directory:
/Users/oguzkeremyildiz/Dropbox/Cookies/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
org.apache.maven.surefire.util.SurefireReflectionException:
java.lang.reflect.InvocationTargetException; nested exception is
java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.UnsupportedClassVersionError: Preview features are not
enabled for Test (class file version 58.65535). Try running with
'--enable-preview'
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at
java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at
java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
at
java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
at
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
at
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at
org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
at
org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
at
org.apache.maven.surefire.junit.JUnit3Provider.scanClassPath(JUnit3Provider.java:128)
at
org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:79)
... 9 more
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4.223 s
[INFO] Finished at: 2020-05-14T21:33:21+03:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on
project Cookies: Execution default-test of goal
org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The
forked VM terminated without saying properly goodbye. VM crash or
System.exit called ? -> [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
 
Thank you.



--
Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Maven jdk Error

Karl Heinz Marbaise-3
On 14.05.20 22:43, Oguz wrote:

> Hi,
> I got this error when I changed jdk to 14
>
> (PreviewFailed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on
> project Cookies: Execution default-test of goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The
> forked VM terminated without saying properly goodbye. VM crash or
> System.exit called ?
>
> Here is my output when I deployed
>
> /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java
> -Dmaven.multiModuleProjectDirectory=/Users/oguzkeremyildiz/Dropbox/Cookies
> "-Dmaven.home=/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3"
> "-Dclassworlds.conf=/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf"
> "-Dmaven.ext.class.path=/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar"
> "-javaagent:/Applications/IntelliJ
> IDEA.app/Contents/lib/idea_rt.jar=58562:/Applications/IntelliJ
> IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
> "/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar"
> org.codehaus.classworlds.Launcher -Didea.version2020.1.1 deploy
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ----------------< io.github.oguzkeremyildiz:Cookies
>> -----------------
> [INFO] Building Cookies 1.2.4
> [INFO] -------------------------------[ jar
> ]--------------------------------
> [INFO]
> [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ Cookies
> —
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO]
> [INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ Cookies —
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @
> Cookies —
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> /Users/oguzkeremyildiz/Dropbox/Cookies/src/test/resources
> [INFO]
> [INFO] — maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @
> Cookies —
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ Cookies —
> [INFO] Surefire report directory:
> /Users/oguzkeremyildiz/Dropbox/Cookies/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> org.apache.maven.surefire.util.SurefireReflectionException:
> java.lang.reflect.InvocationTargetException; nested exception is
> java.lang.reflect.InvocationTargetException: null
> java.lang.reflect.InvocationTargetException
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Caused by: java.lang.UnsupportedClassVersionError: Preview features are not
> enabled for Test (class file version 58.65535). Try running with
> '--enable-preview'
> at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
> at
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
> at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> at
> org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
> at
> org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
> at
> org.apache.maven.surefire.junit.JUnit3Provider.scanClassPath(JUnit3Provider.java:128)
> at
> org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:79)
> ... 9 more
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4.223 s
> [INFO] Finished at: 2020-05-14T21:33:21+03:00
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on
> project Cookies: Execution default-test of goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The
> forked VM terminated without saying properly goodbye. VM crash or
> System.exit called ? -> [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
>
> Thank you.
>
>
>
> --
> Sent from: http://maven.40175.n5.nabble.com/Maven-Users-f40176.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


Mit freundlichem Gruß
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz Marbaise        USt.IdNr: DE191347579
Hauptstrasse 177
52146 Würselen                           https://www.soebes.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Maven jdk Error

Karl Heinz Marbaise-3
In reply to this post by Oguz
Hi,

sorry my first message I pressed the button wrongly.

Can you please upgrade the surefire version cause you are using a very
old one...

Also if you want to go JDK 14 I recommend to upgrade other plugins as well.

Kind regards
Karl Heinz Marbaise
On 14.05.20 22:43, Oguz wrote:

> Hi,
> I got this error when I changed jdk to 14
>
> (PreviewFailed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on
> project Cookies: Execution default-test of goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The
> forked VM terminated without saying properly goodbye. VM crash or
> System.exit called ?
>
> Here is my output when I deployed
>
> /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java
> -Dmaven.multiModuleProjectDirectory=/Users/oguzkeremyildiz/Dropbox/Cookies
> "-Dmaven.home=/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3"
> "-Dclassworlds.conf=/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf"
> "-Dmaven.ext.class.path=/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar"
> "-javaagent:/Applications/IntelliJ
> IDEA.app/Contents/lib/idea_rt.jar=58562:/Applications/IntelliJ
> IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath
> "/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ
> IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar"
> org.codehaus.classworlds.Launcher -Didea.version2020.1.1 deploy
> [INFO] Scanning for projects...
> [INFO]
> [INFO] ----------------< io.github.oguzkeremyildiz:Cookies
>> -----------------
> [INFO] Building Cookies 1.2.4
> [INFO] -------------------------------[ jar
> ]--------------------------------
> [INFO]
> [INFO] — maven-resources-plugin:2.6:resources (default-resources) @ Cookies
> —
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 0 resource
> [INFO]
> [INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ Cookies —
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @
> Cookies —
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> /Users/oguzkeremyildiz/Dropbox/Cookies/src/test/resources
> [INFO]
> [INFO] — maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @
> Cookies —
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] — maven-surefire-plugin:2.12.4:test (default-test) @ Cookies —
> [INFO] Surefire report directory:
> /Users/oguzkeremyildiz/Dropbox/Cookies/target/surefire-reports
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> org.apache.maven.surefire.util.SurefireReflectionException:
> java.lang.reflect.InvocationTargetException; nested exception is
> java.lang.reflect.InvocationTargetException: null
> java.lang.reflect.InvocationTargetException
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
> at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
> at
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
> Caused by: java.lang.UnsupportedClassVersionError: Preview features are not
> enabled for Test (class file version 58.65535). Try running with
> '--enable-preview'
> at java.base/java.lang.ClassLoader.defineClass1(Native Method)
> at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
> at
> java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
> at
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
> at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
> at
> org.apache.maven.surefire.util.DefaultScanResult.loadClass(DefaultScanResult.java:131)
> at
> org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:95)
> at
> org.apache.maven.surefire.junit.JUnit3Provider.scanClassPath(JUnit3Provider.java:128)
> at
> org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:79)
> ... 9 more
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4.223 s
> [INFO] Finished at: 2020-05-14T21:33:21+03:00
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on
> project Cookies: Execution default-test of goal
> org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The
> forked VM terminated without saying properly goodbye. VM crash or
> System.exit called ? -> [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
>
> Thank you.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Maven jdk Error

Thorsten Heit
In reply to this post by Oguz
Hi,

> Here is my output when I deployed
(...)
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
(...)
> Caused by: java.lang.UnsupportedClassVersionError: Preview features
are not
> enabled for Test (class file version 58.65535). Try running with
> '--enable-preview'

This is the root cause of the error you're getting. See for example this
for a way to fix this:

https://blog.codefx.org/java/enable-preview-language-features/


HTH

Thorsten


signature.asc (849 bytes) Download Attachment