[ 
https://issues.apache.org/jira/browse/MAHOUT-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean Owen resolved MAHOUT-380.
------------------------------

         Assignee: Sean Owen
    Fix Version/s: 0.4
       Resolution: Fixed

Oops! fixed

> IllegalArgumentException from AbstractJDBCDataModel constructor which is 
> extended by AbstractBooleanPrefJDBCDataModel
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: MAHOUT-380
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-380
>             Project: Mahout
>          Issue Type: Bug
>    Affects Versions: 0.3
>         Environment: Eclipse 
>            Reporter: Rashmi Paliwal
>            Assignee: Sean Owen
>             Fix For: 0.4
>
>
> AbstractBooleanPrefJDBCDataModel extends the AbstractJDBCDataModel. It calls 
> the super.constructor by intentionally setting the last two argument value as 
> null because AbstractBooleanPrefJDBCDataModel is meant where we don' have the 
> preference value. Below is the code snippet:
> protected AbstractBooleanPrefJDBCDataModel(DataSource dataSource,
>                                              String preferenceTable,
>                                              String userIDColumn,
>                                              String itemIDColumn,
>                                              String preferenceColumn,
>                                              String getPreferenceSQL,
>                                              String getUserSQL,
>                                              String getAllUsersSQL,
>                                              String getNumItemsSQL,
>                                              String getNumUsersSQL,
>                                              String setPreferenceSQL,
>                                              String removePreferenceSQL,
>                                              String getUsersSQL,
>                                              String getItemsSQL,
>                                              String getPrefsForItemSQL,
>                                              String 
> getNumPreferenceForItemSQL,
>                                              String 
> getNumPreferenceForItemsSQL) {
>     super(dataSource, preferenceTable, userIDColumn, itemIDColumn, 
> preferenceColumn, getPreferenceSQL,
>         getUserSQL, getAllUsersSQL, getNumItemsSQL, getNumUsersSQL, 
> setPreferenceSQL, removePreferenceSQL,
>         getUsersSQL, getItemsSQL, getPrefsForItemSQL, 
> getNumPreferenceForItemSQL, getNumPreferenceForItemsSQL,
>         null, null);
>     this.setPreferenceSQL = setPreferenceSQL;
>   }
> AbstractJDBCDataModel is checking for the null arguments and throwing the 
> IlllegalArgumentException. Here is the code 
> AbstractJDBCComponent.checkNotNullAndLog("getMaxPreferenceSQL", 
> getMaxPreferenceSQL);
> AbstractJDBCComponent.checkNotNullAndLog("getMinPreferenceSQL", 
> getMinPreferenceSQL);
> For this case getMaxPreferenceSQL and getMinPreferenceSQL value is null as 
> set in the AbstractBooleanPrefJDBCDataModel class.
> Fix for this would be a great help.
> Thanks,
> Rashmi

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to