Opened 8 years ago

Closed 8 years ago

#1110 closed defect (fixed)

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

Reported by: Bang Pham Huu Owned by: drusu
Priority: major Milestone: 9.2
Component: petascope Version: development
Keywords: petascope make error Cc: Dimitar Misev, Vlad Merticariu
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 by Alex Dumitru, 8 years ago

Owner: changed from Alex Dumitru to drusu
Priority: criticalmajor
Status: newassigned

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 by Bang Pham Huu, 8 years ago

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

comment:3 by drusu, 8 years ago

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

comment:4 by Dimitar Misev, 8 years ago

Has it been fixed?

comment:5 by drusu, 8 years ago

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 by Bang Pham Huu, 8 years ago

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 by Dimitar Misev, 8 years ago

Can you try and upload the patch again now?

in reply to:  7 comment:8 by drusu, 8 years ago

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 by Dimitar Misev, 8 years ago

Ok please submit it now straight to the patchmanager.

comment:10 by Bang Pham Huu, 8 years ago

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
-----------------------------------

in reply to:  9 comment:11 by drusu, 8 years ago

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 by Bang Pham Huu, 8 years ago

Resolution: fixed
Status: assignedclosed

patch accepted, thanks Danut Rutsu, close ticket.

Note: See TracTickets for help on using tickets.