<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: problem importing point shapefile to postgis in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/problem-importing-point-shapefile-to-postgis/m-p/2376604#M146208</link>
    <description>Hello all 
&lt;BR /&gt;I am importing shape file to my application iam getting a message posted below in the console but no error is coming shape file importing correctly. 
&lt;BR /&gt; 
&lt;BR /&gt; ug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shp by org.geotools.data.shapefile.shp.ShapefileReader 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shx by org.geotools.data.shapefile.shp.IndexFile 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shp by org.geotools.data.shapefile.shp.ShapefileReader 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shx by org.geotools.data.shapefile.shp.IndexFile 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader 
&lt;BR /&gt; 
&lt;BR /&gt;i tried to solve it but i have not got the solution on the web . please help me i am pasting the code below 
&lt;BR /&gt; public boolean openShapeFile() throws Exception 
&lt;BR /&gt; { 
&lt;BR /&gt; File dataFile = new File(FileNames); 
&lt;BR /&gt; ShapefileDataStore store = new IndexedShapefileDataStore(dataFile.toURI().toURL()); 
&lt;BR /&gt; SimpleFeatureSource source = store.getFeatureSource(); 
&lt;BR /&gt; final SimpleFeatureCollection featureCollection = source.getFeatures(); 
&lt;BR /&gt; simpleFeatureIterator = featureCollection.features(); 
&lt;BR /&gt; return true; 
&lt;BR /&gt; } 
&lt;BR /&gt;here i am iterating through simpleFeatureIterator 
&lt;BR /&gt; 
&lt;BR /&gt;thanks and regards.</description>
    <pubDate>Fri, 23 Aug 2013 09:45:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-23T09:45:17Z</dc:date>
    <item>
      <title>problem importing point shapefile to postgis</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-importing-point-shapefile-to-postgis/m-p/2376602#M146206</link>
      <description>&lt;P&gt;hi all,&lt;BR /&gt;importing the stations shapefile (from the demo dataset) to postgis gives this strange error output&lt;BR /&gt;Starting job shp2pg at 17:20 12/03/2012.&lt;BR /&gt; connecting to socket on port 3685&lt;BR /&gt; connected&lt;BR /&gt;INFO: Table public.stations dropped.&lt;BR /&gt;Exception in component sPostgisOutput_1_SO&lt;BR /&gt;java.io.IOException: Feature writer is closed&lt;BR /&gt; at org.geotools.data.jdbc.JDBCFeatureWriter.hasNext(JDBCFeatureWriter.java:338)&lt;BR /&gt; at org.geotools.data.jdbc.JDBCFeatureWriter.next(JDBCFeatureWriter.java:81)&lt;BR /&gt; at org.geotools.data.jdbc.JDBCFeatureWriter.next(JDBCFeatureWriter.java:48)&lt;BR /&gt; at org.geotools.data.InProcessLockingManager$1.next(InProcessLockingManager.java:312)&lt;BR /&gt; at org.geotools.data.InProcessLockingManager$1.next(InProcessLockingManager.java:304)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.sShapefileInput_1_GIProcess(shp2pg.java:1309)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.runJobInTOS(shp2pg.java:1641)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.main(shp2pg.java:1509)&lt;BR /&gt;Source CRS is: GEOGCS], &lt;BR /&gt; PRIMEM, &lt;BR /&gt; UNIT, &lt;BR /&gt; AXIS, &lt;BR /&gt; AXIS]&lt;BR /&gt;2012-03-12 17:20:08,795 ERROR SQL Exception writing geometry columnERROR: new row for relation "stations" violates check constraint "enforce_geotype_the_geom"&lt;BR /&gt;org.postgresql.util.PSQLException: ERROR: new row for relation "stations" violates check constraint "enforce_geotype_the_geom"&lt;BR /&gt; at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)&lt;BR /&gt; at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)&lt;BR /&gt; at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)&lt;BR /&gt; at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)&lt;BR /&gt; at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:340)&lt;BR /&gt; at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:286)&lt;BR /&gt; at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)&lt;BR /&gt; at org.geotools.data.jdbc.JDBCTextFeatureWriter.doInsert(JDBCTextFeatureWriter.java:118)&lt;BR /&gt; at org.geotools.data.jdbc.JDBCFeatureWriter.write(JDBCFeatureWriter.java:215)&lt;BR /&gt; at org.geotools.data.InProcessLockingManager$1.write(InProcessLockingManager.java:331)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.sShapefileInput_1_GIProcess(shp2pg.java:1339)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.runJobInTOS(shp2pg.java:1641)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.main(shp2pg.java:1509)&lt;BR /&gt;SQL Exception writing geometry columnERROR: new row for relation "stations" violates check constraint "enforce_geotype_the_geom"&lt;BR /&gt; disconnected&lt;BR /&gt;2012-03-12 17:20:09,025 ERROR The following locker still has a lock read on file:/data/tos/SdiDemoGeoData-V1.1/station.shp by org.geotools.data.shapefile.shp.ShapefileReader&lt;BR /&gt; it was created with the following stack trace&lt;BR /&gt;org.geotools.data.shapefile.ShpFilesLocker$Trace: Locking file:/data/tos/SdiDemoGeoData-V1.1/station.shp for read by org.geotools.data.shapefile.shp.ShapefileReader in thread main&lt;BR /&gt; at org.geotools.data.shapefile.ShpFilesLocker.setTraceException(ShpFilesLocker.java:53)&lt;BR /&gt; at org.geotools.data.shapefile.ShpFilesLocker.(ShpFilesLocker.java:32)&lt;BR /&gt; at org.geotools.data.shapefile.ShpFiles.acquireRead(ShpFiles.java:352)&lt;BR /&gt; at org.geotools.data.shapefile.ShpFiles.getReadChannel(ShpFiles.java:747)&lt;BR /&gt; at org.geotools.data.shapefile.shp.ShapefileReader.(ShapefileReader.java:142)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.openShapeReader(ShapefileDataStore.java:421)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getAttributesReader(ShapefileDataStore.java:407)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getFeatureReader(ShapefileDataStore.java:327)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getFeatureReader(ShapefileDataStore.java:322)&lt;BR /&gt; at org.geotools.data.AbstractDataStore.getFeatureReader(AbstractDataStore.java:419)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getFeatureReader(ShapefileDataStore.java:372)&lt;BR /&gt; at org.geotools.data.AbstractDataStore.getFeatureReader(AbstractDataStore.java:385)&lt;BR /&gt; at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:210)&lt;BR /&gt; at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:227)&lt;BR /&gt; at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:197)&lt;BR /&gt; at org.geotools.data.store.DataFeatureCollection.features(DataFeatureCollection.java:186)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.sShapefileInput_1_GIProcess(shp2pg.java:1177)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.runJobInTOS(shp2pg.java:1641)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.main(shp2pg.java:1509)&lt;BR /&gt;2012-03-12 17:20:09,025 ERROR The following locker still has a lock read on file:/data/tos/SdiDemoGeoData-V1.1/station.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader&lt;BR /&gt; it was created with the following stack trace&lt;BR /&gt;org.geotools.data.shapefile.ShpFilesLocker$Trace: Locking file:/data/tos/SdiDemoGeoData-V1.1/station.dbf for read by org.geotools.data.shapefile.dbf.DbaseFileReader in thread main&lt;BR /&gt; at org.geotools.data.shapefile.ShpFilesLocker.setTraceException(ShpFilesLocker.java:53)&lt;BR /&gt; at org.geotools.data.shapefile.ShpFilesLocker.(ShpFilesLocker.java:32)&lt;BR /&gt; at org.geotools.data.shapefile.ShpFiles.acquireRead(ShpFiles.java:352)&lt;BR /&gt; at org.geotools.data.shapefile.ShpFiles.getReadChannel(ShpFiles.java:747)&lt;BR /&gt; at org.geotools.data.shapefile.dbf.DbaseFileReader.(DbaseFileReader.java:130)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.openDbfReader(ShapefileDataStore.java:446)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getAttributesReader(ShapefileDataStore.java:407)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getFeatureReader(ShapefileDataStore.java:327)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getFeatureReader(ShapefileDataStore.java:322)&lt;BR /&gt; at org.geotools.data.AbstractDataStore.getFeatureReader(AbstractDataStore.java:419)&lt;BR /&gt; at org.geotools.data.shapefile.ShapefileDataStore.getFeatureReader(ShapefileDataStore.java:372)&lt;BR /&gt; at org.geotools.data.AbstractDataStore.getFeatureReader(AbstractDataStore.java:385)&lt;BR /&gt; at org.geotools.data.DefaultFeatureResults.reader(DefaultFeatureResults.java:210)&lt;BR /&gt; at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:227)&lt;BR /&gt; at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:197)&lt;BR /&gt; at org.geotools.data.store.DataFeatureCollection.features(DataFeatureCollection.java:186)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.sShapefileInput_1_GIProcess(shp2pg.java:1177)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.runJobInTOS(shp2pg.java:1641)&lt;BR /&gt; at talenddemosjava.shp2pg_0_1.shp2pg.main(shp2pg.java:1509)&lt;BR /&gt;2012-03-12 17:20:09,031 ERROR There's code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it&lt;BR /&gt;Job shp2pg ended at 17:20 12/03/2012. &lt;BR /&gt;&lt;BR /&gt;if am trying to import a copy of the stations dataset (because of the strange locking messages above) it is exactly the same. if i change the geometry type from POINT to MULTIPOINT or even LINESTRING it works&lt;BR /&gt;Starting job shp2pg at 17:22 12/03/2012.&lt;BR /&gt; connecting to socket on port 3634&lt;BR /&gt; connected&lt;BR /&gt;INFO: Table public.stations dropped.&lt;BR /&gt;Source CRS is: GEOGCS], &lt;BR /&gt; PRIMEM, &lt;BR /&gt; UNIT, &lt;BR /&gt; AXIS, &lt;BR /&gt; AXIS]&lt;BR /&gt; disconnected&lt;BR /&gt;Job shp2pg ended at 17:23 12/03/2012. &lt;BR /&gt;any help appreciated&lt;BR /&gt;christian&lt;BR /&gt;p.s. importing the CCMRIVERS.shp or gboundaries.shp works fine (after removing the attributes with the type LONG)&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 12:20:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-importing-point-shapefile-to-postgis/m-p/2376602#M146206</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: problem importing point shapefile to postgis</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-importing-point-shapefile-to-postgis/m-p/2376603#M146207</link>
      <description>for the answer look here: 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCjLNCA0" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/shape-to-postgis-example-gt-only-point-features-fail/td-p/2310&lt;/A&gt;</description>
      <pubDate>Thu, 15 Mar 2012 07:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-importing-point-shapefile-to-postgis/m-p/2376603#M146207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-15T07:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: problem importing point shapefile to postgis</title>
      <link>https://community.qlik.com/t5/Talend-Studio/problem-importing-point-shapefile-to-postgis/m-p/2376604#M146208</link>
      <description>Hello all 
&lt;BR /&gt;I am importing shape file to my application iam getting a message posted below in the console but no error is coming shape file importing correctly. 
&lt;BR /&gt; 
&lt;BR /&gt; ug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shp by org.geotools.data.shapefile.shp.ShapefileReader 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shx by org.geotools.data.shapefile.shp.IndexFile 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shp by org.geotools.data.shapefile.shp.ShapefileReader 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.shx by org.geotools.data.shapefile.shp.IndexFile 
&lt;BR /&gt;Aug 23, 2013 1:39:16 PM org.geotools.data.shapefile.ShpFiles logCurrentLockers 
&lt;BR /&gt;SEVERE: The following locker still has a lock: read on file:/home/snk/land/sss.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader 
&lt;BR /&gt; 
&lt;BR /&gt;i tried to solve it but i have not got the solution on the web . please help me i am pasting the code below 
&lt;BR /&gt; public boolean openShapeFile() throws Exception 
&lt;BR /&gt; { 
&lt;BR /&gt; File dataFile = new File(FileNames); 
&lt;BR /&gt; ShapefileDataStore store = new IndexedShapefileDataStore(dataFile.toURI().toURL()); 
&lt;BR /&gt; SimpleFeatureSource source = store.getFeatureSource(); 
&lt;BR /&gt; final SimpleFeatureCollection featureCollection = source.getFeatures(); 
&lt;BR /&gt; simpleFeatureIterator = featureCollection.features(); 
&lt;BR /&gt; return true; 
&lt;BR /&gt; } 
&lt;BR /&gt;here i am iterating through simpleFeatureIterator 
&lt;BR /&gt; 
&lt;BR /&gt;thanks and regards.</description>
      <pubDate>Fri, 23 Aug 2013 09:45:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/problem-importing-point-shapefile-to-postgis/m-p/2376604#M146208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-23T09:45:17Z</dc:date>
    </item>
  </channel>
</rss>

