Hi Jeffery, the diff with one of mine dep trees shows, that you did not get
org.apache.logging.log4j:log4j-web:jar:2.11.1:compile It should be in the generated pom: https://raw.githubusercontent.com/apache/turbine-archetypes/master/src/main/resources/archetype-resources/pom.xml Could you check that? This is to resolve context path{web:rootDir}, and to scan the WEB-INF directory: https://logging.apache.org/log4j/2.x/manual/webapp.html, though Turbine should find the log4j file itself, but this is actually only needed, if isLog4jAutoInitializationDisabled is set to true, but then web:rootDir is also not resolved). Best regards, Georg Von: Jeffery Painter <[email protected]> An: [email protected] Datum: 14.12.2018 16:44 Betreff: Re: turbine archetype and logging configuration problems Hi Georg, Unfortunately I don't have much time to work on this today - getting ready for a weekend trip. I removed all the slf4j entries in the pom and it does pick up just from turbine without those being explicit in the sample app. Also, I made no changes to the sample app, so you should be able to recreate it :-) I have just built everything from SVN and been testing up the chain with the archetype. I created a bash script to generate the new app quickly if you want to give it a try: # # build_app.sh # Builds a new turbine app from the archetype # export ORG=com.jivecast export APP_NAME=scoop export DB_USER=<db_username> export DB_PASS=<dbpasswd> ## Create the database mysql -u ${DB_USER} -p${DB_PASS} -e "drop database ${APP_NAME}" mysql -u ${DB_USER} -p${DB_PASS} -e "create database ${APP_NAME}" ## Generate the app mvn archetype:generate \ -DarchetypeGroupId=org.apache.turbine \ -DarchetypeArtifactId=turbine-webapp-5.0 \ -DarchetypeVersion=1.0.0-SNAPSHOT \ -DgroupId=${ORG}.${APP_NAME} \ -DartifactId=${APP_NAME} \ -Dversion=1.0 \ -Dturbine_app_name=${APP_NAME} \ -Dturbine_database_adapter=mysql \ -Dturbine_database_user=${DB_USER} \ -Dturbine_database_password=${DB_PASS} \ -Dturbine_database_name=${APP_NAME} \ -Dturbine_database_timezone=US/Eastern \ -Dturbine_database_url=jdbc:mysql://localhost:3306/ \ -Dgoals=generate-sources,pre-integration-test Here is the dep tree after removing the declarations from the pom.xml - still doesn't seem to find the config file. painter@merlin:~/turbine/build_app/scoop$ mvn dependency:tree [INFO] Scanning for projects... [INFO] [INFO] ----------------------< com.jivecast.scoop:scoop >---------------------- [INFO] Building scoop 1.0 [INFO] --------------------------------[ war ]--------------------------------- [INFO] [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ scoop --- [INFO] com.jivecast.scoop:scoop:war:1.0 [INFO] +- mysql:mysql-connector-java:jar:8.0.12:compile [INFO] | \- com.google.protobuf:protobuf-java:jar:2.6.0:compile [INFO] +- javax.xml.bind:jaxb-api:jar:2.3.0:compile [INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.3.0:compile [INFO] +- com.sun.xml.bind:jaxb-core:jar:2.3.0:compile [INFO] +- javax.activation:activation:jar:1.1.1:compile [INFO] +- javax.mail:mail:jar:1.4.5:provided [INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided [INFO] +- org.apache.turbine:turbine:jar:5.0-SNAPSHOT:compile [INFO] | +- org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile [INFO] | +- commons-codec:commons-codec:jar:1.11:compile [INFO] | +- org.apache.commons:commons-configuration2:jar:2.4:compile [INFO] | +- org.apache.commons:commons-email:jar:1.5:compile [INFO] | | \- com.sun.mail:javax.mail:jar:1.5.6:compile [INFO] | +- org.apache.commons:commons-lang3:jar:3.8.1:compile [INFO] | +- org.apache.commons:commons-text:jar:1.6:compile [INFO] | +- commons-beanutils:commons-beanutils:jar:1.9.3:compile [INFO] | | \- commons-collections:commons-collections:jar:3.2.2:compile [INFO] | +- ecs:ecs:jar:1.4.2:compile [INFO] | +- net.sf.uadetector:uadetector-resources:jar:2014.10:compile [INFO] | | \- net.sf.uadetector:uadetector-core:jar:0.9.22:compile [INFO] | | +- net.sf.qualitycheck:quality-check:jar:1.3:compile [INFO] | | +- com.google.code.findbugs:jsr305:jar:2.0.3:compile [INFO] | | \- javax.annotation:jsr250-api:jar:1.0:compile [INFO] | +- org.apache.fulcrum:fulcrum-factory:jar:1.1.1-SNAPSHOT:compile [INFO] | +- org.apache.fulcrum:fulcrum-pool:jar:1.0.5-SNAPSHOT:compile [INFO] | +- org.apache.fulcrum:fulcrum-localization:jar:1.0.7-SNAPSHOT:compile [INFO] | +- org.apache.fulcrum:fulcrum-parser:jar:2.0.0-SNAPSHOT:compile [INFO] | +- org.apache.fulcrum:fulcrum-crypto:jar:1.0.8-SNAPSHOT:compile [INFO] | +- org.apache.fulcrum:fulcrum-xslt:jar:1.1.1-SNAPSHOT:compile [INFO] | +- org.apache.fulcrum:fulcrum-mimetype:jar:1.0.6-SNAPSHOT:compile [INFO] | +- org.apache.torque:torque-runtime:jar:4.0:compile [INFO] | | +- commons-lang:commons-lang:jar:2.6:compile [INFO] | | +- commons-pool:commons-pool:jar:1.5.6:compile [INFO] | | \- org.apache.jcs:jcs:jar:1.3:compile [INFO] | | \- concurrent:concurrent:jar:1.0:compile [INFO] | +- commons-configuration:commons-configuration:jar:1.10:compile [INFO] | +- org.apache.fulcrum:fulcrum-quartz:jar:1.1.1-SNAPSHOT:compile [INFO] | | +- org.quartz-scheduler:quartz:jar:2.3.0:compile [INFO] | | | +- com.mchange:c3p0:jar:0.9.5.2:compile [INFO] | | | +- com.mchange:mchange-commons-java:jar:0.2.11:compile [INFO] | | | \- com.zaxxer:HikariCP-java6:jar:2.3.13:compile [INFO] | | +- org.quartz-scheduler:quartz-jobs:jar:2.3.0:compile [INFO] | | \- javax.transaction:jta:jar:1.1:runtime [INFO] | +- org.slf4j:slf4j-api:jar:1.7.25:compile [INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile [INFO] | +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.11.1:compile [INFO] | +- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile [INFO] | +- org.apache.logging.log4j:log4j-core:jar:2.11.1:compile [INFO] | \- org.apache.velocity:velocity-engine-core:jar:2.0:compile [INFO] +- org.apache.fulcrum:fulcrum-yaafi:jar:1.0.8-SNAPSHOT:compile [INFO] | +- commons-io:commons-io:jar:2.6:compile [INFO] | \- org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile [INFO] +- org.apache.fulcrum:fulcrum-intake:jar:2.0.0-SNAPSHOT:compile [INFO] | \- org.apache.commons:commons-pool2:jar:2.6.0:compile [INFO] +- org.apache.fulcrum:fulcrum-cache:jar:1.1.0:compile [INFO] +- org.apache.fulcrum:fulcrum-upload:jar:1.0.6-SNAPSHOT:compile [INFO] | \- commons-fileupload:commons-fileupload:jar:1.3.3:compile [INFO] +- org.apache.fulcrum:fulcrum-security-memory:jar:1.1.3-SNAPSHOT:compile [INFO] +- org.apache.fulcrum:fulcrum-security-torque:jar:1.1.3-SNAPSHOT:compile [INFO] | +- commons-dbcp:commons-dbcp:jar:1.4:compile [INFO] | \- org.apache.commons:commons-dbcp2:jar:2.5.0:compile [INFO] | \- commons-logging:commons-logging:jar:1.2:compile [INFO] +- org.apache.fulcrum:fulcrum-security-api:jar:1.1.3-SNAPSHOT:compile [INFO] +- org.apache.fulcrum:fulcrum-json-jackson2:jar:2.0.0-SNAPSHOT:compile [INFO] | +- org.apache.fulcrum:fulcrum-json-api:jar:2.0.0-SNAPSHOT:compile [INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.7:compile [INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.7:compile [INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.9.7:compile [INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-json-org:jar:2.6.6:compile [INFO] | \- org.apache.geronimo.bundles:json:jar:20090211_1:compile [INFO] +- junit:junit:jar:4.12:test [INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test [INFO] \- org.apache.fulcrum:fulcrum-testcontainer:jar:1.0.8-SNAPSHOT:test [INFO] +- org.junit.jupiter:junit-jupiter-api:jar:5.3.2:test [INFO] | +- org.apiguardian:apiguardian-api:jar:1.0.0:test [INFO] | +- org.opentest4j:opentest4j:jar:1.1.1:test [INFO] | \- org.junit.platform:junit-platform-commons:jar:1.3.2:test [INFO] +- org.junit.jupiter:junit-jupiter-params:jar:5.3.2:test [INFO] +- org.junit.jupiter:junit-jupiter-engine:jar:5.3.2:test [INFO] | \- org.junit.platform:junit-platform-engine:jar:1.3.2:test [INFO] +- org.junit.vintage:junit-vintage-engine:jar:5.3.2:test [INFO] +- org.junit.platform:junit-platform-runner:jar:1.3.2:test [INFO] | \- org.junit.platform:junit-platform-suite-api:jar:1.3.2:test [INFO] +- org.junit.platform:junit-platform-launcher:jar:1.3.2:test [INFO] \- org.mockito:mockito-core:jar:2.23.0:test [INFO] +- net.bytebuddy:byte-buddy:jar:1.9.0:test [INFO] +- net.bytebuddy:byte-buddy-agent:jar:1.9.0:test [INFO] \- org.objenesis:objenesis:jar:2.6:test [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.253 s [INFO] Finished at: 2018-12-14T10:32:43-05:00 [INFO] ------------------------------------------------------------------------ On 12/14/18 10:04 AM, Georg Kallidis wrote: > Hi Jeffery, > > it seems that slf4j-log4j12-1.7.25.jar is in WEB-INF/lib, although it > shouldn't as only one impl is allowed. This has to be log4j-slf4j-impl > from turbine. > > If you check by mvn dependency:tree, what does it say? > > Jetty should log into src/main/webapp/logs. > > By default the first entry in turbine.log would contain "resolved log4j2 > location", which may be in WEB-INF/conf, if its set in > TurbineResources.props, e.g. log4j2.file = log4j2.xml. > > Best regards, Georg > > > > Von: Jeffery Painter <[email protected]> > An: Turbine Developers List <[email protected]> > Datum: 14.12.2018 15:14 > Betreff: turbine archetype and logging configuration problems > > > > > Hi Georg, > > I am not seeing any logs being generated by the sample app built by the > maven archetype. If you have time to check into this that would be > great! I am still not familiar enough with the log changes you made to > understand why it isn't working. The archetype does generate the > log4j.xml file, but turbine doesn't seem to find it. > > I tried updating the properties file to point directly to > WEB-INF/conf/log4j.xml but that didn't help either. > > Console output: > > SLF4J: Class path contains multiple SLF4J bindings. > SLF4J: Found binding in > [jar:file:/home/painter/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testapp/WEB-INF/lib/log4j-slf4j-impl-2.11.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: Found binding in > [jar:file:/home/painter/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/testapp/WEB-INF/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an > explanation. > SLF4J: Actual binding is of type > [org.apache.logging.slf4j.Log4jLoggerFactory] > ERROR StatusLogger No Log4j 2 configuration file found. Using default > configuration (logging only errors to the console), or user > programmatically provided configurations. Set system property > 'log4j2.debug' to show Log4j 2 internal initialization logging. See > https://logging.apache.org/log4j/2.x/manual/configuration.html for > instructions on how to configure Log4j 2 > Dec 14, 2018 9:10:02 AM org.apache.coyote.AbstractProtocol start > INFO: Starting ProtocolHandler ["http-nio-8080"] > > > Thanks! > -- Jeff Painter CEO and Founder of JiveCast Software and analytics, made together https://jivecast.com 301 Fayetteville St. Unit 2301, Raleigh, NC 27601 (919) 533-9024 [Anhang "signature.asc" gelöscht von Georg Kallidis/CeDiS/FU-Berlin/DE]
smime.p7s
Description: S/MIME Cryptographic Signature
