#1110 closed defect (fixed)

Petascope package java.nio.file does not exist when build

Reported by: bphamhuu Owned by: drusu
Priority: major Milestone: 9.2
Component: petascope Version: development
Keywords: petascope make error Cc: dmisev, vmerticariu
Complexity: Easy

Description

In the newest version, I cannot make to build Petascope, may be someone has delete this jar library.

 package java.nio.file does not exist
import java.nio.file.FileSystems;
                    ^
src/test/java/petascope/wcs2/XXEVulnerabilityTest.java:29: package java.nio.file does not exist
import java.nio.file.Files;
                    ^
src/test/java/petascope/wcs2/XXEVulnerabilityTest.java:30: package java.nio.file does not exist
import java.nio.file.Path;
                    ^
src/test/java/petascope/wcs2/XXEVulnerabilityTest.java:72: cannot find symbol
symbol  : class Path
location: class petascope.wcs2.XXEVulnerabilityTest
        Path path = FileSystems.getDefault().getPath("/tmp/", "file_test.txt");
        ^
src/test/java/petascope/wcs2/XXEVulnerabilityTest.java:72: cannot find symbol
symbol  : variable FileSystems
location: class petascope.wcs2.XXEVulnerabilityTest
        Path path = FileSystems.getDefault().getPath("/tmp/", "file_test.txt");
                    ^
src/test/java/petascope/wcs2/XXEVulnerabilityTest.java:76: cannot find symbol
symbol  : variable Files
location: class petascope.wcs2.XXEVulnerabilityTest
            boolean success = Files.deleteIfExists(path);
                              ^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
make: *** [compileit] Error 1
rm build/web/WEB-INF/classes/all.javas

Change History (12)

comment:1 Changed 17 months ago by mdumitru

  • Owner changed from mdumitru to drusu
  • Priority changed from critical to major
  • Status changed from new to assigned

This is a java core library, it's in the SDK not in any jar. I assumme java.nio is available in SDK 1.7 so you need java 7 to compile this.
It would be best if this test was rewritten to compile with java6, i.e. remove the java.nio dependencies.

comment:2 Changed 17 months ago by bphamhuu

yes, I've used JAVA 6 to compile, and this should support from Java 6 as you pointed out. Thanks.

comment:3 Changed 17 months ago by drusu

Ok no problem. I will rewrite the test to compile with java 6. I didn't know that when i did it.

comment:4 Changed 16 months ago by dmisev

Has it been fixed?

comment:5 Changed 16 months ago by drusu

Yes, it has been fixed. I tried to test the patch on jenkins, but it failed and I think it is not because of me. I asked Mircea to have a look at it and after that i will upload it on patch manager.
Here is the link : http://212.201.49.21:35000/job/rasdaman-community-manual-patch-test_Debian/281/console

comment:6 Changed 16 months ago by bphamhuu

good work, Danut Rusu. Actually, Jenkin is having problem, i.e.

++ +++ wrong passwd
[ERROR] - Communication error: 802 Access denied
[ERROR] - Error: Connection to rasdaman server failed with 802: RasManager Error: Access denied, incorrect user/password.
rasdaman error 802: RasManager Error: Access denied, incorrect user/password.
Recognized bad case, exit code 255
[ERROR] - Communication error: 802 Access denied
[ERROR] - Error: Connection to rasdaman server failed with 802: RasManager Error: Access denied, incorrect user/password.
rasdaman error 802: RasManager Error: Access denied, incorrect user/password.

comment:7 follow-up: Changed 16 months ago by dmisev

Can you try and upload the patch again now?

comment:8 in reply to: ↑ 7 Changed 16 months ago by drusu

Replying to dmisev:

Can you try and upload the patch again now?

I did try. But it is the same result.
http://212.201.49.21:35000/job/rasdaman-community-manual-patch-test_Debian/283/console

comment:9 follow-up: Changed 16 months ago by dmisev

Ok please submit it now straight to the patchmanager.

comment:10 Changed 16 months ago by bphamhuu

Dimitar has submitted a patch, Danut Rusu, can you try with your patch?

Here is the error in WCPS test that marks failure.

running test: 101-max_delta_px_history.test

for c in (irr_cube_2) return encode (
   coverage max_delta_pixel_history
   over     $t t ( 1 : 3 )
   values   max((c[E(100000:110000), N(5100000:5110000), ansi:"CRS:1"($t)]).b1 -
                (c[E(100000:110000), N(5100000:5110000), ansi:"CRS:1"($t - 1)]).b2)
, "csv")

test.sh: byte comparison
test.sh:  ->  TEST FAILED
-----------------------------------

comment:11 in reply to: ↑ 9 Changed 16 months ago by drusu

Replying to dmisev:

Ok please submit it now straight to the patchmanager.

I submitted now straight to the patch manager. Can you check it ?

comment:12 Changed 16 months ago by bphamhuu

  • Resolution set to fixed
  • Status changed from assigned to closed

patch accepted, thanks Danut Rutsu, close ticket.

Note: See TracTickets for help on using tickets.