Re: [JPP-Devel] Some Sextante tools don't like negative pixel values

2020-12-23 Thread Rahkonen Jukka (MML)
Hi,

Yes, the tools are in the Raster menu.
It seems that this issue happens with Java 11 but not with Java 8 ( versions I 
have are OpenJDK 11 and Corretto 8)

With Java 8

  *   Countours are OK (but user should know that contours must be created for 
the raw, not colorized image)
  *   Histogram is OK
  *   Create Polygons From Raster – AdbToolbox gives NPE
java.lang.NullPointerException
   at 
org.openjump.core.rasterimage.algorithms.VectorizeAlgorithm.toPolygonsAdbToolBox(VectorizeAlgorithm.java:111)

at 
org.openjump.core.ui.plugin.raster.VectorizeToPolygonsPlugIn.run(VectorizeToPolygonsPlugIn.java:170)

at   
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151)



Start with Java 11 prints also something that Java 8 does not  into console 
window:
---Start OJ---
java.nio.file.NoSuchFileException: 
C:\ohjelmat\OJ\OpenJUMP-20201222-r6656-PLUS\conf
at 
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at 
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:96)
at 
java.base/sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:257)
at java.base/sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:891)
at java.base/sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:42)
at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.toFileURL(PlugInClassLoader.java:140)
at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.addClassPathToUCP(PlugInClassLoader.java:121)
at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.(PlugInClassLoader.java:27)
at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)
at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at 
java.base/java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1977)
at java.base/java.lang.System.initPhase3(System.java:2069)

And both Java 8 and Java 11 prints this warning about 30 times during the 
startup. It must have something to do with the new style option “Interior 
border (slow)”.

[WARN] 10:50:51.916 Expected 'interior' attribute but found none. Tag = line; 
Attributes = [Attribute: enabled="true"], [Attribute: width="1"]

-Jukka-

Lähettäjä: Michaud Michael 
Lähetetty: tiistai 22. joulukuuta 2020 23.36
Vastaanottaja: OpenJump develop and use 
Aihe: Re: [JPP-Devel] Some Sextante tools don't like negative pixel values


Hi Jukka,

Did you mean tools of Raster menu working on Sextante raster ? Exception seems 
to come from VectorizeToContoursPlugIn.

I tried to reproduce the error with your last image (values from -16 to 0), but 
it produced contours without error.

Michaël



envoyé : 22 décembre 2020 à 16:22
de : "Rahkonen Jukka (MML)" 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
à : 
"jump-pilot-devel@lists.sourceforge.net"
 
mailto:jump-pilot-devel@lists.sourceforge.net>>
objet : [JPP-Devel] Some Sextante tools don't like negative pixel values


Hi,



I believe that the stack trace below means that the tool does not accept 
negative values. Tools which generate these errors are in the Sextante menu:

  *   histogram
  *   create polygons with the Adbtoolbox algorithm
  *   create contours



java.lang.NumberFormatException: For input string: "?16.257333755493"

  at 
java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)

  at 
java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)

  at 
java.base/java.lang.Double.parseDouble(Double.java:543)

  at java.base/java.lang.Double.valueOf(Double.java:506)

  at 
com.vividsolutions.jump.util.StringUtil.toString(StringUtil.java:397)

  at 
com.vividsolutions.jump.workbench.ui.AbstractMultiInputDialog.addDoubleField(AbstractMultiInputDialog.java:723)

  at 
com.vividsolutions.jump.workbench.ui.AbstractMultiInputDialog.addDoubleField(AbstractMultiInputDialog.java:705)

  at 
org.openjump.core.ui.plugin.raster.VectorizeToContoursPlugIn.setDialogValues(VectorizeToContoursPlugIn.java:154)

  at 
org.openjump.core.ui.plugin.raster.VectorizeToContoursPlugIn.execute(VectorizeToContoursPlugIn.java:109)

  at 
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(AbstractPlugIn.java:344)

  at 
java.desktop/javax.

Re: [JPP-Devel] Some Sextante tools don't like negative pixel values

2020-12-23 Thread Rahkonen Jukka (MML)
Hi,

I guess that the warnings about the missing interior tags come from the 
predefined styles that we have in the style editor. Would it break opening OJ 
projects with older versions if this tag would be added to predefined styles?

-Jukka-

Lähettäjä: Michaud Michael 
Lähetetty: keskiviikko 23. joulukuuta 2020 12.11
Vastaanottaja: Rahkonen Jukka (MML) 
Aihe: Re: [JPP-Devel] Some Sextante tools don't like negative pixel values


Wow,



These are other errors. Not sure it is related to yesterday's report.

May be it is worth writing a proper bug report about each :



- NumberFormatException in yesterday's report : probably a bug in the way we 
display numbers in the dialog of VectorizeToContoursPlugIn. I need to reproduce 
the problem but until now I can't (I used your image with negative values and 
OpenJDK11)



- NullPointerException in VectorizeToPolygonsPlugIn with java 8 : I can 
reproduce. Will investigate and try to fix ASAP.



- NoSuchFileException : no idea. There is no plugin name in the stacktrace. 
Seems to happen during OpenJUMP initialization. I don't know what is this 
"OpenJUMP-20201222-r6656-PLUS\conf" file or directory it is looking for. Maybe 
Ede will have a better idea as the error happens in the PlugInClassLoader



- about the warning : yes, this warning has been added with the interior border 
capability. Maybe it is not really useful. It throws a warning because 
'interior' attribute is not really an optional tag, but it is accepted 
(hard-coded exception) in order to guarantee backward compatibility.



Michaël



envoyé : 23 décembre 2020 à 10:10
de : "Rahkonen Jukka (MML)" 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
à : Michaud Michael 
mailto:m.michael.mich...@orange.fr>>, OpenJump 
develop and use 
mailto:jump-pilot-devel@lists.sourceforge.net>>
objet : Re: [JPP-Devel] Some Sextante tools don't like negative pixel values


Hi,



Yes, the tools are in the Raster menu.

It seems that this issue happens with Java 11 but not with Java 8 ( versions I 
have are OpenJDK 11 and Corretto 8)



With Java 8

  *   Countours are OK (but user should know that contours must be created for 
the raw, not colorized image)
  *   Histogram is OK
  *   Create Polygons From Raster – AdbToolbox gives NPE
java.lang.NullPointerException

   at 
org.openjump.core.rasterimage.algorithms.VectorizeAlgorithm.toPolygonsAdbToolBox(VectorizeAlgorithm.java:111)

at 
org.openjump.core.ui.plugin.raster.VectorizeToPolygonsPlugIn.run(VectorizeToPolygonsPlugIn.java:170)

at   
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151)





Start with Java 11 prints also something that Java 8 does not  into console 
window:
---Start OJ---

java.nio.file.NoSuchFileException: 
C:\ohjelmat\OJ\OpenJUMP-20201222-r6656-PLUS\conf

at 
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)

at 
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:96)

at 
java.base/sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:257)

at java.base/sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:891)

at java.base/sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:42)

at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.toFileURL(PlugInClassLoader.java:140)

at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.addClassPathToUCP(PlugInClassLoader.java:121)

at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.(PlugInClassLoader.java:27)

at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)

at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

at 
java.base/java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1977)

at java.base/java.lang.System.initPhase3(System.java:2069)



And both Java 8 and Java 11 prints this warning about 30 times during the 
startup. It must have something to do with the new style option “Interior 
border (slow)”.

[WARN] 10:50:51.916 Expected 'interior' attribute but found none. Tag = line; 
Attributes = [Attribute: enabled="true"], [Attribute: width="1"]

-Jukka-



Lähettäjä: Michaud Michael 
mailto:m.michael.mich...@orange.fr>>
Lähetetty: tiistai 22. joulukuuta 2020 23.36
Vastaanottaja: OpenJump develop and use 
mailto:jump-pilot-devel@lists.sourceforge.net>>
Aihe: Re: [JPP-Devel] Some Sextante tools don't like negative pixel values



Hi Jukka,

Did you mean tools of Raster menu working on Sextante raster ? Exception seems 
to come from VectorizeToContoursPlugIn.

I tried to reproduce th

Re: [JPP-Devel] Some Sextante tools don't like negative pixel values

2020-12-23 Thread Rahkonen Jukka (MML)
Hi,

About the NumberFormatException with OpenJDK 11, it seems to have something to 
do with the locale. Error happens with my default settings (Finnish) but not 
when I use

set JAVA_OPTS=%JAVA_OPTS% -Duser.language=en -Duser.country=EN

It would be irritating if characters used as decimal separator will start to 
make trouble with JDK 11 and higher. Let’s hope that it does not happen 
generally.

-Jukka Rahkonen-

Lähettäjä: Michaud Michael 
Lähetetty: keskiviikko 23. joulukuuta 2020 12.11
Vastaanottaja: Rahkonen Jukka (MML) 
Aihe: Re: [JPP-Devel] Some Sextante tools don't like negative pixel values


Wow,



These are other errors. Not sure it is related to yesterday's report.

May be it is worth writing a proper bug report about each :



- NumberFormatException in yesterday's report : probably a bug in the way we 
display numbers in the dialog of VectorizeToContoursPlugIn. I need to reproduce 
the problem but until now I can't (I used your image with negative values and 
OpenJDK11)



- NullPointerException in VectorizeToPolygonsPlugIn with java 8 : I can 
reproduce. Will investigate and try to fix ASAP.



- NoSuchFileException : no idea. There is no plugin name in the stacktrace. 
Seems to happen during OpenJUMP initialization. I don't know what is this 
"OpenJUMP-20201222-r6656-PLUS\conf" file or directory it is looking for. Maybe 
Ede will have a better idea as the error happens in the PlugInClassLoader



- about the warning : yes, this warning has been added with the interior border 
capability. Maybe it is not really useful. It throws a warning because 
'interior' attribute is not really an optional tag, but it is accepted 
(hard-coded exception) in order to guarantee backward compatibility.



Michaël



envoyé : 23 décembre 2020 à 10:10
de : "Rahkonen Jukka (MML)" 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
à : Michaud Michael 
mailto:m.michael.mich...@orange.fr>>, OpenJump 
develop and use 
mailto:jump-pilot-devel@lists.sourceforge.net>>
objet : Re: [JPP-Devel] Some Sextante tools don't like negative pixel values


Hi,



Yes, the tools are in the Raster menu.

It seems that this issue happens with Java 11 but not with Java 8 ( versions I 
have are OpenJDK 11 and Corretto 8)



With Java 8

  *   Countours are OK (but user should know that contours must be created for 
the raw, not colorized image)
  *   Histogram is OK
  *   Create Polygons From Raster – AdbToolbox gives NPE
java.lang.NullPointerException

   at 
org.openjump.core.rasterimage.algorithms.VectorizeAlgorithm.toPolygonsAdbToolBox(VectorizeAlgorithm.java:111)

at 
org.openjump.core.ui.plugin.raster.VectorizeToPolygonsPlugIn.run(VectorizeToPolygonsPlugIn.java:170)

at   
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151)





Start with Java 11 prints also something that Java 8 does not  into console 
window:
---Start OJ---

java.nio.file.NoSuchFileException: 
C:\ohjelmat\OJ\OpenJUMP-20201222-r6656-PLUS\conf

at 
java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)

at 
java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:96)

at 
java.base/sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:257)

at java.base/sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:891)

at java.base/sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:42)

at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.toFileURL(PlugInClassLoader.java:140)

at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.addClassPathToUCP(PlugInClassLoader.java:121)

at 
com.vividsolutions.jump.workbench.plugin.PlugInClassLoader.(PlugInClassLoader.java:27)

at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)

at 
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at 
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

at 
java.base/java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1977)

at java.base/java.lang.System.initPhase3(System.java:2069)



And both Java 8 and Java 11 prints this warning about 30 times during the 
startup. It must have something to do with the new style option “Interior 
border (slow)”.

[WARN] 10:50:51.916 Expected 'interior' attribute but found none. Tag = line; 
Attributes = [Attribute: enabled="true"], [Attribute: width="1"]

-Jukka-



Lähettäjä: Michaud Michael 
mailto:m.michael.mich...@orange.fr>>
Lähetetty: tiistai 22. joulukuuta 2020 23.36
Vastaanottaja: OpenJump develop and use 
mailto:jump-pilot-devel@lists.sourceforge.net>>
Aihe: Re: [JPP-Devel] Some Sextante tools don't like negat

[JPP-Devel] NoSuchFileException ... "OpenJUMP-20201222-r6656-PLUS\conf"

2020-12-23 Thread edgar . soldin
On 12/23/2020 13:15, Rahkonen Jukka (MML) wrote:
> - NoSuchFileException : no idea. There is no plugin name in the stacktrace. 
> Seems to happen during OpenJUMP initialization. I don't know what is this 
> "OpenJUMP-20201222-r6656-PLUS\conf" file or directory it is looking for. 
> Maybe Ede will have a better idea as the error happens in the 
> PlugInClassLoader

seems to be the not existing defined classpath entry 'conf'

---CLASSPATH---
.;bin;conf;lib\batik-awt-util-1.6.jar;...

not sure why it is there. can probably removed. will change the stack to a 
better looking logged warning instead. ..ede


___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6658] core/trunk/src/com/vividsolutions/jump/workbench/plugin/ PlugInClassLoader.java

2020-12-23 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6658
  http://sourceforge.net/p/jump-pilot/code/6658
Author:   edso
Date: 2020-12-23 14:38:26 + (Wed, 23 Dec 2020)
Log Message:
---
replace stack with a more informative  message printed to STDOUT

Modified Paths:
--

core/trunk/src/com/vividsolutions/jump/workbench/plugin/PlugInClassLoader.java

Modified: 
core/trunk/src/com/vividsolutions/jump/workbench/plugin/PlugInClassLoader.java
===
--- 
core/trunk/src/com/vividsolutions/jump/workbench/plugin/PlugInClassLoader.java  
2020-12-22 12:34:31 UTC (rev 6657)
+++ 
core/trunk/src/com/vividsolutions/jump/workbench/plugin/PlugInClassLoader.java  
2020-12-23 14:38:26 UTC (rev 6658)
@@ -2,6 +2,8 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -140,8 +142,14 @@
   return Paths.get(s).toRealPath().toUri().toURL();
 } catch (InvalidPathException | IOException ignore) {
   // malformed path string or class path element does not exist
-  // we cannot use Logger during VM init, so we simply print to STDERR
-  ignore.printStackTrace(System.err);
+  // we _cannot_ use Logger during VM init, so we have to print to STDERR
+  StringWriter sw = new StringWriter();
+  PrintWriter pw = new PrintWriter(sw);
+  ignore.printStackTrace(pw);
+  String stack = sw.toString();
+  // print first line of stack only containing Exception class name and 
message
+  int index = stack.indexOf("\n");
+  System.err.println("Problem adding classpath entry '"+s+"': 
"+stack.substring(0, index>0?index:stack.length()));
   return null;
 }
   }



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


[JPP-Devel] SVN: [6659] core/trunk/scripts

2020-12-23 Thread jump-pilot-svn--- via Jump-pilot-devel
Revision: 6659
  http://sourceforge.net/p/jump-pilot/code/6659
Author:   edso
Date: 2020-12-23 14:48:06 + (Wed, 23 Dec 2020)
Log Message:
---
remove obsolete "./conf/" classpath entry
some minor reformatting

Modified Paths:
--
core/trunk/scripts/oj_linux.sh
core/trunk/scripts/oj_windows.bat

Modified: core/trunk/scripts/oj_linux.sh
===
--- core/trunk/scripts/oj_linux.sh  2020-12-23 14:38:26 UTC (rev 6658)
+++ core/trunk/scripts/oj_linux.sh  2020-12-23 14:48:06 UTC (rev 6659)
@@ -218,7 +218,7 @@
 do
   CLASSPATH="$libfile":"$CLASSPATH";
 done
-CLASSPATH=.:./bin:./conf:$CLASSPATH
+CLASSPATH=.:./bin:$CLASSPATH
 export CLASSPATH;
 
 ## prepend jump opts

Modified: core/trunk/scripts/oj_windows.bat
===
--- core/trunk/scripts/oj_windows.bat   2020-12-23 14:38:26 UTC (rev 6658)
+++ core/trunk/scripts/oj_windows.bat   2020-12-23 14:48:06 UTC (rev 6659)
@@ -10,12 +10,12 @@
 rem set SETTINGS_HOME="%HOMEDRIVE%%HOMEPATH%"\.openjump
 
 rem -- uncomment to manually set java home, wrap in double quotes to protect 
special chars --
-rem set JAVA_HOME="C:\Program Files (x86)\Java\jre1.8.0_xx"
+rem set "JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_xx"
 
 rem -- uncomment to use 'java' and enable debug console output, if unset 
defaults to 'javaw' for background jre  --
 rem set JAVA_BIN=java
 
-rem -- set some default OJ options here (eg. -v debug), initialize empty --
+rem -- set some default OJ options here (eg. '-v debug'), initialize empty --
 rem -- run OJ with '--help' argument to find out which are available --
 set JUMP_OPTS=
 
@@ -219,7 +219,7 @@
 if /i NOT "%JAVA_BIN%"=="javaw" echo ---PATH--- & echo %PATH%
 
 rem -- set classpath --
-set CLASSPATH=.;bin;conf
+set CLASSPATH=.;bin
 rem -- add jars to classpath --
 for %%i in (
   "%LIB%\*.jar" "%LIB%\*.zip" "%LIB%\imageio-ext\*.jar"



___
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel