Exception creating source of type database

Help
2013-02-20
2013-04-25
  • Ivan Biddles

    Ivan Biddles - 2013-02-20

    Dear Rick,

    I am interested in using ChoiceMaker for de-duplication of database "person" records. I have just started with CM2, creating a project and model based upon your simple_person_matching sample.

    When I try to create a new test source of type database, I get an exception:

    Exception occurred during event dispatching:
    java.lang.ExceptionInInitializerError
            at com.choicemaker.cm.io.db.gui.DbMarkedRecordPairSourceGui.<init>(DbMarkedRecordPairSourceGui.java:56)
            at com.choicemaker.cm.io.db.gui.DbMarkedRecordPairSourceGuiFactory.createGui(DbMarkedRecordPairSourceGuiFactory.
    java:31)
            at com.choicemaker.cm.io.db.gui.DbMarkedRecordPairSourceGuiFactory.createGui(DbMarkedRecordPairSourceGuiFactory.
    java:35)
            at com.choicemaker.cm.modelmaker.gui.dialogs.SourceTypeSelectorDialog.showSource(SourceTypeSelectorDialog.java:1
    47)
            at com.choicemaker.cm.modelmaker.gui.dialogs.SourceTypeSelectorDialog.access$100(SourceTypeSelectorDialog.java:5
    2)
            at com.choicemaker.cm.modelmaker.gui.dialogs.SourceTypeSelectorDialog$4.actionPerformed(SourceTypeSelectorDialog
    .java:169)
    . . .
    Exception occurred during event dispatching:
    java.lang.ExceptionInInitializerError
            at com.choicemaker.cm.io.db.gui.DbMarkedRecordPairSourceGui.<init>(DbMarkedRecordPairSourceGui.java:56)
            at com.choicemaker.cm.io.db.gui.DbMarkedRecordPairSourceGuiFactory.createGui(DbMarkedRecordPairSourceGuiFactory.
    java:31)
            at com.choicemaker.cm.io.db.gui.DbMarkedRecordPairSourceGuiFactory.createGui(DbMarkedRecordPairSourceGuiFactory.
    java:35)
            at com.choicemaker.cm.modelmaker.gui.dialogs.SourceTypeSelectorDialog.showSource(SourceTypeSelectorDialog.java:1
    47)
            at com.choicemaker.cm.modelmaker.gui.dialogs.SourceTypeSelectorDialog.access$100(SourceTypeSelectorDialog.java:5
    2)
            at com.choicemaker.cm.modelmaker.gui.dialogs.SourceTypeSelectorDialog$4.actionPerformed(SourceTypeSelectorDialog
    .java:169)
    

    I have been unable to find the resource bundle. Could you let me know where to find it or if I'm doing something wrong? Also if you could point me to any examples/samples of using a database as the source of records, that would help me immensely.

    From what I have seen, I like what you have done with this system very much. It appears to be very powerful and useful. Thanks for all the hard work you and your colleagues have put in on it.

    Best wishes, Ivan

     
  • Ivan Biddles

    Ivan Biddles - 2013-02-20

    Hi again Rick,

    Due to a copy-and-paste error I didn't get the stack trace correct. After the ". . ." it should have been:

    Caused by: java.util.MissingResourceException: Can't find bundle for base name com.choicemaker.cm.io.db.base.util.res.Db
    , locale en_US
            at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:838)
            at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:807)
            at java.util.ResourceBundle.getBundle(ResourceBundle.java:551)
            at com.choicemaker.cm.io.db.base.util.DbMessageUtil.<clinit>(DbMessageUtil.java:23)
            ... 58 more
    

    Sorry for the mix-up. Best wishes, Ivan

     
  • Rick Hall

    Rick Hall - 2013-02-21

    Hi Ivan -

    Sorry for the slow response. I check this forum once a day. I'll take a look at your stack trace later today and see if I can spot the problem. Again, sorry for the inconvenience.

    Best regards.

    • Rick
     
  • Ivan Biddles

    Ivan Biddles - 2013-02-23

    Dear Rick,

    Thank you for the help you have been giving me off-line. This is to sum up where I have got to.

    The exception was caused by a missing DB.properties file in the com.choicemaker.cm.io.db.base plug-in. I fixed it by opening the base.jar file in the plug-in directory with 7-zip, adding res/Db.properties from the source project into the "util" sub-directory and closing the JAR again. Now the Analyzer correctly brings up the "Database Marked Record-Pair Source" dialog box.

    Unfortunately I'm a bit lost as to what to enter in the input fields in the dialog, probably because I don't have the project configuration set up properly to use a database. For example, the "data source" combo box is empty.

    Is it possible that you could provide a database-based model sample (or a link to it if one exists)?

    A simple use case might be:

       - An Oracle database (called mydb at localhost:1521) contains 3 tables - person, person_name and person_address
       - The person table has just a person_id field
       - The person_name table has the person_id foreign key, first_name, last_name
       - The person_address table has the person_id foreign key, street_address, city, state, zip, country_iso
       - A given Person record can have multiple person_name and multiple person_address records

    It wouldn't be necessary to actually create the tables or have a database. That would an exercise for the reader.

    If it is possible to get a sample of the configuration for such a data source, I'm sure I and others could work it out from there and extend the configuration to match our specific table structure.

    Again, I really like what I see and appreciate all your help.

    Best wishes, Ivan

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks