You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by sangeetasharma <ss...@bmjgroup.com> on 2010/08/20 16:53:56 UTC

Java Heap size error when uplaoding big XML file

Hi,

I am currently trying to unzip a zip file containing a very large XML
file(400MB) and then uploading into XML DB. This is causing me java heap
size error, however it works fine for smaller files but as soon it starts
uploading the big XML file my pc hang then java heap size problem arrives.
My camel config is something like

 <camel:route id="StartFtpInteractionTriggerRoute" autoStartup="true">
          <camel:from
uri="quartz://scheduledInteractPoll?cron=0+10+14+20+*+?" />
          <camel:setHeader headerName="routeToStart">
                  <constant>FtpInteractionPollingRoute</constant>
          </camel:setHeader>
          <camel:bean ref="routeController" method="start" />    
          <camel:stop />
      </camel:route>   
      
      <camel:route id="FtpInteractionPollingRoute"
errorHandlerRef="deadLetterErrorHandler" autoStartup="false">
              <camel:from
uri="ftp://{{ftp.interaction.url}}?username={{ftp.username}}&amp;password={{ftp.password}}&amp;binary=true&amp;localWorkDirectory={{localwork.dirpath}}&amp;filter=#interactFileFilter&amp;disconnect=true"
/>
              <camel:onCompletion>
                      <camel:filter>
                              <camel:simple>${property.CamelBatchComplete}
== true</camel:simple>
                              <camel:setHeader headerName="routeToStop">
                                     
<camel:constant>FtpInteractionPollingRoute</camel:constant>
                              </camel:setHeader>
                              <camel:to uri="seda:StopRouteRoute" />
                      </camel:filter>
              </camel:onCompletion>
               <camel:log message="Downloading the ${file:onlyname} from
interaction ftp path to interaction file path" loggingLevel="INFO"
logName="InteractionLogging"/>
              <camel:to uri="file://{{interact.path}}" />
      </camel:route>   
      
     <camel:route>
        <camel:from
uri="file://{{interact.path}}?noop=true&amp;idempotent=false"/>
         <camel:log message="Processing the ${file:onlyname} from
Interaction File path" loggingLevel="INFO" logName="InteractionLogging"/>
         <camel:pipeline>
             <camel:setHeader headerName="fileType">
                    <camel:constant>interact</camel:constant>
            </camel:setHeader>
            <camel:process ref="unZipProcess"/>
            <camel:when>
              <camel:simple>${file:ext} == 'xml' and ${file:onlyname} !=
'idbinteractionsbasic.xml'</camel:simple>
              <camel:log message="Uploading the ${file:onlyname}"
loggingLevel="INFO" logName="InteractionLogging"/>
              <camel:process ref="lexiCompContentUploader"/>  
            </camel:when>
         </camel:pipeline>
      </camel:route>


-- 
View this message in context: http://camel.465427.n5.nabble.com/Java-Heap-size-error-when-uplaoding-big-XML-file-tp2642289p2642289.html
Sent from the Camel Development mailing list archive at Nabble.com.