one of my smaller import files (8mb) is taking forever to be read in and
there is no output.
I am seeing the memory rail against the max setting.
got this error.

javax.servlet.ServletException: Servlet execution threw an exception
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:259)

root cause
java.lang.OutOfMemoryError: Java heap space
        java.util.Arrays.copyOfRange(Unknown Source)
        java.lang.String.<init>(Unknown Source)
        java.lang.StringBuffer.toString(Unknown Source)
        java.io.StringWriter.toString(Unknown Source)
        org.apache.log4j.spi.LocationInfo.<init>(LocationInfo.java:114)
org.apache.log4j.spi.LoggingEvent.getLocationInformation(LoggingEvent.java:247)
        org.apache.log4j.AsyncAppender.append(AsyncAppender.java:160)
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
        org.apache.log4j.Category.callAppenders(Category.java:206)
        org.apache.log4j.Category.forcedLog(Category.java:391)
        org.apache.log4j.Category.log(Category.java:856)
        org.ofbiz.base.util.Debug.log(Debug.java:166)
        org.ofbiz.base.util.Debug.log(Debug.java:149)
        org.ofbiz.base.util.Debug.logInfo(Debug.java:258)
        org.ofbiz.datafile.RecordIterator.getNextLine(RecordIterator.java:117)
        org.ofbiz.datafile.RecordIterator.next(RecordIterator.java:163)
        org.ofbiz.datafile.DataFile.readDataFile(DataFile.java:126)
        org.ofbiz.datafile.DataFile.readFile(DataFile.java:63)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        java.lang.reflect.Method.invoke(Unknown Source)
        org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
        groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
        groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1105)
        
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749)
        
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
        viewdatafile.run(viewdatafile.groovy:65)
        org.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:117)
        
org.ofbiz.widget.screen.ModelScreenAction$Script.runAction(ModelScreenAction.java:408)
org.ofbiz.widget.screen.ModelScreenAction.runSubActions(ModelScreenAction.java:118)


some of my files are 331 megs or larger.
they are imported from a URL, so there is no chance to chop them up.

My suggested solution is redesign to read/write and not store the
records. once a record is created it is then parse and removed from memory.


does anyone have another solution?


=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation 
<http://www.businessesnetwork.com/automation/viewforum.php?f=93>
Specialtymarket.com <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>



Reply via email to