Turn off the use of memory mapping on the file channel; it is one of 
those connection paraemters options as I recall; also using new 
ShapefileDataStore is not that cool in a production application - try to 
use the DataStoreFinder so you can take advantage of improvements to our 
code as you update GeoTools.

Also please build and try out trunk; it has a new implementation of 
Shapefile for your testing pleasure.
Jody

> run your program with more heap space ? Adding for example "-Xmx512m" ?
>
>   
>> ----- Oorspronkelijk bericht -----
>> Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Verzonden: woensdag, april 23, 2008 11:10 AM
>> Aan: [email protected]
>> Onderwerp: [Geotools-gt2-users] Problem creating ShapefileDataStore (large   
>> shape file)
>>
>> Hi all,
>>
>> I have problems reading a big shape file. When trying to create a 
>> ShapefileDataStore, I get the following exception:
>>
>> I try this:
>> this.store = new ShapefileDataStore(this.shapeURL);
>>
>> java.io.IOException: Für diesen Befehl ist nicht genügend Speicher verfügbar
>>        at sun.nio.ch.FileChannelImpl.map0(Native Method)
>>        at sun.nio.ch.FileChannelImpl.map(Unknown Source)
>>        at 
>> org.geotools.data.shapefile.shp.ShapefileReader.init(ShapefileReader.java:245)
>>        at 
>> org.geotools.data.shapefile.shp.ShapefileReader.<init>(ShapefileReader.java:148)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.openShapeReader(ShapefileDataStore.java:466)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:670)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:626)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:620)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.getFeatureSource(ShapefileDataStore.java:927)
>>        at 
>> com.ptvag.geomanagement.shapefile.ShapeFileReader.setShapeFilePath(ShapeFileReader.java:89)
>>        at 
>> com.ptvag.geomanagement.servlets.UploadHandlerServlet.collectZipFileInformation(UploadHandlerServlet.java:245)
>>        at 
>> com.ptvag.geomanagement.servlets.UploadHandlerServlet.handleUpload(UploadHandlerServlet.java:165)
>>        at 
>> com.ptvag.geomanagement.servlets.UploadHandlerServlet.doPost(UploadHandlerServlet.java:86)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>        at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>        at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>        at 
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
>>        at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>        at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>        at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>        at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>        at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>>        at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>>        at 
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>        at 
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>        at 
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>        at java.lang.Thread.run(Unknown Source)
>>
>> Do you have any tips how I can read large files?
>>
>> Regards,
>> Thorsten
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
>> Don't miss this year's exciting event. There's still time to save $100. 
>> Use priority code J8TL2D2. 
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>>     
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to