You mean the config in server and libs in common? Only tested with all in the same loader.
Le jeu. 22 nov. 2018 19:52, Rainer Jung <rainer.j...@kippdata.de> a écrit : > Hi Romain, hi all, > > are you sure you tried i as I described? Namely loading the config via a > server.loader path property newly defined in conf/catalina.properties? > And of course I was using the juli and juli-adapters jar from the 7.0.92 > extras download. > > I have another detail to report: it starts working even with Java 11 and > using the server loader, when i place the log4j.jar and the > juli-adapters.jar into the server loader instead of the common loader. > That's interesting, because it was not needed until and including Java > 10. It worked there by just putting the config into the server loader > and keeping the log4j and juli-adapters jar in the common loader. > > It seems that either for some reason the server loader is no longer > parent of the common loader or the getResource() call changed behavior > w.r.t. class loader hierarchies and delegation. > > Will debug further. > > Regards, > > Rainer > > Am 22.11.2018 um 18:31 schrieb Romain Manni-Bucau: > > Hi Rainer, > > > > You are right, missed it was set OOTB. > > > > BTW, just tested on tomcat 7.0.92 with the log4j (v1.2.17) and its > > adapter (of the 8.0.53) and java 11.0.1+13-LTS and it works for me > > (base=home in my test). > > > > Romain Manni-Bucau > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > <https://rmannibucau.metawerx.net/> | Old Blog > > <http://rmannibucau.wordpress.com> | Github > > <https://github.com/rmannibucau> | LinkedIn > > <https://www.linkedin.com/in/rmannibucau> | Book > > < > https://www.packtpub.com/application-development/java-ee-8-high-performance > > > > > > > > Le jeu. 22 nov. 2018 à 17:40, Rainer Jung <rainer.j...@kippdata.de > > <mailto:rainer.j...@kippdata.de>> a écrit : > > > > Hi Romain, > > > > Am 22.11.2018 um 16:53 schrieb Romain Manni-Bucau: > > > Hi Rainer, > > > > > > did you open some java.base modules? like > > > > No, just the add-opens that we ship in our catalina.sh. > > > > > --add-opens java.base/java.lang=log4j > > > > > > (not sure this is the one to open but I guess you can debug and > > identified > > > missing open this way - debugging > > java.lang.Module#isOpen(java.lang.String) > > > for instance) > > > > I hoped to find a more definitive answer here, not needing to debug > > into > > code. > > > > Note this is Log4j 1.2, not 2. So not sure why there should be a > module > > "log4j". And if log4j would instead be part of the unnamed module, > then > > the already existing --add-opens=java.base/java.lang=ALL-UNNAMED > would > > be the corrected line for what you suggest. But as said: that one is > > already one of the three add-opens TC contains in catalina.sh by > > default. > > > > Regards, > > > > Rainer > > > > > Romain Manni-Bucau > > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > > <https://rmannibucau.metawerx.net/> | Old Blog > > > <http://rmannibucau.wordpress.com> | Github > > <https://github.com/rmannibucau> | > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book > > > > > < > https://www.packtpub.com/application-development/java-ee-8-high-performance > > > > > > > > > > > Le jeu. 22 nov. 2018 à 16:45, Rainer Jung > > <rainer.j...@kippdata.de <mailto:rainer.j...@kippdata.de>> a > > > écrit : > > > > > >> Hi all, > > >> > > >> I have a problem running TC 7.0.92 with Log4J 1.2.17 and Java 11 > > when > > >> trying to load the config from > > ${catalina.base}/somedir/log4j.properties > > >> via server.loader=${catalina.base}/somedir in > > conf/catalina.properties. > > >> > > >> It works with Java 9 and 10 and it also works when using the > > >> common.loader instead of server.loader. Setting -Dlog4j.debug > shows, > > >> that log4j tries to load the files via the class loader but > > isn't able to: > > >> > > >> Trying to find [log4j.xml] using java.net.URLClassLoader@c267ef4 > > class > > >> loader. > > >> Trying to find [log4j.xml] using ClassLoader.getSystemResource(). > > >> Trying to find [log4j.properties] using > > java.net.URLClassLoader@c267ef4 > > >> class loader. > > >> Trying to find [log4j.properties] using > > ClassLoader.getSystemResource(). > > >> Could not find resource: [null]. > > >> log4j:WARN No appenders could be found for logger > > >> (org.apache.catalina.startup.Catalina). > > >> log4j:WARN Please initialize the log4j system properly. > > >> log4j:WARN See > > http://logging.apache.org/log4j/1.2/faq.html#noconfig for > > >> more info. > > >> > > >> I suspect it might have to do with some module system change in > > JAVA 11, > > >> but I found nothing obvious. Adding "--illegal-access=debug" > doesn't > > >> produce any output. > > >> > > >> I'm using the log4j juli plus adapters. No problems using log4j > 1.2 > > >> inside webapps directly. > > >> > > >> Any ideas? > > >> > > >> Regards, > > >> > > >> Rainer >