log4j problem

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

log4j problem

José Antonio Delgado Trujillo
I was testing the tutorial Getting Started, i cloned the GitHub strut-examples in Eclipse and i am using Wildly container (i only change the POM plugin to use wildly-maven-plugin).
I can deploy an run correctly the most of module but i can’t see any log information in the server console.
What can it be happen?
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

Yasser Zamani-2
Could you search for 'log4j' in your output. Log4j prints warning or error if cannot configure itself. Also see log4j jar should be in lib folder of your deployed web app. If presents and no log4j in your output, check Wildy log levels.
On Dec 29, 2017, at 1:40PM, "José Antonio Delgado Trujillo" <[hidden email]<mailto:[hidden email]>> wrote:

I was testing the tutorial Getting Started, i cloned the GitHub strut-examples in Eclipse and i am using Wildly container (i only change the POM plugin to use wildly-maven-plugin).
I can deploy an run correctly the most of module but i can’t see any log information in the server console.
What can it be happen?
________________________________

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

José Antonio Delgado Trujillo
After clone the GitHub and deploy basic-struts in Wildly:

log4j is in lib folder
It isn’t any log4j output after test in the browser (localhost:8080/basic-struts/index.action)
I don’t think is a level problem in WildFly because...

If i did manually the first project basic-struts i can see more info log than the 2 in the tutorial.
I realise that when i deploy the project (man wildly:deploy) i found a warning about log4j-api

14:21:11,532 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0003: Could not index class module-info.class at /content/basic.war/WEB-INF/lib/log4j-api-2.10.0.jar: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 24
        at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1417)
        at org.jboss.jandex.Indexer.index(Indexer.java:1451)
        at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
        at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

What is it happening?

Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

Martin Gainty



MG>you have a saved session state in one of your jboss caches that is conflicting with your new Basic.war Session State
MG>clean out ALL your jboss caches
MG>rm -rf tmp
MG>rm -rf data
MG>rm -rf log
MG>recompile the whole lot with runtime jdk provided by JBOSS
MG>restart jboss

un saludo
________________________________
From: José Antonio Delgado Trujillo <[hidden email]>
Sent: Friday, December 29, 2017 9:25 AM
To: Struts Users Mailing List
Subject: Re: log4j problem

After clone the GitHub and deploy basic-struts in Wildly:

log4j is in lib folder
It isn’t any log4j output after test in the browser (localhost:8080/basic-struts/index.action)
I don’t think is a level problem in WildFly because...

If i did manually the first project basic-struts i can see more info log than the 2 in the tutorial.
I realise that when i deploy the project (man wildly:deploy) i found a warning about log4j-api

14:21:11,532 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0003: Could not index class module-info.class at /content/basic.war/WEB-INF/lib/log4j-api-2.10.0.jar: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 24
        at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1417)
        at org.jboss.jandex.Indexer.index(Indexer.java:1451)
        at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
        at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

What is it happening?

Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

José Antonio Delgado Trujillo
I don’t know how to recompile lot with runtime jdk provided by JBOSS
I rm log, data, tmp folders
restart wildfly, clean and deploy basic-struts, and when i put in the browser
localhost:8080/basic-struts/index.action
I see the Welcome to Struts 2 jsp 

But i read in the console of wildly the next ..

18:48:30,252 INFO  [stdout] (default task-3) 2017-12-29 18:48:30,228 ERROR [default task-3] dispatcher.Dispatcher (Dispatcher.java:609) - Could not find action or result: /basic-struts/
18:48:30,253 INFO  [stdout] (default task-3) com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for namespace [/] and action name [] associated with context path [/basic-struts].
18:48:30,254 INFO  [stdout] (default task-3) at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:195) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3) at org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:57) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3) at org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:32) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:60) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:141) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,256 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,256 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,257 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,257 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,258 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) ~[?:?]
18:48:30,258 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) ~[?:?]
18:48:30,262 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,262 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68) ~[?:?]
18:48:30,262 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,262 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) ~[?:?]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,265 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326) [undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,266 INFO  [stdout] (default task-3) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812) [undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,266 INFO  [stdout] (default task-3) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
18:48:30,266 INFO  [stdout] (default task-3) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
18:48:30,266 INFO  [stdout] (default task-3) at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

????
Strust configuration
There is an action index !!!
I wrote localhost:8080/basic-struts/index.action !!!
I see the view index.jsp

Could not find action or result: /basic-struts/
18:48:30,253 INFO  [stdout] (default task-3) com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for namespace [/] and action name [] associated with context path [/basic-struts].

I don’t understand anything :C
Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

Martin Gainty





From: José Antonio Delgado Trujillo <[hidden email]>
Sent: Friday, December 29, 2017 1:57 PM
To: Struts Users Mailing List
Subject: Re: log4j problem
 
I don’t know how to recompile lot with runtime jdk provided by JBOSS
MG>JBOSSConfiguration to JDK is explained here
https://access.redhat.com/articles/111663


I rm log, data, tmp folders
restart wildfly, clean and deploy basic-struts, and when i put in the browser
localhost:8080/basic-struts/index.action
I see the Welcome to Struts 2 jsp 

But i read in the console of wildly the next ..
MG>before you restart did you deploy your struts-basic*.war to server/default/deploy folder?
MG>display struts.xml to determine mapping for namespace "/
MG>namespace might look something like e.g.
 <package name="basic" extends="default" namespace="/">

MG>also display struts.xml to determine mapping for "basic-struts" (which would be included in namespace definition)
MG>e.g.
MG> <action name="basic-struts" class="BasicStrutsAction">
MG>indicates BasicStrutsAction.java is either not compiled  or BasicStrutsAction.class is not on $CLASSPATH?

18:48:30,252 INFO  [stdout] (default task-3) 2017-12-29 18:48:30,228 ERROR [default task-3] dispatcher.Dispatcher (Dispatcher.java:609) - Could not find action or result: /basic-struts/
18:48:30,253 INFO  [stdout] (default task-3) com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for namespace [/] and action name [] associated with context path [/basic-struts].
18:48:30,254 INFO  [stdout] (default task-3) at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:195) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3) at org.apache.struts2.factory.StrutsActionProxy.prepare(StrutsActionProxy.java:57) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3) at org.apache.struts2.factory.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:32) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,254 INFO  [stdout] (default task-3) at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:60) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:564) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:79) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:141) ~[struts2-core-2.5.14.1.jar:2.5.14.1]
18:48:30,255 INFO  [stdout] (default task-3) at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,256 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,256 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,257 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,257 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,258 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) ~[?:?]
18:48:30,258 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,259 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,260 INFO  [stdout] (default task-3) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,261 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) ~[?:?]
18:48:30,262 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,262 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68) ~[?:?]
18:48:30,262 INFO  [stdout] (default task-3) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,262 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,263 INFO  [stdout] (default task-3) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) ~[undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) ~[?:?]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,264 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,265 INFO  [stdout] (default task-3) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508) ~[?:?]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,265 INFO  [stdout] (default task-3) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326) [undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,266 INFO  [stdout] (default task-3) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812) [undertow-core-1.4.18.Final.jar!/:1.4.18.Final]
18:48:30,266 INFO  [stdout] (default task-3) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_144]
18:48:30,266 INFO  [stdout] (default task-3) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_144]
18:48:30,266 INFO  [stdout] (default task-3) at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

????
Strust configuration
There is an action index !!!
I wrote localhost:8080/basic-struts/index.action !!!
I see the view index.jsp

Could not find action or result: /basic-struts/
18:48:30,253 INFO  [stdout] (default task-3) com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for namespace [/] and action name [] associated with context path [/basic-struts].

I don’t understand anything :C
Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

José Antonio Delgado Trujillo
MG>before you restart did you deploy your struts-basic*.war to server/default/deploy folder?

JD> mvn wildly:deploy put the war in the folder deploy



MG>display struts.xml to determine mapping for namespace “/

JD> I clone the trust-exmple GitHub. I haven’t modify anything.


MG>namespace might look something like e.g.
 <package name="basic" extends="default" namespace="/“>

you didn’t put namespace in your struts.



MG>also display struts.xml to determine mapping for "basic-struts" (which would be included in namespace definition)
MG>e.g.
MG> <action name="basic-struts" class="BasicStrutsAction">
MG>indicates BasicStrutsAction.java is either not compiled  or BasicStrutsAction.class is not on $CLASSPATH?

Your action node is action class less
<package name="basic-struts2" extends="struts-default”
<action name="index">
<result>/index.jsp</result>
</action>
</package>

So Struts2 because they don’t find any action class redirect to index.jsp
The log that is expected is ...




Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

Lukasz Lenart
In reply to this post by José Antonio Delgado Trujillo
2017-12-29 19:57 GMT+01:00 José Antonio Delgado Trujillo <[hidden email]>:
I don’t know how to recompile lot with runtime jdk provided by JBOSS
I rm log, data, tmp folders
restart wildfly, clean and deploy basic-struts, and when i put in the browser
localhost:8080/basic-struts/index.action
I see the Welcome to Struts 2 jsp 

But i read in the console of wildly the next ..

18:48:30,252 INFO  [stdout] (default task-3) 2017-12-29 18:48:30,228 ERROR [default task-3] dispatcher.Dispatcher (Dispatcher.java:609) - Could not find action or result: /basic-struts/
18:48:30,253 INFO  [stdout] (default task-3) com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for namespace [/] and action name [] associated with context path [/basic-struts].

Probably because a browser is requesting "/" to check something and as there is no action named "" you see the error.


????
Strust configuration
There is an action index !!!
I wrote localhost:8080/basic-struts/index.action !!!
I see the view index.jsp

but "index.action" != "/" that's why you see the error

And please be aware that in classless configuration as above, a default action class is used and in this case it'll be ActionSupport [1]. Aso please be aware that only with the Convention plugin you will get automatic "index" action handling [2]

Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

Yasser Zamani-2
In reply to this post by José Antonio Delgado Trujillo


On 12/30/2017 12:43 AM, José Antonio Delgado Trujillo wrote:
> The log that is expected is ...

Default level is `info` [1]. Please change them to `debug` because you
expect debug level.

[1]
https://github.com/apache/struts-examples/blob/master/basic-struts/src/main/resources/log4j2.xml

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

Martin Gainty
In reply to this post by José Antonio Delgado Trujillo






From: José Antonio Delgado Trujillo <[hidden email]>
Sent: Friday, December 29, 2017 4:13 PM
To: Struts Users Mailing List
Subject: Re: log4j problem
 
MG>before you restart did you deploy your struts-basic*.war to server/default/deploy folder?

JD> mvn wildly:deploy put the war in the folder deploy



MG>display struts.xml to determine mapping for namespace “/

JD> I clone the trust-exmple GitHub. I haven’t modify anything.


MG>namespace might look something like e.g.
 <package name="basic" extends="default" namespace="/“>

you didn’t put namespace in your struts.



MG>also display struts.xml to determine mapping for "basic-struts" (which would be included in namespace definition)
MG>e.g.
MG> <action name="basic-struts" class="BasicStrutsAction">
MG>indicates BasicStrutsAction.java is either not compiled  or BasicStrutsAction.class is not on $CLASSPATH?

Your action node is action class less
<package name="basic-struts2" extends="struts-default”
<action name="index">
<result>/index.jsp</result>
</action>
</package>

So Struts2 because they don’t find any action class redirect to index.jsp
The log that is expected is ...



MG>DefaultActionProcy used to be located in xwork-core*.jar from your /server/default/lib folder
MG>do any of the jars from lib folder contain DefaultActionProxy.class ?
MG>hard to debug without source and configuration files.. can you provide github location of basic-struts2 ?
Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

José Antonio Delgado Trujillo
In reply to this post by Lukasz Lenart
I cloned the GithHUb struts-example

https://github.com/apache/struts-examples.git <https://github.com/apache/struts-examples.git>


>
> Probably because a browser is requesting "/" to check something and as there is no action named "" you see the error.
>

??

localhost:8080/basic-strust/index.action

is a URL for the action named index, it hasn’t action class and in the struts.xml we have
<package name="basicstruts2" extends="struts-default">
        <action name="index">
            <result>/index.jsp</result>
        </action>
    </package>

so as it’s said in the step 6 of the tutorial

This minimal Struts 2 configuration file tells the framework that if the URL ends in index.action to redirect the browser to index.jsp.


> but "index.action" != "/" that's why you see the error
>
> And please be aware that in classless configuration as above, a default action class is used and in this case it'll be ActionSupport [1].


That is the info that appears in the tutorial
...
2017-04-17 11:16:01,084 DEBUG [qtp1723848804-22] xwork2.DefaultActionProxy (DefaultActionProxy.java:89) - Creating an DefaultActionProxy for namespace [/] and action name [index]



> Aso please be aware that only with the Convention plugin you will get automatic "index" action handling [2]
>
> [1] https://github.com/apache/struts/blob/master/core/src/main/resources/struts-default.xml#L391 <https://github.com/apache/struts/blob/master/core/src/main/resources/struts-default.xml#L391>
> [2] https://struts.apache.org/plugins/convention/#introduction <https://struts.apache.org/plugins/convention/#introduction>
>
You don’t use the plugin convention in this example


I don’t understand





Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

José Antonio Delgado Trujillo
In reply to this post by Yasser Zamani-2
Thanks Yasser,
Fix-it with debug-level

Un saludo,
José A.

> On 30 Dec 2017, at 09:10, Yasser Zamani <[hidden email]> wrote:
>
>
>
> On 12/30/2017 12:43 AM, José Antonio Delgado Trujillo wrote:
>> The log that is expected is ...
>
> Default level is `info` [1]. Please change them to `debug` because you
> expect debug level.
>
> [1]
> https://github.com/apache/struts-examples/blob/master/basic-struts/src/main/resources/log4j2.xml
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: log4j problem

Lukasz Lenart
In reply to this post by José Antonio Delgado Trujillo
2017-12-30 20:27 GMT+01:00 José Antonio Delgado Trujillo <[hidden email]>:
>> Probably because a browser is requesting "/" to check something and as there is no action named "" you see the error.
>
> ??

You have in logs that there is no action mapped to "" - which means
something (a browser because Struts doesn't request itself) has tried
access the "/" - and as there is no mapping in struts.xml to handle
action named "", you see the error.

> That is the info that appears in the tutorial
> ...
> 2017-04-17 11:16:01,084 DEBUG [qtp1723848804-22] xwork2.DefaultActionProxy (DefaultActionProxy.java:89) - Creating an DefaultActionProxy for namespace [/] and action name [index]

Yes, but when you opened a "/index.action"

>> Aso please be aware that only with the Convention plugin you will get automatic "index" action handling [2]
>>
>> [1] https://github.com/apache/struts/blob/master/core/src/main/resources/struts-default.xml#L391 <https://github.com/apache/struts/blob/master/core/src/main/resources/struts-default.xml#L391>
>> [2] https://struts.apache.org/plugins/convention/#introduction <https://struts.apache.org/plugins/convention/#introduction>
>>
> You don’t use the plugin convention in this example
>
> I don’t understand

There is a common pattern to display index.html in case when user
requested a root path "/", in Apache HTTPD you use the
"DirectoryIndex" directive [1]. The same behaviour you can have when
using the Convention plugin, having a class IndexAction.class, it will
be automatically used when user requested the root path "/".

[1] https://httpd.apache.org/docs/2.0/mod/mod_dir.html


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]