2 Replies Latest reply on Apr 17, 2013 1:11 PM by malky

    weblogic not displaying apache logs from log4j.xml

      I keep getting an error in my browser:
          java.lang.IllegalArgumentException: argument type mismatch
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
               at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
               at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
               at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
               at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
               at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
               at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
               at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
               at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
               at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
               at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1008)
               at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
               at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
               at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
               at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6780)
               at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
               at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
               at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3820)
               at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
               at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
               at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
      and I can't seem to find out what field is causing this in my jsp. From what I heard it has to do with beanultil not being able to parse the right field so I tried adding the following to my log4j.xml to find more info as to what field is having problems:
            <appender name="ApacheRollingFileAppender" class="org.apache.log4j.DailyRollingFileAppender">
              <param name="File" value="logs/myApache.log"/>
              <param name="DatePattern" value="yyyy-MM-dd"/>
              <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%-5p %d{ISO8601} [%t] (%C{1}.%M:%L) - %m %n"/>
            <category name="org.apache.commons.beanutils">
                  <level value="DEBUG"/>
                  <appender-ref ref="ApacheRollingFileAppender"/>
      I see the file "myApache.log" got created but there's no info in it when i re-test the error, I have other existing appenders and categories in this same file which do give output so I know it has nothing to do with the file or the path itself.

      .. what am i missing?
        • 1. Re: weblogic not displaying apache logs from log4j.xml
          You are not going to magically get logs when you add an appender, whatever tech you're using would need to actually log out stuff. And without this appender / category the logs would have already appeared in your general root logger, this configuration is to just redirect specific logs to a different file.

          Try a struts forum, there people will have run into your problem a million times. Likely it is actually in struts that you may be able to activate some debug logging. Not by adding a log category but with some configuration property.


          thinking about it, perhaps trace logging is generated. so try lowering the level to TRACE.
          • 2. Re: weblogic not displaying apache logs from log4j.xml
            OK good to know.

            I didn't know these type of logging had anything to do with struts, then lets change this a bit... what can I do in weblogic or the jsp to see the debug log from "org.apache.commons.beanutils"? or to find out which is the field that is causing this error?

            I'm using weblogic 8.1