Opened 18 years ago
Closed 17 years ago
#1869 closed defect (invalid)
Can't compile test
Reported by: | Owned by: | unicoletti | |
---|---|---|---|
Priority: | high | Milestone: | 4.10 release |
Component: | MapScript-Java | Version: | 4.10 |
Severity: | normal | Keywords: | |
Cc: |
Description
QueryByAttribute does not use imageObj. Line one should be deleted. 1. WARNING in examples/QueryByAttribute.java (at line 1) import edu.umn.gis.mapscript.imageObj; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import edu.umn.gis.mapscript.imageObj is never used ---------- In RunTimeBuiltWMSClient.java methods setMap and setWeb do not exist. If delete, the tests run fine. ---------- 2. ERROR in examples/RunTimeBuiltWMSClient.java (at line 48) web.setMap(map); ^^^^^^ The method setMap(mapObj) is undefined for the type webObj ---------- 3. ERROR in examples/RunTimeBuiltWMSClient.java (at line 49) map.setWeb(web); ^^^^^^ The method setWeb(webObj) is undefined for the type mapObj ---------- gmake: *** [test] Erreur 255 Denis
Change History (10)
comment:3 by , 18 years ago
Milestone: | → 4.10 release |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I have fixed this issue in CVS HEAD and will be in the next 4.10 beta. The handling of enumerations MS_IMAGEMODE.MS_IMAGEMODE_RGB is due to swig which changed the way enums are handled after 1.3.24 and made the new method the default.
comment:4 by , 18 years ago
New Problems with javac javac -classpath ./:examples/:./mapscript.jar -d examples/ examples/ConnPool.java examples/DrawMap.java examples/DumpShp.java examples/MakePoint.java examples/QueryByAttribute.java examples/ShapeInfo.java examples/WxSTest.java examples/Metadata.java examples/RunTimeBuiltWMSClient.java ---------- 1. WARNING in examples/QueryByAttribute.java (at line 1) import edu.umn.gis.mapscript.imageObj; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import edu.umn.gis.mapscript.imageObj is never used ---------- ---------- 2. ERROR in examples/RunTimeBuiltWMSClient.java (at line 36) output.setImagemode(MS_IMAGEMODE.MS_IMAGEMODE_RGB.swigValue()); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MS_IMAGEMODE cannot be resolved ---------- 3. ERROR in examples/RunTimeBuiltWMSClient.java (at line 60) layer.setType(MS_LAYER_TYPE.MS_LAYER_RASTER); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MS_LAYER_TYPE cannot be resolved ---------- 4. ERROR in examples/RunTimeBuiltWMSClient.java (at line 61) layer.setConnectiontype(MS_CONNECTION_TYPE.MS_WMS); ^^^^^^^^^^^^^^^^^^^^^^^^^ MS_CONNECTION_TYPE cannot be resolved ---------- make: *** [test] Erreur 255
comment:5 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
More problems with javac... javac -classpath ./:examples/:./mapscript.jar -d examples/ examples/ConnPool.java examples/DrawMap.java examples/DumpShp.java examples/MakePoint.java examples/QueryByAttribute.java examples/ShapeInfo.java examples/WxSTest.java examples/Metadata.java examples/RunTimeBuiltWMSClient.java ---------- 1. WARNING in examples/QueryByAttribute.java (at line 1) import edu.umn.gis.mapscript.imageObj; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The import edu.umn.gis.mapscript.imageObj is never used ---------- ---------- 2. ERROR in examples/RunTimeBuiltWMSClient.java (at line 36) output.setImagemode(MS_IMAGEMODE.MS_IMAGEMODE_RGB.swigValue()); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MS_IMAGEMODE cannot be resolved ---------- 3. ERROR in examples/RunTimeBuiltWMSClient.java (at line 60) layer.setType(MS_LAYER_TYPE.MS_LAYER_RASTER); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ MS_LAYER_TYPE cannot be resolved ---------- 4. ERROR in examples/RunTimeBuiltWMSClient.java (at line 61) layer.setConnectiontype(MS_CONNECTION_TYPE.MS_WMS); ^^^^^^^^^^^^^^^^^^^^^^^^^ MS_CONNECTION_TYPE cannot be resolved ---------- make: *** [test] Erreur 255
comment:6 by , 18 years ago
Did you update your code from cvs and what version of swig are you using? On a fresh checkout from cvs the following works for me: ./configure --with-threads --without-pdf --without-tiff --with-gdal --with-proj --with-geos make cd mapscript/java make make test
comment:7 by , 18 years ago
I recompiled from CVS and got the same errors. Here is my java version. javac -v Eclipse Java Compiler 0.319_R21x, Copyright IBM Corp 2000-2003. All rights reserved. java --version java version "1.5.0_03" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07) Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
comment:8 by , 18 years ago
You probably have an old copy of swig or of mapserver lyin' around. I can't reproduce the error.
comment:9 by , 17 years ago
I have issues on RHEL4 with java 1.5.0_06-b05, SWIG 1.3.21, and MapServer 4.10.0. examples/RunTimeBuiltWMSClient.java:36: package MS_IMAGEMODE does not exist output.setImagemode(MS_IMAGEMODE.MS_IMAGEMODE_RGB.swigValue()); ^ examples/RunTimeBuiltWMSClient.java:60: cannot find symbol symbol : variable MS_LAYER_TYPE location: class RunTimeBuiltWMSClient layer.setType(MS_LAYER_TYPE.MS_LAYER_RASTER); ^ examples/RunTimeBuiltWMSClient.java:61: cannot find symbol symbol : variable MS_CONNECTION_TYPE location: class RunTimeBuiltWMSClient layer.setConnectiontype(MS_CONNECTION_TYPE.MS_WMS); ^ 3 errors make: *** [test] Error 1
comment:10 by , 17 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Compiling the tests when using swig 1.3.21 is not supported as stated in the README in the mapscript/java directory. You need at least 1.3.24, 1.3.28 or higher is better. Closing.
Note:
See TracTickets
for help on using tickets.