Re: ***UNCHECKED*** Re: ClassNotFoundException: LogService
Kirk and I tracked this down. He had a GEODE_HOME environment variable which the locator was picking up and finding an old war file from. -Dan On Fri, Nov 1, 2019 at 4:16 PM Dan Smith wrote: > Hi Kirk, > > Did you do a ./gradlew clean? It looks like you might be picking up an old > version of one of the geode war files that is referring to the old location > of the LogService class. > > -Dan > > On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > > > To reproduce, drop this new test in geode-dunit/src/distributedTest/java > > and then run it in IntelliJ or however you want. > > > > It passes, but if you search through the output you'll find the error in > my > > first message with: > > > > Caused by: java.lang.ClassNotFoundException: > > *org.apache.geode.internal.logging.LogService* > > at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > at > > > > > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > ... 88 more > > > > /* > > * Licensed to the Apache Software Foundation (ASF) under one or more > > contributor license > > * agreements. See the NOTICE file distributed with this work for > > additional information regarding > > * copyright ownership. The ASF licenses this file to You under the > Apache > > License, Version 2.0 (the > > * "License"); you may not use this file except in compliance with the > > License. You may obtain a > > * copy of the License at > > * > > * http://www.apache.org/licenses/LICENSE-2.0 > > * > > * Unless required by applicable law or agreed to in writing, software > > distributed under the License > > * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS > OF > > ANY KIND, either express > > * or implied. See the License for the specific language governing > > permissions and limitations under > > * the License. > > */ > > package org.apache.geode.test.dunit.examples; > > > > import static > > org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; > > import static > > org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; > > import static org.apache.geode.internal.AvailablePort.SOCKET; > > import static > > org.apache.geode.internal.AvailablePort.getRandomAvailablePort; > > import static org.apache.geode.test.dunit.VM.getVM; > > import static org.assertj.core.api.Assertions.assertThat; > > > > import java.io.Serializable; > > > > import org.junit.After; > > import org.junit.Before; > > import org.junit.Rule; > > import org.junit.Test; > > > > import org.apache.geode.distributed.LocatorLauncher; > > import org.apache.geode.test.dunit.rules.DistributedRule; > > import > > > org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; > > > > public class LocatorLauncherDistributedTest implements Serializable { > > > > private static LocatorLauncher locatorLauncher; > > > > @Rule > > public DistributedRule distributedRule = new DistributedRule(); > > > > @Rule > > public SerializableTemporaryFolder temporaryFolder = new > > SerializableTemporaryFolder(); > > > > @Before > > public void setUp() { > > String name = getClass().getSimpleName(); > > int port = getRandomAvailablePort(SOCKET); > > > > getVM(0).invoke(() -> { > > locatorLauncher = new LocatorLauncher.Builder() > > > > .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) > > .setMemberName(name) > > .setPort(port) > > .set(HTTP_SERVICE_PORT, "0") > > .set(JMX_MANAGER_PORT, "0") > > .build(); > > locatorLauncher.start(); > > }); > > } > > > > @After > > public void tearDown() { > > getVM(0).invoke(() -> { > > locatorLauncher.stop(); > > }); > > } > > > > @Test > > public void isRunning() { > > getVM(0).invoke(() -> { > > assertThat(locatorLauncher.isRunning()).isTrue(); > > }); > > } > > } > > > > > > On Fri, Nov 1, 2019 at 3:02 PM Kirk Lund wrote: > > > > > I'm seeing ClassNotFoundExceptions for FQN of the old package of the > > > LogService: > > > > > > [locator] Caused by: java.lang.ClassNotFoundException: > > > *org.apache.geode.internal.logging.LogService* > > > [locator] at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > > > > > The above is interesting because it's the old package, not the current > > > one. The current package is > > > *org.apache.geode.logging.internal.log4j.api.LogService*. > > > > > > There are two related commits and I'm wondering if something didn't get > > > completed or merged correctly. Do we need to revert any of these? > Anyone > > > working on this? > > > > > > commit
Re: ***UNCHECKED*** Re: ClassNotFoundException: LogService
I filed https://issues.apache.org/jira/browse/GEODE-7403 and I'm currently trying to: a) determine if it reproduces in both CLI and IntelliJ (IntelliJ so far with a clean checkout of develop) b) determine why an error-level log message logged by the background dunit locator is not causing a LogConsumer (grep-for-suspects) to fail Note: I cleaned up the stack trace in GEODE-7403 and it's clear that it's logged when the background dunit locator tries to start the cluster management service. I'll update GEODE-7403 as I learn more. On Mon, Nov 4, 2019 at 9:39 AM Robert Houghton wrote: > Kirk, will you craft a Jira about this for the "Build" component, and > assign it to me? > > On Mon, Nov 4, 2019, 09:30 Kirk Lund wrote: > > > If it is picking up an old version of geode then it's doing so because we > > use old versions for upgrade/backwards testing. The only old versions of > > the jars I have are the ones that our build pulls down for the upgrade > > tests. These old versions do tend confuse intellij so it's possible it's > a > > problem only in intellij. Since I use the debugger a lot, I use IntelliJ > a > > lot and I believe it's vital we keep IntelliJ working for geode for > > everyone. > > > > On Fri, Nov 1, 2019 at 4:16 PM Dan Smith wrote: > > > > > Hi Kirk, > > > > > > Did you do a ./gradlew clean? It looks like you might be picking up an > > old > > > version of one of the geode war files that is referring to the old > > location > > > of the LogService class. > > > > > > -Dan > > > > > > On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > > > > > > > To reproduce, drop this new test in > > geode-dunit/src/distributedTest/java > > > > and then run it in IntelliJ or however you want. > > > > > > > > It passes, but if you search through the output you'll find the error > > in > > > my > > > > first message with: > > > > > > > > Caused by: java.lang.ClassNotFoundException: > > > > *org.apache.geode.internal.logging.LogService* > > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > > > at > > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > > > at > > > > > > > > > > > > > > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > > > ... 88 more > > > > > > > > /* > > > > * Licensed to the Apache Software Foundation (ASF) under one or more > > > > contributor license > > > > * agreements. See the NOTICE file distributed with this work for > > > > additional information regarding > > > > * copyright ownership. The ASF licenses this file to You under the > > > Apache > > > > License, Version 2.0 (the > > > > * "License"); you may not use this file except in compliance with > the > > > > License. You may obtain a > > > > * copy of the License at > > > > * > > > > * http://www.apache.org/licenses/LICENSE-2.0 > > > > * > > > > * Unless required by applicable law or agreed to in writing, > software > > > > distributed under the License > > > > * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR > CONDITIONS > > > OF > > > > ANY KIND, either express > > > > * or implied. See the License for the specific language governing > > > > permissions and limitations under > > > > * the License. > > > > */ > > > > package org.apache.geode.test.dunit.examples; > > > > > > > > import static > > > > > org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; > > > > import static > > > > > org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; > > > > import static org.apache.geode.internal.AvailablePort.SOCKET; > > > > import static > > > > org.apache.geode.internal.AvailablePort.getRandomAvailablePort; > > > > import static org.apache.geode.test.dunit.VM.getVM; > > > > import static org.assertj.core.api.Assertions.assertThat; > > > > > > > > import java.io.Serializable; > > > > > > > > import org.junit.After; > > > > import org.junit.Before; > > > > import org.junit.Rule; > > > > import org.junit.Test; > > > > > > > > import org.apache.geode.distributed.LocatorLauncher; > > > > import org.apache.geode.test.dunit.rules.DistributedRule; > > > > import > > > > > > > > > > org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; > > > > > > > > public class LocatorLauncherDistributedTest implements Serializable { > > > > > > > > private static LocatorLauncher locatorLauncher; > > > > > > > > @Rule > > > > public DistributedRule distributedRule = new DistributedRule(); > > > > > > > > @Rule > > > > public SerializableTemporaryFolder temporaryFolder = new > > > > SerializableTemporaryFolder(); > > > > > > > > @Before > > > > public void setUp() { > > > > String name = getClass().getSimpleName(); > > > > int port =
Re: ***UNCHECKED*** Re: ClassNotFoundException: LogService
Kirk, will you craft a Jira about this for the "Build" component, and assign it to me? On Mon, Nov 4, 2019, 09:30 Kirk Lund wrote: > If it is picking up an old version of geode then it's doing so because we > use old versions for upgrade/backwards testing. The only old versions of > the jars I have are the ones that our build pulls down for the upgrade > tests. These old versions do tend confuse intellij so it's possible it's a > problem only in intellij. Since I use the debugger a lot, I use IntelliJ a > lot and I believe it's vital we keep IntelliJ working for geode for > everyone. > > On Fri, Nov 1, 2019 at 4:16 PM Dan Smith wrote: > > > Hi Kirk, > > > > Did you do a ./gradlew clean? It looks like you might be picking up an > old > > version of one of the geode war files that is referring to the old > location > > of the LogService class. > > > > -Dan > > > > On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > > > > > To reproduce, drop this new test in > geode-dunit/src/distributedTest/java > > > and then run it in IntelliJ or however you want. > > > > > > It passes, but if you search through the output you'll find the error > in > > my > > > first message with: > > > > > > Caused by: java.lang.ClassNotFoundException: > > > *org.apache.geode.internal.logging.LogService* > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > > at > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > > at > > > > > > > > > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > > ... 88 more > > > > > > /* > > > * Licensed to the Apache Software Foundation (ASF) under one or more > > > contributor license > > > * agreements. See the NOTICE file distributed with this work for > > > additional information regarding > > > * copyright ownership. The ASF licenses this file to You under the > > Apache > > > License, Version 2.0 (the > > > * "License"); you may not use this file except in compliance with the > > > License. You may obtain a > > > * copy of the License at > > > * > > > * http://www.apache.org/licenses/LICENSE-2.0 > > > * > > > * Unless required by applicable law or agreed to in writing, software > > > distributed under the License > > > * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS > > OF > > > ANY KIND, either express > > > * or implied. See the License for the specific language governing > > > permissions and limitations under > > > * the License. > > > */ > > > package org.apache.geode.test.dunit.examples; > > > > > > import static > > > org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; > > > import static > > > org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; > > > import static org.apache.geode.internal.AvailablePort.SOCKET; > > > import static > > > org.apache.geode.internal.AvailablePort.getRandomAvailablePort; > > > import static org.apache.geode.test.dunit.VM.getVM; > > > import static org.assertj.core.api.Assertions.assertThat; > > > > > > import java.io.Serializable; > > > > > > import org.junit.After; > > > import org.junit.Before; > > > import org.junit.Rule; > > > import org.junit.Test; > > > > > > import org.apache.geode.distributed.LocatorLauncher; > > > import org.apache.geode.test.dunit.rules.DistributedRule; > > > import > > > > > > org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; > > > > > > public class LocatorLauncherDistributedTest implements Serializable { > > > > > > private static LocatorLauncher locatorLauncher; > > > > > > @Rule > > > public DistributedRule distributedRule = new DistributedRule(); > > > > > > @Rule > > > public SerializableTemporaryFolder temporaryFolder = new > > > SerializableTemporaryFolder(); > > > > > > @Before > > > public void setUp() { > > > String name = getClass().getSimpleName(); > > > int port = getRandomAvailablePort(SOCKET); > > > > > > getVM(0).invoke(() -> { > > > locatorLauncher = new LocatorLauncher.Builder() > > > > > > .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) > > > .setMemberName(name) > > > .setPort(port) > > > .set(HTTP_SERVICE_PORT, "0") > > > .set(JMX_MANAGER_PORT, "0") > > > .build(); > > > locatorLauncher.start(); > > > }); > > > } > > > > > > @After > > > public void tearDown() { > > > getVM(0).invoke(() -> { > > > locatorLauncher.stop(); > > > }); > > > } > > > > > > @Test > > > public void isRunning() { > > > getVM(0).invoke(() -> { > > > assertThat(locatorLauncher.isRunning()).isTrue(); > > > }); > > > } > > > } > > > > > > > > > On Fri, Nov 1, 2019 at 3:02 PM Kirk
Re: ***UNCHECKED*** Re: ClassNotFoundException: LogService
If it is picking up an old version of geode then it's doing so because we use old versions for upgrade/backwards testing. The only old versions of the jars I have are the ones that our build pulls down for the upgrade tests. These old versions do tend confuse intellij so it's possible it's a problem only in intellij. Since I use the debugger a lot, I use IntelliJ a lot and I believe it's vital we keep IntelliJ working for geode for everyone. On Fri, Nov 1, 2019 at 4:16 PM Dan Smith wrote: > Hi Kirk, > > Did you do a ./gradlew clean? It looks like you might be picking up an old > version of one of the geode war files that is referring to the old location > of the LogService class. > > -Dan > > On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > > > To reproduce, drop this new test in geode-dunit/src/distributedTest/java > > and then run it in IntelliJ or however you want. > > > > It passes, but if you search through the output you'll find the error in > my > > first message with: > > > > Caused by: java.lang.ClassNotFoundException: > > *org.apache.geode.internal.logging.LogService* > > at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > at > > > > > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > > ... 88 more > > > > /* > > * Licensed to the Apache Software Foundation (ASF) under one or more > > contributor license > > * agreements. See the NOTICE file distributed with this work for > > additional information regarding > > * copyright ownership. The ASF licenses this file to You under the > Apache > > License, Version 2.0 (the > > * "License"); you may not use this file except in compliance with the > > License. You may obtain a > > * copy of the License at > > * > > * http://www.apache.org/licenses/LICENSE-2.0 > > * > > * Unless required by applicable law or agreed to in writing, software > > distributed under the License > > * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS > OF > > ANY KIND, either express > > * or implied. See the License for the specific language governing > > permissions and limitations under > > * the License. > > */ > > package org.apache.geode.test.dunit.examples; > > > > import static > > org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; > > import static > > org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; > > import static org.apache.geode.internal.AvailablePort.SOCKET; > > import static > > org.apache.geode.internal.AvailablePort.getRandomAvailablePort; > > import static org.apache.geode.test.dunit.VM.getVM; > > import static org.assertj.core.api.Assertions.assertThat; > > > > import java.io.Serializable; > > > > import org.junit.After; > > import org.junit.Before; > > import org.junit.Rule; > > import org.junit.Test; > > > > import org.apache.geode.distributed.LocatorLauncher; > > import org.apache.geode.test.dunit.rules.DistributedRule; > > import > > > org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; > > > > public class LocatorLauncherDistributedTest implements Serializable { > > > > private static LocatorLauncher locatorLauncher; > > > > @Rule > > public DistributedRule distributedRule = new DistributedRule(); > > > > @Rule > > public SerializableTemporaryFolder temporaryFolder = new > > SerializableTemporaryFolder(); > > > > @Before > > public void setUp() { > > String name = getClass().getSimpleName(); > > int port = getRandomAvailablePort(SOCKET); > > > > getVM(0).invoke(() -> { > > locatorLauncher = new LocatorLauncher.Builder() > > > > .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) > > .setMemberName(name) > > .setPort(port) > > .set(HTTP_SERVICE_PORT, "0") > > .set(JMX_MANAGER_PORT, "0") > > .build(); > > locatorLauncher.start(); > > }); > > } > > > > @After > > public void tearDown() { > > getVM(0).invoke(() -> { > > locatorLauncher.stop(); > > }); > > } > > > > @Test > > public void isRunning() { > > getVM(0).invoke(() -> { > > assertThat(locatorLauncher.isRunning()).isTrue(); > > }); > > } > > } > > > > > > On Fri, Nov 1, 2019 at 3:02 PM Kirk Lund wrote: > > > > > I'm seeing ClassNotFoundExceptions for FQN of the old package of the > > > LogService: > > > > > > [locator] Caused by: java.lang.ClassNotFoundException: > > > *org.apache.geode.internal.logging.LogService* > > > [locator] at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > > > > > The above is interesting because it's the old package, not the current > > > one. The current
Re: ClassNotFoundException: LogService
And yes, I do ./gradlew clean daily despite previously being told not to on this list. I will make sure that dunit suspect string grep is working on the background locator JVM in dunit. If it's not (which I suspect) then it'll start failing on that stack when I fix suspect-grep. On Fri, Nov 1, 2019 at 4:22 PM Dan Smith wrote: > Your test passes for me, btw. > > -Dan > > On Fri, Nov 1, 2019 at 4:14 PM Dan Smith wrote: > > > Hi Kirk, > > > > Did you do a ./gradlew clean? It looks like you might be picking up an > old > > version of one of the geode war files that is referring to the old > location > > of the LogService class. > > > > -Dan > > > > On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > > > >> To reproduce, drop this new test in geode-dunit/src/distributedTest/java > >> and then run it in IntelliJ or however you want. > >> > >> It passes, but if you search through the output you'll find the error in > >> my > >> first message with: > >> > >> Caused by: java.lang.ClassNotFoundException: > >> *org.apache.geode.internal.logging.LogService* > >> at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > >> at > >> > >> > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > >> ... 88 more > >> > >> /* > >> * Licensed to the Apache Software Foundation (ASF) under one or more > >> contributor license > >> * agreements. See the NOTICE file distributed with this work for > >> additional information regarding > >> * copyright ownership. The ASF licenses this file to You under the > Apache > >> License, Version 2.0 (the > >> * "License"); you may not use this file except in compliance with the > >> License. You may obtain a > >> * copy of the License at > >> * > >> * http://www.apache.org/licenses/LICENSE-2.0 > >> * > >> * Unless required by applicable law or agreed to in writing, software > >> distributed under the License > >> * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS > OF > >> ANY KIND, either express > >> * or implied. See the License for the specific language governing > >> permissions and limitations under > >> * the License. > >> */ > >> package org.apache.geode.test.dunit.examples; > >> > >> import static > >> org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; > >> import static > >> org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; > >> import static org.apache.geode.internal.AvailablePort.SOCKET; > >> import static > >> org.apache.geode.internal.AvailablePort.getRandomAvailablePort; > >> import static org.apache.geode.test.dunit.VM.getVM; > >> import static org.assertj.core.api.Assertions.assertThat; > >> > >> import java.io.Serializable; > >> > >> import org.junit.After; > >> import org.junit.Before; > >> import org.junit.Rule; > >> import org.junit.Test; > >> > >> import org.apache.geode.distributed.LocatorLauncher; > >> import org.apache.geode.test.dunit.rules.DistributedRule; > >> import > >> > >> > org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; > >> > >> public class LocatorLauncherDistributedTest implements Serializable { > >> > >> private static LocatorLauncher locatorLauncher; > >> > >> @Rule > >> public DistributedRule distributedRule = new DistributedRule(); > >> > >> @Rule > >> public SerializableTemporaryFolder temporaryFolder = new > >> SerializableTemporaryFolder(); > >> > >> @Before > >> public void setUp() { > >> String name = getClass().getSimpleName(); > >> int port = getRandomAvailablePort(SOCKET); > >> > >> getVM(0).invoke(() -> { > >> locatorLauncher = new LocatorLauncher.Builder() > >> > >> .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) > >> .setMemberName(name) > >> .setPort(port) > >> .set(HTTP_SERVICE_PORT, "0") > >> .set(JMX_MANAGER_PORT, "0") > >> .build(); > >> locatorLauncher.start(); > >> }); > >> } > >> > >> @After > >> public void tearDown() { > >> getVM(0).invoke(() -> { > >> locatorLauncher.stop(); > >> }); > >> } > >> > >> @Test > >> public void isRunning() { > >> getVM(0).invoke(() -> { > >> assertThat(locatorLauncher.isRunning()).isTrue(); > >> }); > >> } > >> } > >> > >> > >> On Fri, Nov 1, 2019 at 3:02 PM Kirk Lund wrote: > >> > >> > I'm seeing ClassNotFoundExceptions for FQN of the old package of the > >> > LogService: > >> > > >> > [locator] Caused by: java.lang.ClassNotFoundException: > >> > *org.apache.geode.internal.logging.LogService* > >> > [locator] at > java.net.URLClassLoader.findClass(URLClassLoader.java:382) > >> > > >> > The above is
Re: ClassNotFoundException: LogService
Yes, it passes for me always, too, as I said. But the background locator JVM logs that scary stack trace about not finding LogService in the wrong package. Could you please look more closely? On Fri, Nov 1, 2019 at 4:22 PM Dan Smith wrote: > Your test passes for me, btw. > > -Dan > > On Fri, Nov 1, 2019 at 4:14 PM Dan Smith wrote: > > > Hi Kirk, > > > > Did you do a ./gradlew clean? It looks like you might be picking up an > old > > version of one of the geode war files that is referring to the old > location > > of the LogService class. > > > > -Dan > > > > On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > > > >> To reproduce, drop this new test in geode-dunit/src/distributedTest/java > >> and then run it in IntelliJ or however you want. > >> > >> It passes, but if you search through the output you'll find the error in > >> my > >> first message with: > >> > >> Caused by: java.lang.ClassNotFoundException: > >> *org.apache.geode.internal.logging.LogService* > >> at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > >> at > >> > >> > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > >> ... 88 more > >> > >> /* > >> * Licensed to the Apache Software Foundation (ASF) under one or more > >> contributor license > >> * agreements. See the NOTICE file distributed with this work for > >> additional information regarding > >> * copyright ownership. The ASF licenses this file to You under the > Apache > >> License, Version 2.0 (the > >> * "License"); you may not use this file except in compliance with the > >> License. You may obtain a > >> * copy of the License at > >> * > >> * http://www.apache.org/licenses/LICENSE-2.0 > >> * > >> * Unless required by applicable law or agreed to in writing, software > >> distributed under the License > >> * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS > OF > >> ANY KIND, either express > >> * or implied. See the License for the specific language governing > >> permissions and limitations under > >> * the License. > >> */ > >> package org.apache.geode.test.dunit.examples; > >> > >> import static > >> org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; > >> import static > >> org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; > >> import static org.apache.geode.internal.AvailablePort.SOCKET; > >> import static > >> org.apache.geode.internal.AvailablePort.getRandomAvailablePort; > >> import static org.apache.geode.test.dunit.VM.getVM; > >> import static org.assertj.core.api.Assertions.assertThat; > >> > >> import java.io.Serializable; > >> > >> import org.junit.After; > >> import org.junit.Before; > >> import org.junit.Rule; > >> import org.junit.Test; > >> > >> import org.apache.geode.distributed.LocatorLauncher; > >> import org.apache.geode.test.dunit.rules.DistributedRule; > >> import > >> > >> > org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; > >> > >> public class LocatorLauncherDistributedTest implements Serializable { > >> > >> private static LocatorLauncher locatorLauncher; > >> > >> @Rule > >> public DistributedRule distributedRule = new DistributedRule(); > >> > >> @Rule > >> public SerializableTemporaryFolder temporaryFolder = new > >> SerializableTemporaryFolder(); > >> > >> @Before > >> public void setUp() { > >> String name = getClass().getSimpleName(); > >> int port = getRandomAvailablePort(SOCKET); > >> > >> getVM(0).invoke(() -> { > >> locatorLauncher = new LocatorLauncher.Builder() > >> > >> .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) > >> .setMemberName(name) > >> .setPort(port) > >> .set(HTTP_SERVICE_PORT, "0") > >> .set(JMX_MANAGER_PORT, "0") > >> .build(); > >> locatorLauncher.start(); > >> }); > >> } > >> > >> @After > >> public void tearDown() { > >> getVM(0).invoke(() -> { > >> locatorLauncher.stop(); > >> }); > >> } > >> > >> @Test > >> public void isRunning() { > >> getVM(0).invoke(() -> { > >> assertThat(locatorLauncher.isRunning()).isTrue(); > >> }); > >> } > >> } > >> > >> > >> On Fri, Nov 1, 2019 at 3:02 PM Kirk Lund wrote: > >> > >> > I'm seeing ClassNotFoundExceptions for FQN of the old package of the > >> > LogService: > >> > > >> > [locator] Caused by: java.lang.ClassNotFoundException: > >> > *org.apache.geode.internal.logging.LogService* > >> > [locator] at > java.net.URLClassLoader.findClass(URLClassLoader.java:382) > >> > > >> > The above is interesting because it's the old package, not the current > >> > one. The current
Re: ClassNotFoundException: LogService
Your test passes for me, btw. -Dan On Fri, Nov 1, 2019 at 4:14 PM Dan Smith wrote: > Hi Kirk, > > Did you do a ./gradlew clean? It looks like you might be picking up an old > version of one of the geode war files that is referring to the old location > of the LogService class. > > -Dan > > On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > >> To reproduce, drop this new test in geode-dunit/src/distributedTest/java >> and then run it in IntelliJ or however you want. >> >> It passes, but if you search through the output you'll find the error in >> my >> first message with: >> >> Caused by: java.lang.ClassNotFoundException: >> *org.apache.geode.internal.logging.LogService* >> at java.net.URLClassLoader.findClass(URLClassLoader.java:382) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:424) >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >> at >> >> org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:357) >> ... 88 more >> >> /* >> * Licensed to the Apache Software Foundation (ASF) under one or more >> contributor license >> * agreements. See the NOTICE file distributed with this work for >> additional information regarding >> * copyright ownership. The ASF licenses this file to You under the Apache >> License, Version 2.0 (the >> * "License"); you may not use this file except in compliance with the >> License. You may obtain a >> * copy of the License at >> * >> * http://www.apache.org/licenses/LICENSE-2.0 >> * >> * Unless required by applicable law or agreed to in writing, software >> distributed under the License >> * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF >> ANY KIND, either express >> * or implied. See the License for the specific language governing >> permissions and limitations under >> * the License. >> */ >> package org.apache.geode.test.dunit.examples; >> >> import static >> org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; >> import static >> org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; >> import static org.apache.geode.internal.AvailablePort.SOCKET; >> import static >> org.apache.geode.internal.AvailablePort.getRandomAvailablePort; >> import static org.apache.geode.test.dunit.VM.getVM; >> import static org.assertj.core.api.Assertions.assertThat; >> >> import java.io.Serializable; >> >> import org.junit.After; >> import org.junit.Before; >> import org.junit.Rule; >> import org.junit.Test; >> >> import org.apache.geode.distributed.LocatorLauncher; >> import org.apache.geode.test.dunit.rules.DistributedRule; >> import >> >> org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; >> >> public class LocatorLauncherDistributedTest implements Serializable { >> >> private static LocatorLauncher locatorLauncher; >> >> @Rule >> public DistributedRule distributedRule = new DistributedRule(); >> >> @Rule >> public SerializableTemporaryFolder temporaryFolder = new >> SerializableTemporaryFolder(); >> >> @Before >> public void setUp() { >> String name = getClass().getSimpleName(); >> int port = getRandomAvailablePort(SOCKET); >> >> getVM(0).invoke(() -> { >> locatorLauncher = new LocatorLauncher.Builder() >> >> .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) >> .setMemberName(name) >> .setPort(port) >> .set(HTTP_SERVICE_PORT, "0") >> .set(JMX_MANAGER_PORT, "0") >> .build(); >> locatorLauncher.start(); >> }); >> } >> >> @After >> public void tearDown() { >> getVM(0).invoke(() -> { >> locatorLauncher.stop(); >> }); >> } >> >> @Test >> public void isRunning() { >> getVM(0).invoke(() -> { >> assertThat(locatorLauncher.isRunning()).isTrue(); >> }); >> } >> } >> >> >> On Fri, Nov 1, 2019 at 3:02 PM Kirk Lund wrote: >> >> > I'm seeing ClassNotFoundExceptions for FQN of the old package of the >> > LogService: >> > >> > [locator] Caused by: java.lang.ClassNotFoundException: >> > *org.apache.geode.internal.logging.LogService* >> > [locator] at java.net.URLClassLoader.findClass(URLClassLoader.java:382) >> > >> > The above is interesting because it's the old package, not the current >> > one. The current package is >> > *org.apache.geode.logging.internal.log4j.api.LogService*. >> > >> > There are two related commits and I'm wondering if something didn't get >> > completed or merged correctly. Do we need to revert any of these? Anyone >> > working on this? >> > >> > commit 182de42d8e56a900f0d22793a440af72f62f09f4 >> > Author: Dan Smith >> > Date: Tue Oct 29 18:31:17 2019 -0700 >> > >> > GEODE-7177: Changing packages in geode-logging (#4232) >> > >> > Changing the packages of classes in geode-logging so that they do >>
***UNCHECKED*** Re: ClassNotFoundException: LogService
Hi Kirk, Did you do a ./gradlew clean? It looks like you might be picking up an old version of one of the geode war files that is referring to the old location of the LogService class. -Dan On Fri, Nov 1, 2019 at 3:28 PM Kirk Lund wrote: > To reproduce, drop this new test in geode-dunit/src/distributedTest/java > and then run it in IntelliJ or however you want. > > It passes, but if you search through the output you'll find the error in my > first message with: > > Caused by: java.lang.ClassNotFoundException: > *org.apache.geode.internal.logging.LogService* > at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at > > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > ... 88 more > > /* > * Licensed to the Apache Software Foundation (ASF) under one or more > contributor license > * agreements. See the NOTICE file distributed with this work for > additional information regarding > * copyright ownership. The ASF licenses this file to You under the Apache > License, Version 2.0 (the > * "License"); you may not use this file except in compliance with the > License. You may obtain a > * copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, software > distributed under the License > * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF > ANY KIND, either express > * or implied. See the License for the specific language governing > permissions and limitations under > * the License. > */ > package org.apache.geode.test.dunit.examples; > > import static > org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; > import static > org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; > import static org.apache.geode.internal.AvailablePort.SOCKET; > import static > org.apache.geode.internal.AvailablePort.getRandomAvailablePort; > import static org.apache.geode.test.dunit.VM.getVM; > import static org.assertj.core.api.Assertions.assertThat; > > import java.io.Serializable; > > import org.junit.After; > import org.junit.Before; > import org.junit.Rule; > import org.junit.Test; > > import org.apache.geode.distributed.LocatorLauncher; > import org.apache.geode.test.dunit.rules.DistributedRule; > import > org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; > > public class LocatorLauncherDistributedTest implements Serializable { > > private static LocatorLauncher locatorLauncher; > > @Rule > public DistributedRule distributedRule = new DistributedRule(); > > @Rule > public SerializableTemporaryFolder temporaryFolder = new > SerializableTemporaryFolder(); > > @Before > public void setUp() { > String name = getClass().getSimpleName(); > int port = getRandomAvailablePort(SOCKET); > > getVM(0).invoke(() -> { > locatorLauncher = new LocatorLauncher.Builder() > > .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) > .setMemberName(name) > .setPort(port) > .set(HTTP_SERVICE_PORT, "0") > .set(JMX_MANAGER_PORT, "0") > .build(); > locatorLauncher.start(); > }); > } > > @After > public void tearDown() { > getVM(0).invoke(() -> { > locatorLauncher.stop(); > }); > } > > @Test > public void isRunning() { > getVM(0).invoke(() -> { > assertThat(locatorLauncher.isRunning()).isTrue(); > }); > } > } > > > On Fri, Nov 1, 2019 at 3:02 PM Kirk Lund wrote: > > > I'm seeing ClassNotFoundExceptions for FQN of the old package of the > > LogService: > > > > [locator] Caused by: java.lang.ClassNotFoundException: > > *org.apache.geode.internal.logging.LogService* > > [locator] at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > > > The above is interesting because it's the old package, not the current > > one. The current package is > > *org.apache.geode.logging.internal.log4j.api.LogService*. > > > > There are two related commits and I'm wondering if something didn't get > > completed or merged correctly. Do we need to revert any of these? Anyone > > working on this? > > > > commit 182de42d8e56a900f0d22793a440af72f62f09f4 > > Author: Dan Smith > > Date: Tue Oct 29 18:31:17 2019 -0700 > > > > GEODE-7177: Changing packages in geode-logging (#4232) > > > > Changing the packages of classes in geode-logging so that they do not > > conflict > > with geode-core packages. The following two new packages were created > > > > org.apache.geode.logging.internal.executors: > > Now contains LoggingExecutors, LoggingThread, LoggingThreadFactory, > >
Re: ClassNotFoundException: LogService
To reproduce, drop this new test in geode-dunit/src/distributedTest/java and then run it in IntelliJ or however you want. It passes, but if you search through the output you'll find the error in my first message with: Caused by: java.lang.ClassNotFoundException: *org.apache.geode.internal.logging.LogService* at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:543) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 88 more /* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.test.dunit.examples; import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT; import static org.apache.geode.distributed.ConfigurationProperties.JMX_MANAGER_PORT; import static org.apache.geode.internal.AvailablePort.SOCKET; import static org.apache.geode.internal.AvailablePort.getRandomAvailablePort; import static org.apache.geode.test.dunit.VM.getVM; import static org.assertj.core.api.Assertions.assertThat; import java.io.Serializable; import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.apache.geode.distributed.LocatorLauncher; import org.apache.geode.test.dunit.rules.DistributedRule; import org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder; public class LocatorLauncherDistributedTest implements Serializable { private static LocatorLauncher locatorLauncher; @Rule public DistributedRule distributedRule = new DistributedRule(); @Rule public SerializableTemporaryFolder temporaryFolder = new SerializableTemporaryFolder(); @Before public void setUp() { String name = getClass().getSimpleName(); int port = getRandomAvailablePort(SOCKET); getVM(0).invoke(() -> { locatorLauncher = new LocatorLauncher.Builder() .setWorkingDirectory(temporaryFolder.newFolder(name).getAbsolutePath()) .setMemberName(name) .setPort(port) .set(HTTP_SERVICE_PORT, "0") .set(JMX_MANAGER_PORT, "0") .build(); locatorLauncher.start(); }); } @After public void tearDown() { getVM(0).invoke(() -> { locatorLauncher.stop(); }); } @Test public void isRunning() { getVM(0).invoke(() -> { assertThat(locatorLauncher.isRunning()).isTrue(); }); } } On Fri, Nov 1, 2019 at 3:02 PM Kirk Lund wrote: > I'm seeing ClassNotFoundExceptions for FQN of the old package of the > LogService: > > [locator] Caused by: java.lang.ClassNotFoundException: > *org.apache.geode.internal.logging.LogService* > [locator] at java.net.URLClassLoader.findClass(URLClassLoader.java:382) > > The above is interesting because it's the old package, not the current > one. The current package is > *org.apache.geode.logging.internal.log4j.api.LogService*. > > There are two related commits and I'm wondering if something didn't get > completed or merged correctly. Do we need to revert any of these? Anyone > working on this? > > commit 182de42d8e56a900f0d22793a440af72f62f09f4 > Author: Dan Smith > Date: Tue Oct 29 18:31:17 2019 -0700 > > GEODE-7177: Changing packages in geode-logging (#4232) > > Changing the packages of classes in geode-logging so that they do not > conflict > with geode-core packages. The following two new packages were created > > org.apache.geode.logging.internal.executors: > Now contains LoggingExecutors, LoggingThread, LoggingThreadFactory, > LoggingUncaughtExceptionHandler > > org.apache.geode.logging.internal.log4j.api: > Now contains: LogService, FastLogger, and log4j.message classes > > This change touches the imports of files because LogService is used > everywhere > we get a logger. > > commit 5981a139a1acc078d2d3024ddcfaad35642d7684 > Author: Ernie Burghardt > Date: Thu Oct 10 09:38:33 2019 -0700 > > GEODE-7177: Logging as a submodule (#4129) > > * GEODE-7177: Extract LogService to a separate submodule > >
ClassNotFoundException: LogService
I'm seeing ClassNotFoundExceptions for FQN of the old package of the LogService: [locator] Caused by: java.lang.ClassNotFoundException: *org.apache.geode.internal.logging.LogService* [locator] at java.net.URLClassLoader.findClass(URLClassLoader.java:382) The above is interesting because it's the old package, not the current one. The current package is *org.apache.geode.logging.internal.log4j.api.LogService*. There are two related commits and I'm wondering if something didn't get completed or merged correctly. Do we need to revert any of these? Anyone working on this? commit 182de42d8e56a900f0d22793a440af72f62f09f4 Author: Dan Smith Date: Tue Oct 29 18:31:17 2019 -0700 GEODE-7177: Changing packages in geode-logging (#4232) Changing the packages of classes in geode-logging so that they do not conflict with geode-core packages. The following two new packages were created org.apache.geode.logging.internal.executors: Now contains LoggingExecutors, LoggingThread, LoggingThreadFactory, LoggingUncaughtExceptionHandler org.apache.geode.logging.internal.log4j.api: Now contains: LogService, FastLogger, and log4j.message classes This change touches the imports of files because LogService is used everywhere we get a logger. commit 5981a139a1acc078d2d3024ddcfaad35642d7684 Author: Ernie Burghardt Date: Thu Oct 10 09:38:33 2019 -0700 GEODE-7177: Logging as a submodule (#4129) * GEODE-7177: Extract LogService to a separate submodule - Extracting LogService and it's dependencies to a separate geode-logging submodule so that other modules not in geode-core can still use LogService to get a Logger. - Removing the use of the logging SPI from LogService LogService had a dependency on the logging SPI in geode-core. However, this dependency was unecessary - the LoggingProvider loaded statically in this class never had `configure` called on it. In addition, the getLogger methods of this class are merely creating FastLoggers which can live inside geode-logging and do not need to be pluggable. - Moved executors that are not dependent on geode-core to geode-logging and renamed the remaining executors to be CoreLoggingExecutors. - Refactor the marker interface from Loggable to EntriesCollection - EntriesCollection put back into internal.cache and AbstractRegion now implements the marker - Formerly known as Loggable renamed to LogWithToString - Remove marker interface called EntriesCollection completely, replace with LogWithToString. Here's the full output of the error: [locator] [error 2019/11/01 14:48:50.877 PDT tid=0x13] Context initialization failed [locator] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managementControllerAdvice' defined in file [/Users/klund/dev/gemfire/geode/geode-dunit/dunit/locator/GemFire_klund/services/http/0.0.0.0_7070_management_8c20b9f3/webapp/WEB-INF/classes/org/apache/geode/management/internal/rest/controllers/ManagementControllerAdvice.class]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/geode/internal/logging/LogService [locator] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1159) [locator] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1103) [locator] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511) [locator] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481) [locator] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) [locator] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [locator] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) [locator] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) [locator] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:764) [locator] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) [locator] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) [locator] at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668) [locator] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634) [locator] at