Hi
2015-11-24 19:20 GMT+01:00 Emmanuel Touzery <[email protected]>
:
> Hello,
>
> I'm trying to troubleshoot an issue I have with login in the
> application. The call to HttpServletRequest.login() fails but I have
> trouble finding out exactly where is the problem.
>
> The stack is:
>
> javax.servlet.ServletException: Login failed
> at
> org.apache.catalina.authenticator.AuthenticatorBase.doLogin(AuthenticatorBase.java:850)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.login(AuthenticatorBase.java:830)
> at org.apache.catalina.connector.Request.login(Request.java:2637)
> at
> org.apache.catalina.connector.RequestFacade.login(RequestFacade.java:1064)
> at
> javax.servlet.http.HttpServletRequestWrapper.login(HttpServletRequestWrapper.java:307)
>
> When I start the application normally with a tomee copy on my disk, it
> works fine. I'm now trying to configure a startup using the tomee maven
> plugin. The login screen comes up but I can't login with this error. Since
> it's the tomee maven plugin, I can pass java system properties but I can't
> edit the tomee configuration files.
>
What do you mean? you can provide them in src/main/tomee/conf.
> I would like to have the AuthenticatorBase print out debug-level log
> messages. I have tried:
>
> -Dlog4j.category.OpenEJB.options=debug
> -Dlog4j.category.OpenEJB.startup=debug -Dlog4j.category.OpenEJB=debug
> -Dlog4j.rootLogger=debug -Dorg.apache.catalina.authenticator.level=ALL
>
>
By default it uses JUL and not log4j. You can set it up in
src/main/tomee/conf/logging.properties. Ensure ConsoleHandler level is
FINEST as well.
> In the <args> in the configuration, as well as in
> systemPropertyValues, but it still doesn't print me the extra info I would
> need.
>
> I set it up as a maven profile:
>
> <profile>
> <id>tomee-test</id>
> <dependencies>
> <!-- postgres driver and stuff like that -->
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.openejb.maven</groupId>
> <artifactId>tomee-maven-plugin</artifactId>
> <version>1.7.1</version>
> <configuration>
> <tomeeVersion>1.7.1</tomeeVersion>
> <tomeeClassifier>plus</tomeeClassifier>
> <path>${project.build.directory}/target/generic_tms-14.12.2.war</path>
> <args>-Dlog4j.category.OpenEJB.options=debug
> -Dlog4j.category.OpenEJB.startup=debug -Dlog4j.category.OpenEJB=debug
> -Dlog4j.rootLogger=debug -Dorg.apache.catalina.authenticator.level=ALL
> -Dopenejb.validation.output.level=VERBOSE</args>
> <systemPropertyVariables>
>
> <org.apache.catalina.authenticator.level>ALL</org.apache.catalina.authenticator.level>
> <openejb.validation.output.level>VERBOSE</openejb.validation.output.level>
> <log4j.category.OpenEJB.options>debug</log4j.category.OpenEJB.options>
> <log4j.category.OpenEJB.startup>debug</log4j.category.OpenEJB.startup>
> <log4j.category.OpenEJB>debug</log4j.category.OpenEJB>
> <log4j.rootLogger>debug</log4j.rootLogger>
> </systemPropertyVariables>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>
>
> How could I get that debug info printed out? Any other advice to
> troubleshoot why the login call fails?
>
> Thank you!
>
> Emmanuel
>