Open ApurvaS28 opened 2 years ago
Hey. Thanks for raising an issue. Can I ask 2 questions. Are you running from the external open source artefacts or have you downloaded the archive zip?
If you could show me the content of your galasa preferences in eclipse. I can take a quick look today but will ensure the dev team see it tomorrow
Here i am Attaching the Galasa preferences screenshot.
For running the class i have just followed the steps mentioned in the galasa docs.
Hiya, I'm going to take a look at this issue now.
Hi @ApurvaS28, Could I just ask if you are trying to run the tests using the gradle or maven methods on the docs? Also do you mind showing me the version of maven you are running?
I am have been using maven methods .
Hi @ApurvaS28, I've managed to recreate this issue and after some investigation I've managed to narrow this issue down to version 17 of java. I would recommend using JDK version 11 or 8 for use with Galasa at this time. I will keep this issue open so that in the future the issue can be fixed.
23/11/2021 12:17:00.950 DEBUG dev.galasa.boot.Launcher.processCommandLine - Supplied command line arguments: --bootstrap file:///Users/reecewilliams/.galasa/bootstrap.properties --overrides file:///var/folders/_0/kf6t2v_913s50hzchbv6ln1c0000gn/T/galasa_eclipse_cache_662477892964121141/galasaoverrides15372393958336714253.properties --localmaven file:/Users/reecewilliams/.m2/repository/ --remotemaven https://repo.maven.apache.org/maven2/ --obr file:/Users/reecewilliams/TestEclipseWorkspace/.metadata/.plugins/dev.galasa.eclipse/workspace.obr --obr mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr --test dev.galasa.simbank.tests/dev.galasa.simbank.tests.SimBankIVT
23/11/2021 12:17:00.972 DEBUG dev.galasa.boot.Launcher.launch - OBR Repository Files: [file:/Users/reecewilliams/TestEclipseWorkspace/.metadata/.plugins/dev.galasa.eclipse/workspace.obr, mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr]
23/11/2021 12:17:00.972 DEBUG dev.galasa.boot.Launcher.launch - Launching Framework...
23/11/2021 12:17:00.972 DEBUG dev.galasa.boot.Launcher.buildFramework - Launching Framework...
23/11/2021 12:17:00.972 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Building Felix Framework...
java.lang.NoSuchMethodException: sun.misc.Unsafe.defineAnonymousClass(java.lang.Class,[B,[Ljava.lang.Object;)
at java.base/java.lang.Class.getMethod(Class.java:2227)
at org.apache.felix.framework.util.SecureAction.getAccessor(SecureAction.java:1134)
at org.apache.felix.framework.util.SecureAction.
So for clarity we think you are using the justJ 17 JDK that is shipped as part of eclipse. We have not yet tested with 17 and have based our testing on the adopt open JDK 8, 11, 16 versions. We are going to try an earlier release of Just J to see if the problem is isolated to 17. If you could install another JDK to try that would be great and should allow you to keep using Galasa. However we will keep this issue updated as we investigate more
A quick update on the status of this issue, we have now tried to use other versions of the JustJ installation and the problem seems to be isolated to the Java 17 version. We have suspicions that this issue is being cause by the sun.misc package however we cannot be certain at this time. For now we advise using a Java 8 or 11 JDK.
I tried it with the older version ,its working now.Thanks
Just a small update, I have discovered what is causing the issue within the Java 17 update with Galasa. I believe this JEP 403 describes the issue we have come across perfectly. I have not got a fix in hand for this at this time however we will investigate possible solutions going forwards.
I would like to request that the docs be updated with this, as I have spent a lot of time trying to fix this in my eclipse installation.
We will get this added. @CaroMac can you check the docs to see how clear this is and amend if possible?
@hobbit1983 . Yes, I will do this. Thank you.
This is the message displayed on the console:--------------------------------------
1/11/2021 18:22:44.112 ERROR dev.galasa.boot.Launcher.launch - Unable to run test class dev.galasa.boot.LauncherException: Unable to create and initialize Felix framework at dev.galasa.boot.Launcher.buildFramework(Launcher.java:204) at dev.galasa.boot.Launcher.launch(Launcher.java:147) at dev.galasa.boot.Launcher.main(Launcher.java:117) Caused by: dev.galasa.boot.LauncherException: Unable to load repository mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr at dev.galasa.boot.felix.FelixFramework.loadBundleRepositories(FelixFramework.java:770) at dev.galasa.boot.felix.FelixFramework.buildFramework(FelixFramework.java:109) at dev.galasa.boot.Launcher.buildFramework(Launcher.java:201) ... 2 more Caused by: java.net.MalformedURLException: unknown protocol: mvn at java.base/java.net.URL.(URL.java:681)
at java.base/java.net.URL.(URL.java:569)
at java.base/java.net.URL.(URL.java:516)
at org.apache.felix.bundlerepository.impl.RepositoryAdminImpl.addRepository(RepositoryAdminImpl.java:94)
at dev.galasa.boot.felix.FelixFramework.loadBundleRepositories(FelixFramework.java:768)
... 4 more
21/11/2021 18:22:44.113 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Stopping Felix framework
21/11/2021 18:22:44.137 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Felix framework stopped
21/11/2021 18:22:44.138 ERROR dev.galasa.boot.Launcher.main - Exiting launcher due to exception
dev.galasa.boot.LauncherException: Unable to create and initialize Felix framework
at dev.galasa.boot.Launcher.buildFramework(Launcher.java:204)
at dev.galasa.boot.Launcher.launch(Launcher.java:147)
at dev.galasa.boot.Launcher.main(Launcher.java:117)
Caused by: dev.galasa.boot.LauncherException: Unable to load repository mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr
at dev.galasa.boot.felix.FelixFramework.loadBundleRepositories(FelixFramework.java:770)
at dev.galasa.boot.felix.FelixFramework.buildFramework(FelixFramework.java:109)
at dev.galasa.boot.Launcher.buildFramework(Launcher.java:201)
... 2 more
Caused by: java.net.MalformedURLException: unknown protocol: mvn
at java.base/java.net.URL.(URL.java:681)
at java.base/java.net.URL.(URL.java:569)
at java.base/java.net.URL.(URL.java:516)
at org.apache.felix.bundlerepository.impl.RepositoryAdminImpl.addRepository(RepositoryAdminImpl.java:94)
at dev.galasa.boot.felix.FelixFramework.loadBundleRepositories(FelixFramework.java:768)
... 4 more
How can i resolve this?