GeoTools

unit tests fail on Win XP

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0-b1
  • Fix Version/s: 2.0-b2
  • Component/s: unsupported
  • Labels:
    None
  • Environment:
    Windows XP, Java 1.4.0_02

Description

The following error is generated:

Testsuite: org.geotools.data.pickle.PickleTest
Tests run: 4, Failures: 0, Errors: 3, Time elapsed: 0.812 sec

Testcase: testMultiFeatureTypeStorage took 0.656 sec
Testcase: testWriteWithArbitraryObjects took 0.094 sec
Caused an ERROR
IOError
org.geotools.data.DataSourceException: IOError
at org.geotools.data.pickle.PickleDataSource.setFeatures(PickleDataSource.java:44)
at org.geotools.data.pickle.PickleTest.testWriteWithArbitraryObjects(PickleTest.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.io.FileNotFoundException: c:\DOCUME~1\iant\LOCALS~1\Temp\tmp_pickle_delete_me.obj (The requested operation cannot be performed on a file with a user-mapped section open)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.geotools.data.pickle.PickleDataSource.setFeatures(PickleDataSource.java:39)
... 15 more

Testcase: testWriteWithArbitraryObjectsTestcase: testWriteWithSharedObjects took 0.015 sec
Caused an ERROR
IOError
org.geotools.data.DataSourceException: IOError
at org.geotools.data.pickle.PickleDataSource.setFeatures(PickleDataSource.java:44)
at org.geotools.data.pickle.PickleTest.testWriteWithSharedObjects(PickleTest.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.io.FileNotFoundException: c:\DOCUME~1\iant\LOCALS~1\Temp\tmp_pickle_delete_me.obj (The requested operation cannot be performed on a file with a user-mapped section open)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.geotools.data.pickle.PickleDataSource.setFeatures(PickleDataSource.java:39)
... 15 more

Testcase: testWriteWithSharedObjectsTestcase: testUnicodeSupport took 0.016 sec
Caused an ERROR
IOError
org.geotools.data.DataSourceException: IOError
at org.geotools.data.pickle.PickleDataSource.setFeatures(PickleDataSource.java:44)
at org.geotools.data.pickle.PickleTest.testUnicodeSupport(PickleTest.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.io.FileNotFoundException: c:\DOCUME~1\iant\LOCALS~1\Temp\tmp_pickle_delete_me.obj (The requested operation cannot be performed on a file with a user-mapped section open)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.geotools.data.pickle.PickleDataSource.setFeatures(PickleDataSource.java:39)
... 15 more

Testcase: testUnicodeSupport

Activity

Hide
Ian Wolfe Schneider added a comment -
This is not a major issue.
Show
Ian Wolfe Schneider added a comment - This is not a major issue.
Hide
Ian Wolfe Schneider added a comment -
Anyone who has a windows system which is based on the redundant NT technology (some research showed me that this particular error comes from the native side in NT), could you please investigate this? I believe it comes from attempting to open a FileInputStream on a File when there is already a FileOutputStream opened on the same file...

For the mean time, it could be as simple as changing the test case to not reuse the same temp file, but I believe finding the actual problem and documenting a fix could be useful not only for geotools, but for anyone.

Thanks,
Ian
Show
Ian Wolfe Schneider added a comment - Anyone who has a windows system which is based on the redundant NT technology (some research showed me that this particular error comes from the native side in NT), could you please investigate this? I believe it comes from attempting to open a FileInputStream on a File when there is already a FileOutputStream opened on the same file... For the mean time, it could be as simple as changing the test case to not reuse the same temp file, but I believe finding the actual problem and documenting a fix could be useful not only for geotools, but for anyone. Thanks, Ian
Hide
Ian Turton added a comment -
works on XP now
Show
Ian Turton added a comment - works on XP now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: