yuuhayashi / citygml-osm

CityGMLデータをOSMデータに変換する
Other
19 stars 3 forks source link

v2.1.0:動作しません #125

Closed okadatsuneo closed 1 year ago

okadatsuneo commented 1 year ago

Windows11, Java17.0.7で動かしていますが、4thのスクリプトを動かすと下記のような表示となり動作しませんでした。

>java -Dfile.encoding=utf-8 -jar citygml-osm-jar-with-dependencies.jar 4th Exception in thread "main" java.lang.UnsupportedClassVersionError: osm/surveyor/gml/camel/CitygmlLoad has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) >

yuuhayashi commented 1 year ago

私の環境では動作しました。

$ ls
2nd.bat  4th.sh                         52387729_bldg_6697_op.zip              conversion.json  upload.osm
2nd.sh   52387729_bldg_6697_op.gml      LICENSE.txt                            pack.sh
3rd.bat  52387729_bldg_6697_op.mrg.osm  README.md                              run.bat
3rd.sh   52387729_bldg_6697_op.org.osm  checked.osm                            run.sh
4th.bat  52387729_bldg_6697_op.osm      citygml-osm-jar-with-dependencies.jar  unpack.sh

$ ./4th.sh
osm-4th.camel.start();
[main] INFO org.apache.camel.impl.engine.AbstractCamelContext - Apache Camel 3.21.2 (camel-1) is starting
[main] INFO org.apache.camel.impl.engine.AbstractCamelContext - Routes startup (started:3)
[main] INFO org.apache.camel.impl.engine.AbstractCamelContext -     Started route1 (direct://checked-file-read)
[main] INFO org.apache.camel.impl.engine.AbstractCamelContext -     Started route2 (direct://checked-convert)
[main] INFO org.apache.camel.impl.engine.AbstractCamelContext -     Started route3 (direct://release-export)
[main] INFO org.apache.camel.impl.engine.AbstractCamelContext - Apache Camel 3.21.2 (camel-1) started in 255ms (build:59ms init:182ms start:14ms)
OsmFileProcessor : "checked.osm"
osm-4th.camel.end();
[Thread-0] INFO org.apache.camel.impl.engine.AbstractCamelContext - Apache Camel 3.21.2 (camel-1) is shutting down (timeout:45s)
[Thread-0] INFO org.apache.camel.impl.engine.AbstractCamelContext - Routes stopped (stopped:3)
[Thread-0] INFO org.apache.camel.impl.engine.AbstractCamelContext -     Stopped route3 (direct://release-export)
[Thread-0] INFO org.apache.camel.impl.engine.AbstractCamelContext -     Stopped route2 (direct://checked-convert)
[Thread-0] INFO org.apache.camel.impl.engine.AbstractCamelContext -     Stopped route1 (direct://checked-file-read)
[Thread-0] INFO org.apache.camel.impl.engine.AbstractCamelContext - Apache Camel 3.21.2 (camel-1) shutdown in 34ms (uptime:0s)
osm-4th.camel.stop();

$ java -version
openjdk version "17.0.8.1" 2023-08-24
OpenJDK Runtime Environment (build 17.0.8.1+1-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.8.1+1-Ubuntu-0ubuntu122.04, mixed mode, sharing)
$

Java のマイナーバージョンの違い?、OSの違いか? 原因はわかりませんが、at java.security.AccessController.doPrivileged(Native Method) とあるのでセキュリティ関係の問題の可能性があります。

とりあえず、Java 17 を最新版にアップデートしてみてください。

okadatsuneo commented 1 year ago

javaをアップデートすると、スクリプトが動作しました。 アドバイスありがとうございました。