Thank you all. I think I got everything fairly set up. On Thu, Apr 21, 2022 at 9:26 PM Mohammed B <[email protected]> wrote:
> java version "14.0.1" 2020-04-14 > Java(TM) SE Runtime Environment (build 14.0.1+7) > Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing) > > Do you I need to change the path to point the bin folder of java 8 also? > > On Thu, Apr 21, 2022 at 9:18 PM Matt Sicker <[email protected]> wrote: > >> I'm not so sure about that; that's a fairly recently added test. >> What's the output you get for `java -version`? >> >> On Thu, Apr 21, 2022 at 1:15 PM Mohammed B <[email protected]> >> wrote: >> > >> > Ok now it's working but one of the tests is failing: >> > >> > [INFO] Running org.apache.logging.log4j.AbstractLoggerTest >> > [ERROR] Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: >> > 0.183 s <<< FAILURE! - in >> > org.apache.logging.log4j.util.ServiceLoaderUtilTest >> > [ERROR] >> > >> org.apache.logging.log4j.util.ServiceLoaderUtilTest.testBrokenServiceFile >> > Time elapsed: 0.107 s <<< FAILURE! >> > org.opentest4j.AssertionFailedError: expected: <2> but was: <3> >> > at >> > >> org.apache.logging.log4j.util.ServiceLoaderUtilTest.testBrokenServiceFile(ServiceLoaderUtilTest.java:85) >> > >> > Is this supposed to happen? >> > >> > On Thu, Apr 21, 2022 at 9:10 PM Matt Sicker <[email protected]> wrote: >> > >> > > Also set your JAVA_HOME to the Java 8 distribution when running maven >> > > here as many modules in 2.x assume they're compiled via Java 8, not >> > > via toolchains. >> > > >> > > On Thu, Apr 21, 2022 at 12:59 PM Mohammed B <[email protected]> >> > > wrote: >> > > > >> > > > I still get the same error. This is my toolchains.xml now: >> > > > >> > > > <toolchains> >> > > > <!-- JDK toolchains --> >> > > > <toolchain> >> > > > <type>jdk</type> >> > > > <provides> >> > > > <version>14</version> >> > > > <vendor>sun</vendor> >> > > > </provides> >> > > > <configuration> >> > > > <jdkHome>C:\Program Files\Java\jdk-14.0.1</jdkHome> >> > > > </configuration> >> > > > </toolchain> >> > > > <toolchain> >> > > > <type>jdk</type> >> > > > <provides> >> > > > <version>9</version> >> > > > <vendor>sun</vendor> >> > > > </provides> >> > > > <configuration> >> > > > <jdkHome>C:\Program Files\Java\jdk-14.0.1</jdkHome> >> > > > </configuration> >> > > > </toolchain> >> > > > <toolchain> >> > > > <type>jdk</type> >> > > > <provides> >> > > > <version>8</version> >> > > > <vendor>eclipse</vendor> >> > > > </provides> >> > > > <configuration> >> > > > <jdkHome>C:\Program Files\Eclipse >> > > Adoptium\jdk-8.0.322.6-hotspot</jdkHome> >> > > > </configuration> >> > > > </toolchain> >> > > > <toolchain> >> > > > <type>jdk</type> >> > > > <provides> >> > > > <version>1.8</version> >> > > > <vendor>eclipse</vendor> >> > > > </provides> >> > > > <configuration> >> > > > <jdkHome>C:\Program Files\Eclipse >> > > Adoptium\jdk-8.0.322.6-hotspot</jdkHome> >> > > > </configuration> >> > > > </toolchain> >> > > > >> > > > >> > > > <!-- other toolchains --> >> > > > </toolchains> >> > > > >> > > > I also get these warning: >> > > > >> > > > [WARNING] Unable to autodetect 'javac' path, using 'javac' from the >> > > > environment. >> > > > [INFO] ------------------------------------------------------------- >> > > > [WARNING] COMPILATION WARNING : >> > > > [INFO] ------------------------------------------------------------- >> > > > [WARNING] [options] bootstrap class path not set in conjunction with >> > > > -source 8 >> > > > >> > > > >> > > > On Thu, Apr 21, 2022 at 8:34 PM Matt Sicker <[email protected]> >> wrote: >> > > > >> > > > > What I've done in my own toolchains file before is setting a >> version >> > > > > of Java for both "1.8" and "8" along with an entry for version "9" >> > > > > (but pointing to Java 11) and "11". >> > > > > >> > > > > In the master branch, this test was since updated to stop >> referring to >> > > > > the removed class as that branch requires Java 11 as the base >> anyways. >> > > > > >> > > > > On Thu, Apr 21, 2022 at 12:29 PM Mohammed B < >> [email protected]> >> > > > > wrote: >> > > > > > >> > > > > > I replaced the tool chain of 14 with 8 and the build fails on >> the >> > > "API >> > > > > Java >> > > > > > 9 support" project. If I added both toolchains, I get the same >> error >> > > as >> > > > > > before. >> > > > > > >> > > > > > Here's how my toolchain.xml looks like now: >> > > > > > >> > > > > > <toolchains> >> > > > > > <!-- JDK toolchains --> >> > > > > > <toolchain> >> > > > > > <type>jdk</type> >> > > > > > <provides> >> > > > > > <version>14</version> >> > > > > > <vendor>sun</vendor> >> > > > > > </provides> >> > > > > > <configuration> >> > > > > > <jdkHome>C:\Program Files\Java\jdk-14.0.1</jdkHome> >> > > > > > </configuration> >> > > > > > </toolchain> >> > > > > > <toolchain> >> > > > > > <type>jdk</type> >> > > > > > <provides> >> > > > > > <version>8</version> >> > > > > > <vendor>eclipse</vendor> >> > > > > > </provides> >> > > > > > <configuration> >> > > > > > <jdkHome>C:\Program Files\Eclipse >> > > > > Adoptium\jdk-8.0.322.6-hotspot</jdkHome> >> > > > > > </configuration> >> > > > > > </toolchain> >> > > > > > >> > > > > > >> > > > > > <!-- other toolchains --> >> > > > > > </toolchains> >> > > > > > >> > > > > > On Thu, Apr 21, 2022 at 8:20 PM Gary Gregory < >> [email protected] >> > > > >> > > > > wrote: >> > > > > > >> > > > > > > Use Java 8 means just that so yes you have to download it ;-) >> > > > > > > >> > > > > > > Gary >> > > > > > > >> > > > > > > On Thu, Apr 21, 2022, 12:57 Mohammed Barayyan < >> > > [email protected] >> > > > > > >> > > > > > > wrote: >> > > > > > > >> > > > > > > > Does that mean I have to install JDK 8? or can I modify the >> > > > > toolchains or >> > > > > > > > the pom.xml to achieve that? >> > > > > > > > >> > > > > > > > On Thu, Apr 21, 2022 at 7:56 PM Gary Gregory < >> > > [email protected] >> > > > > > >> > > > > > > > wrote: >> > > > > > > > >> > > > > > > > > Use Java 8, not 14. >> > > > > > > > > >> > > > > > > > > Gary >> > > > > > > > > >> > > > > > > > > On Thu, Apr 21, 2022, 12:35 Mohammed Barayyan < >> > > > > [email protected] >> > > > > > > > >> > > > > > > > > wrote: >> > > > > > > > > >> > > > > > > > > > Hello, >> > > > > > > > > > >> > > > > > > > > > Any advice on the issue please. >> > > > > > > > > > >> > > > > > > > > > I'm trying to test and build branch 2.x from source but >> I >> > > get an >> > > > > > > error: >> > > > > > > > > > >> > > > > > > > > > error: cannot find symbol >> > > > > > > > > > [ERROR] symbol: class Reflection >> > > > > > > > > > [ERROR] location: package sun.reflect >> > > > > > > > > > >> > > > > > > > > > More details about my question in: >> > > > > > > > > > stackoverflow question <Hello, I'm trying to test and >> build >> > > > > branch >> > > > > > > 2.x >> > > > > > > > > from >> > > > > > > > > > source but I get an error: error: cannot find symbol >> [ERROR] >> > > > > symbol: >> > > > > > > > > class >> > > > > > > > > > Reflection [ERROR] location: package sun.reflect More >> details >> > > > > about >> > > > > > > my >> > > > > > > > > > question in: >> > > > > > > > > > >> > > > > > > > > > >> > > > > > > > > >> > > > > > > > >> > > > > > > >> > > > > >> > > >> https://stackoverflow.com/questions/71957458/building-and-testing-log4j2-from-source-fails-cannot-find-symbol-symbol-clas >> > > > > > > > > > > >> > > > > > > > > > >> > > > > > > > > > Thank you. >> > > > > > > > > > >> > > > > > > > > >> > > > > > > > >> > > > > > > >> > > > > >> > > >> >
