【Java】Metroのwsimport時に「GLib-GIO-ERROR **: Settings schema 'org.gnome.system.proxy' is not installed」エラー
以前、MetroでWSDLからJavaクライアントソースコードを自動生成する検証する記事を書いた。
今日、前回とは別の環境でwsimport.shを実行したところ、「GLib-GIO-ERROR **: Settings schema 'org.gnome.system.proxy' is not installed」というエラーが発生した。
$ sh wsimport.sh -keep -s src http://myserver/myapp/WebSampleService?wsdl WSDLを解析しています... GLib-GIO-ERROR **: Settings schema 'org.gnome.system.proxy' is not installed aborting... アボートしました
このエラーメッセージで検索すると、Metro以外の製品でも発生しているようで、Open JDK 1.7のバグという情報が見つかった。
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1419026
$ java -version java version "1.7.0_45" OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15) OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
自分の環境を見てみると、確かにOpen JDK 1.7を使っている。そこで、Oracle JDK1.6に変更して再実行してみる。
$ java -version java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode
JDK1.6に切り変わった。この状態で先ほどと同じコマンドを実行してみる。
$ sh wsimport.sh -keep -s src http://myserver/myapp/WebSampleService?wsdl JAX-WS 2.1 APIに付属したJDK6で実行していますが、このツールにはJAX-WS 2.2 APIが必要です。Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)を使用するか、-Xendorsedオプションを使用してください。
先ほどのエラーはでなくなったが、別のエラーとなっている。-Xendorsedオプションを使用せよとのことなので、このオプションもつけて再実行してみる。
$ sh wsimport.sh -Xendorsed -keep -s src http://myserver/myapp/WebSampleService?wsdl WSDLを解析しています... GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Not running within active session) GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Not running within active session) GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Not running within active session) GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Not running within active session) コードを生成しています... コードをコンパイルしています...
今度は無事に成功した!(何かErrorとなっているが、コード自体は正しく生成されている)
以上