Log4J Error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Log4J Error

anon
Strange log4j error running on ubuntu. Any idea?

| Error log4j:ERROR Failed to flush writer,
| Error java.io.IOException: File too large
| Error     at java.io.FileOutputStream.writeBytes(Native Method)
| Error     at java.io.FileOutputStream.write(FileOutputStream.java:345)
| Error     at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
| Error     at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
| Error     at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
| Error     at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
| Error     at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
| Error     at
org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)
| Error     at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)
| Error     at
org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
| Error     at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
| Error     at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
| Error     at org.apache.log4j.Category.callAppenders(Category.java:206)
| Error     at org.apache.log4j.Category.forcedLog(Category.java:391)
| Error     at org.apache.log4j.Category.log(Category.java:856)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.logMessage(GrailsLog4jLoggerAdapter.java:192)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.error(GrailsLog4jLoggerAdapter.java:167)
| Error     at
org.apache.commons.logging.impl.SLF4JLog.error(SLF4JLog.java:213)
| Error     at
org.codehaus.groovy.grails.exceptions.DefaultStackTraceFilterer.filter(DefaultStackTraceFilterer.java:105)
| Error     at
org.codehaus.groovy.grails.exceptions.DefaultStackTraceFilterer.filter(DefaultStackTraceFilterer.java:84)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.cleanIfException(GrailsLog4jLoggerAdapter.java:178)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.logMessage(GrailsLog4jLoggerAdapter.java:191)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.debug(GrailsLog4jLoggerAdapter.java:95)
| Error     at
org.apache.commons.logging.impl.SLF4JLog.debug(SLF4JLog.java:141)
| Error     at
org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.getPluginBundles(PluginAwareResourceBundleMessageSource.java:149)
| Error     at
org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.afterPropertiesSet(PluginAwareResourceBundleMessageSource.java:102)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
| Error     at
org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.doCreateBean(ReloadAwareAutowireCapableBeanFactory.java:127)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
| Error     at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
| Error     at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
| Error     at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
| Error     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
| Error     at
org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:786)
| Error     at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
| Error     at
org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
| Error     at
org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:169)
| Error     at
org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
| Error     at
org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:122)
| Error     at
org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:108)
| Error     at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
| Error     at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
| Error     at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
| Error     at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
| Error     at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
| Error     at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
| Error     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
| Error     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error     at java.lang.Thread.run(Thread.java:744)


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Log4J Error

burtbeckwith
How big is the file?

You should probably be using a rolling appender - you wouldn't want to try to parse through a multi-gigabyte file looking for log messages of interest.

Burt

anon wrote
Strange log4j error running on ubuntu. Any idea?

| Error log4j:ERROR Failed to flush writer,
| Error java.io.IOException: File too large
| Error     at java.io.FileOutputStream.writeBytes(Native Method)
| Error     at java.io.FileOutputStream.write(FileOutputStream.java:345)
| Error     at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
| Error     at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
| Error     at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
| Error     at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
| Error     at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
| Error     at
org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)
| Error     at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)
| Error     at
org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
| Error     at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
| Error     at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
| Error     at org.apache.log4j.Category.callAppenders(Category.java:206)
| Error     at org.apache.log4j.Category.forcedLog(Category.java:391)
| Error     at org.apache.log4j.Category.log(Category.java:856)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.logMessage(GrailsLog4jLoggerAdapter.java:192)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.error(GrailsLog4jLoggerAdapter.java:167)
| Error     at
org.apache.commons.logging.impl.SLF4JLog.error(SLF4JLog.java:213)
| Error     at
org.codehaus.groovy.grails.exceptions.DefaultStackTraceFilterer.filter(DefaultStackTraceFilterer.java:105)
| Error     at
org.codehaus.groovy.grails.exceptions.DefaultStackTraceFilterer.filter(DefaultStackTraceFilterer.java:84)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.cleanIfException(GrailsLog4jLoggerAdapter.java:178)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.logMessage(GrailsLog4jLoggerAdapter.java:191)
| Error     at
org.slf4j.impl.GrailsLog4jLoggerAdapter.debug(GrailsLog4jLoggerAdapter.java:95)
| Error     at
org.apache.commons.logging.impl.SLF4JLog.debug(SLF4JLog.java:141)
| Error     at
org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.getPluginBundles(PluginAwareResourceBundleMessageSource.java:149)
| Error     at
org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.afterPropertiesSet(PluginAwareResourceBundleMessageSource.java:102)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
| Error     at
org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.doCreateBean(ReloadAwareAutowireCapableBeanFactory.java:127)
| Error     at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
| Error     at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
| Error     at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
| Error     at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
| Error     at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
| Error     at
org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:786)
| Error     at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
| Error     at
org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
| Error     at
org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:169)
| Error     at
org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
| Error     at
org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:122)
| Error     at
org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:108)
| Error     at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
| Error     at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
| Error     at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
| Error     at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
| Error     at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
| Error     at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
| Error     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
| Error     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
| Error     at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
| Error     at java.lang.Thread.run(Thread.java:744)


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: Log4J Error

anon

Size: 740,156  bytes

And my config is.

log4j = {
     // Example of changing the log pattern for the default console
appender:
     //
     //appenders {
     //    console name:'stdout', layout:pattern(conversionPattern:
'%c{2} %m%n')
     //}
     appenders {

         console name:"stdout", threshold: org.apache.log4j.Level.INFO
         environments {
             development {
                 rollingFile name:"file", file: "console.txt",
threshold: org.apache.log4j.Level.DEBUG//, maxFileSize: default is 10MB
             }
             test {
                 rollingFile name:"file-test", file: "console-test.txt"
, maxFileSize: 5000000,
                     threshold: org.apache.log4j.Level.DEBUG
             }
         }
     }

     root {
         debug 'file'
     }
     error  'org.codehaus.groovy.grails.web.servlet',        // controllers
            'org.codehaus.groovy.grails.web.pages',          // GSP
            'org.codehaus.groovy.grails.web.sitemesh',       // layouts
            'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
            'org.codehaus.groovy.grails.web.mapping',        // URL mapping
            'org.codehaus.groovy.grails.commons',            // core /
classloading
            'org.codehaus.groovy.grails.plugins',            // plugins
            'org.codehaus.groovy.grails.orm.hibernate',      //
hibernate integration
            'org.springframework',
            'org.hibernate',
            'net.sf.ehcache.hibernate'
//    info   'grails.app'
}

On 03/22/2014 10:58 PM, burtbeckwith wrote:

> How big is the file?
>
> You should probably be using a rolling appender - you wouldn't want to try
> to parse through a multi-gigabyte file looking for log messages of interest.
>
> Burt
>
>
> anon wrote
>> Strange log4j error running on ubuntu. Any idea?
>>
>> | Error log4j:ERROR Failed to flush writer,
>> | Error java.io.IOException: File too large
>> | Error     at java.io.FileOutputStream.writeBytes(Native Method)
>> | Error     at java.io.FileOutputStream.write(FileOutputStream.java:345)
>> | Error     at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
>> | Error     at
>> sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
>> | Error     at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
>> | Error     at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
>> | Error     at
>> java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
>> | Error     at
>> org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)
>> | Error     at
>> org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)
>> | Error     at
>> org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
>> | Error     at
>> org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
>> | Error     at
>> org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
>> | Error     at org.apache.log4j.Category.callAppenders(Category.java:206)
>> | Error     at org.apache.log4j.Category.forcedLog(Category.java:391)
>> | Error     at org.apache.log4j.Category.log(Category.java:856)
>> | Error     at
>> org.slf4j.impl.GrailsLog4jLoggerAdapter.logMessage(GrailsLog4jLoggerAdapter.java:192)
>> | Error     at
>> org.slf4j.impl.GrailsLog4jLoggerAdapter.error(GrailsLog4jLoggerAdapter.java:167)
>> | Error     at
>> org.apache.commons.logging.impl.SLF4JLog.error(SLF4JLog.java:213)
>> | Error     at
>> org.codehaus.groovy.grails.exceptions.DefaultStackTraceFilterer.filter(DefaultStackTraceFilterer.java:105)
>> | Error     at
>> org.codehaus.groovy.grails.exceptions.DefaultStackTraceFilterer.filter(DefaultStackTraceFilterer.java:84)
>> | Error     at
>> org.slf4j.impl.GrailsLog4jLoggerAdapter.cleanIfException(GrailsLog4jLoggerAdapter.java:178)
>> | Error     at
>> org.slf4j.impl.GrailsLog4jLoggerAdapter.logMessage(GrailsLog4jLoggerAdapter.java:191)
>> | Error     at
>> org.slf4j.impl.GrailsLog4jLoggerAdapter.debug(GrailsLog4jLoggerAdapter.java:95)
>> | Error     at
>> org.apache.commons.logging.impl.SLF4JLog.debug(SLF4JLog.java:141)
>> | Error     at
>> org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.getPluginBundles(PluginAwareResourceBundleMessageSource.java:149)
>> | Error     at
>> org.codehaus.groovy.grails.context.support.PluginAwareResourceBundleMessageSource.afterPropertiesSet(PluginAwareResourceBundleMessageSource.java:102)
>> | Error     at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
>> | Error     at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
>> | Error     at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
>> | Error     at
>> org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.doCreateBean(ReloadAwareAutowireCapableBeanFactory.java:127)
>> | Error     at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
>> | Error     at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
>> | Error     at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
>> | Error     at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
>> | Error     at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
>> | Error     at
>> org.springframework.context.support.AbstractApplicationContext.initMessageSource(AbstractApplicationContext.java:786)
>> | Error     at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
>> | Error     at
>> org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
>> | Error     at
>> org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:169)
>> | Error     at
>> org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
>> | Error     at
>> org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:122)
>> | Error     at
>> org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:108)
>> | Error     at
>> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
>> | Error     at
>> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
>> | Error     at
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
>> | Error     at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>> | Error     at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
>> | Error     at
>> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
>> | Error     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>> | Error     at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>> | Error     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>> | Error     at java.lang.Thread.run(Thread.java:744)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>      http://xircles.codehaus.org/manage_email
>
>
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Log4J-Error-tp4655337p4655338.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>      http://xircles.codehaus.org/manage_email
>
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email