I'm working with weblogic 12c and jdk 1.8. At the start of my application there is the BeEnvironment class that loads the internal log4j.properties in this mode:
if (Thread.currentThread().getContextClassLoader().getResourceAsStream(CONFIGURATION + File.separator + mwaEnv + File.separator + Constants.LOG_4_j) != null) {
System.out.println("CARICO LE IMPOSTAZIONI DI LOG4J DA: " + CONFIGURATION + File.separator + mwaEnv + File.separator + Constants.LOG_4_j);
PropertyConfigurator.configure(this.getClass().getClassLoader().getResource(CONFIGURATION + File.separator + mwaEnv + File.separator + Constants.LOG_4_j));
}
The string "CONFIGURATION + File.separator + mwaEnv + File.separator + Constants.LOG_4_j" is the path where the file log4j.properties is located. This path is under the classpath (src/main/resources) of the project.
The problem is that weblogic does not find the file log4j.properties. The same code in webphere application server goes well. Maybe I have to configure some tag in weblogic.xml?