简体   繁体   English

Duke Fast Deduplication:java.lang.UnsupportedOperationException:尚不支持操作?

[英]Duke Fast Deduplication: java.lang.UnsupportedOperationException: Operation not yet supported?

I'm trying to use the Duke Fast Deduplication Engine to search for some duplicate records in the database at the company where I work. 我正在尝试使用Duke快速重复数据删除引擎在我工作的公司的数据库中搜索一些重复记录。

I run it from the command line like this: 我从命令行运行它,如下所示:

java -cp "C:\utils\duke-0.6\duke-0.6.jar;C:\utils\duke-0.6\lucene-core-3.6.1.jar" no.priv.garshol.duke.Duke --showmatches --verbose .\config.xml

But I get an error: 但是我收到一个错误:

Exception in thread "main" java.lang.UnsupportedOperationException: Operation no
t yet supported
        at sun.jdbc.odbc.JdbcOdbcResultSet.isClosed(Unknown Source)
        at no.priv.garshol.duke.datasources.JDBCDataSource$JDBCIterator.close(JD
BCDataSource.java:115)
        at no.priv.garshol.duke.Processor.deduplicate(Processor.java:152)
        at no.priv.garshol.duke.Duke.main_(Duke.java:135)
        at no.priv.garshol.duke.Duke.main(Duke.java:38)

My configuration file looks like this: 我的配置文件如下所示:

<duke>
   <schema>
         <threshold>0.82</threshold>
         <maybe-threshold>0.80</maybe-threshold>
         <path>test</path>

         <property type="id">
              <name>ID</name>
         </property>

         <property>
             <name>LNAME</name>
             <comparator>no.priv.garshol.duke.comparators.ExactComparator</comparator>
             <low>0.6</low>
             <high>0.8</high>
         </property>

         <property>
             <name>FNAME</name>
             <comparator>no.priv.garshol.duke.comparators.ExactComparator</comparator>
             <low>0.6</low>
             <high>0.8</high>
         </property>

         <property>
             <name>MNAME</name>
             <comparator>no.priv.garshol.duke.comparators.ExactComparator</comparator>
             <low>0.3</low>
             <high>0.5</high>
         </property>

         <property>
             <name>SSN</name>
             <comparator>no.priv.garshol.duke.comparators.ExactComparator</comparator>
             <low>0.0</low>
             <high>1.0</high>
         </property>

   </schema>
   <jdbc>
          <param name="driver-class" value="sun.jdbc.odbc.JdbcOdbcDriver" />
          <param name="connection-string" value="jdbc:odbc:VT_DeDupe" />
          <param name="user-name" value="aleer" />
          <param name="password" value="**" />
          <param name="query" value="select SocialSecurityNumber, LastName, FirstName, MiddleName, empssn from T_Employees" />

          <column name="SocialSecurityNumber" property="ID" />
          <column name="LastName" property="LNAME" />
          <column name="FirstName" property="FNAME" />
          <column name="MiddleName" property="MNAME" />
          <column name="empssn" property="SSN" />
   </jdbc>
</duke>

It doesn't really tell me what is unsupported...I'm just trying it out, nothing serious with the configuration yet. 它并没有真正告诉我什么是不受支持的...我只是尝试一下,配置还没有什么严重的。

As mbonaci says, the problem is that the JDBC driver's isClosed() method is not implemented. 正如mbonaci所说,问题是JDBC驱动程序的isClosed()方法没有实现。 This even though implementing it would be no harder than simply writing "return closed". 即使实施它也不会简单地写“返回关闭”。

I added an ugly workaround for this issue now. 我现在为这个问题添加了一个丑陋的解决方法。 Please do an "hg pull" and try again. 请做一个“hg pull”然后再试一次。

Which Java version are you using? 您使用的是哪个Java版本?
sun.jdbc.odbc.JdbcOdbcResultSet.isClosed first appeared in Java 1.6. sun.jdbc.odbc.JdbcOdbcResultSet.isClosed首次出现在Java 1.6中。 and it still looks like this in v1.7 (I haven't checked in Java 8): 它仍然在v1.7中看起来像这样(我没有在Java 8中检查过):

public boolean isClosed() throws SQLException {
    throw new UnsupportedOperationException("Operation not yet supported");
}

So simply don't call that method. 所以根本就不要调用那个方法。 Use some other way of checking whether resultset is closed. 使用其他方法检查结果集是否已关闭。

Or if you cannot change the code ask the project's authors for help (I see there was an effort to solve exception when closing RS). 或者,如果您无法更改代码,请向项目的作者寻求帮助(我看到在关闭RS时需要努力解决异常 )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 “ java.lang.UnsupportedOperationException:尚不支持。” - “java.lang.UnsupportedOperationException: Not supported yet.” “java.lang.UnsupportedOperationException:尚不支持。” - “java.lang.UnsupportedOperationException: Not supported yet.” java.lang.UnsupportedOperationException:尚不支持 - java.lang.UnsupportedOperationException: Not supported yet Java Dropbox HttpServletRequest(java.lang.UnsupportedOperationException:尚不支持。) - Java Dropbox HttpServletRequest ( java.lang.UnsupportedOperationException: Not supported yet.) 由java.lang.UnsupportedOperationException引起:AdapterView不支持addView(View,layoutParams) - Caused by java.lang.UnsupportedOperationException: addView(View,layoutParams) is not supported in the AdapterView DBFit java.lang.UnsupportedOperationException: 不支持类型 İNT - DBFit java.lang.UnsupportedOperationException: Type İNT is not supported java.lang.UnsupportedOperationException:option不是受支持的字段类型 - java.lang.UnsupportedOperationException: option is not a supported field type Tomcat连接池-java.lang.UnsupportedOperationException:BasicDataSource不支持 - Tomcat Connection Pooling - java.lang.UnsupportedOperationException: Not supported by BasicDataSource 由于“线程“AWT-EventQueue-0”中的异常java.lang.UnsupportedOperationException:尚不支持,我的程序无法读取密钥。 - my program cant read the keys because of "Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet." java.lang.UnsupportedOperationException: &#39;posix:permissions&#39; 不支持作为 Windows 上的初始属性 - java.lang.UnsupportedOperationException: 'posix:permissions' not supported as initial attribute on Windows
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM