私はこれらのようなconstを持つenum型のlibを使用しています。OrientDBがUnicode、Turkish、enumsに問題があります
Type.SHORT
Type.LONG
Type.FLOAT
Type.STRING
私はEclipseでデバッグしていますが、私はエラーだ:私はトルコのシステムを使用していたよう
No enum const class Type.STRİNG
を、私の作業上の問題がある>İが、これは、列挙型のconstであるとして私はすべての属性をUTF-8にしても、何もそれを得ることはできませんSTRINGはEclipseが探すべきものです。しかしそれはまだSTRİNGを探して見つけることができず、私はそれを使うことができません。私はそのために何をしなければならないのですか?
プロジェクト>プロパティ>リソース>テキストファイルのエンコードは現在UTF-8です。問題を抱えている。
編集:さらに詳しい情報は私が得ることのできないいくつかの手がかりを与えるかもしれません。 私はOrientDBに取り組んでいます。これは私の最初の試みです。そのため、問題がOrientDBパッケージにあるかどうかわかりません。しかし、私は他の多くのライブラリを使用している、私はこのような問題を見たことがない。このパッケージにOType列挙型があり、データベースに接続しようとしています。
String url = "local:database";
ODatabaseObjectTx db = new ODatabaseObjectTx(url).
Person person = new Person("John");
db.save(person);
db.close();
私はまだ使用しているコードはありません。データベースが作成されたが、その後、私はjava.lang.IllegalArgumentException
を得る:ここで
Caused by: java.lang.IllegalArgumentException: No enum const class com.orientechnologies.orient.core.metadata.schema.OType.STRİNG
at java.lang.Enum.valueOf(Unknown Source)
at com.orientechnologies.orient.core.metadata.schema.OType.valueOf(OType.java:41)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateProperty.parse(OCommandExecutorSQLCreateProperty.java:81)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateProperty.parse(OCommandExecutorSQLCreateProperty.java:35)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:43)
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:28)
at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:63)
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:63)
at com.orientechnologies.orient.core.metadata.schema.OClassImpl.addProperty(OClassImpl.java:342)
at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createProperty(OClassImpl.java:258)
at com.orientechnologies.orient.core.metadata.security.OSecurityShared.create(OSecurityShared.java:177)
at com.orientechnologies.orient.core.metadata.security.OSecurityProxy.create(OSecurityProxy.java:37)
at com.orientechnologies.orient.core.metadata.OMetadata.create(OMetadata.java:70)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.create(ODatabaseRecordAbstract.java:142)
... 4 more
そして、他のクラス。 OCommandExecutorSQLCreateProperty: http://code.google.com/p/orient/source/browse/trunk/core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLCreateProperty.java
ライン81は言う:type = OType.valueOf(word.toString());
'Type.STR'とタイプした直後に' CTRL + Space'を押すとEclipseが自動的に完了するのですか? –
実際には直接入力することはありません。反射やそれを使うものがなければなりません。しかし、あなたの質問の答えとして、入力することで、問題はありません。 Ctrl + Spaceを押すとType.STRINGが得られます(問題なく、正しい) –
おそらく、enumを反射的に呼び出すコードに問題があります。その値はどこから来ていますか?ユーザー入力は、トルコ語のみのキーボード、または 'I'の代わりに'İ'を送信する別のシステムを使用しますか? –