[ 
https://issues.apache.org/jira/browse/WICKET-6549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16440429#comment-16440429
 ] 

Martin Grigorov commented on WICKET-6549:
-----------------------------------------

The most important part of the stacktrace is missing. What is failing with 
java.lang.ArrayIndexOutOfBoundsException ?
There must be few more lines below it.

I see no way how such kind of error can lead to problems for all 
users/sessions. 
Can you please provide a small application that demonstrates the problem ? For 
example with embedded database.

> Log4j JDBCAppender makes apache wicket form submit to fail
> ----------------------------------------------------------
>
>                 Key: WICKET-6549
>                 URL: https://issues.apache.org/jira/browse/WICKET-6549
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.20.0
>         Environment: Linux, Java 1.7
>            Reporter: Babu Krishnamurthy
>            Priority: Critical
>
> *+Issue Description:+*
> An error that occurs on form submit, needs to be logged in JDBCAppender 
> log4j.  But due to conversionPattern not being a database query, impacts all 
> further users and other sessions when they go to the same form submit button, 
> and apache wicket throws error.
>  
>  *+Apache Softwares:+*
> Apache Wicket Version: 6.20.0
> slf4j.version: 1.7.10
> log4j.version: 1.2.17
>  
>  *+Below are the steps to reproduce:+*
>  # On submit of a form button, there was an error - nested exception is 
> java.sql.SQLException: ORA-12899: value too large for column
>  # The above error needs to be logged into JDBCAppender.
>  # The error log fails to log into JDBCAppender due to the conversionPattern 
> not being a database query.
>  # All other users, when they go through the application journey, they submit 
> the same form button as above.
>  # The apache wicket throws error, and restricts the application flow to 
> complete.
>  # An error in JDBCAppender log4j due to conversionPattern not being a 
> database query, impacts all further users and other sessions, wherein when 
> they go to the same form submit button, apache wicket throws error.
>  
> *+Log4j.xml:+*
> <appender name="DB" class="org.apache.log4j.jdbc.JDBCAppender">
>                     <param name="URL" 
> value="${boarding.log4j.dbappender.url}"/>
>                     <param name="Driver" 
> value="${boarding.log4j.dbappender.driverClassName}" />
>                     <param name="User" 
> value="${boarding.log4j.dbappender.username}" />
>                     <filter class="org.apache.log4j.varia.LevelMatchFilter">
>                         <param name="LevelToMatch" value="error" />
>                         <param name="AcceptOnMatch" value="true" />
>                     </filter>
>                     <filter class="org.apache.log4j.varia.DenyAllFilter"/>
>                     <param name="Password" 
> value="${boarding.log4j.dbappender.password}" />
>                         <layout 
> class="org.apache.log4j.EnhancedPatternLayout">
>                             <param name="ConversionPattern"  value="%m,%n "/>
>                          </layout>
>  </appender>
>  
> Points to note:
> Trigger for the error to be logged into JDBCAppender - nested exception is 
> java.sql.SQLException: ORA-12899: value too large for column
> This error is not logged into JDBCAppender due to ConversionPattern not being 
> a database query.
>  
> Below are the stack trace of exceptions from apache wicket, whenever the form 
> is submitted, post the jdbcappender log issue.
> *+Apache Wicket logs:+*
> org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface 
> org.apache.wicket.markup.html.form.IFormSubmitListener targeted at 
> [BoardingApplicationForm [Component id = form]] on component 
> [BoardingApplicationForm [Component id = form]] threw an exception
>         at 
> org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)
>         at 
> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
>         at 
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:243)
>         at 
> org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
>         at 
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
>         at 
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
>         at 
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
>         at 
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
>         at 
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
>         at 
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
>         at 
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
>         at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
>         at 
> com.fdc.boarding.web.filter.ClickjackFilter.doFilter(ClickjackFilter.java:31)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
>         at 
> com.fdc.boarding.web.ui.DisableUrlSessionFilter.doFilter(DisableUrlSessionFilter.java:61)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
>         at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
>         at 
> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
>         at 
> org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:395)
>         at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:559)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
>         at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>         at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at 
> org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
>         ... 32 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to