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

Sebastian Nagel reopened NUTCH-2353:
------------------------------------

The change causes the webapp to fail with 404 / NOT_FOUND and the exception in 
hadoop.log:
{noformat}
2017-12-18 14:17:19,322 ERROR mortbay.log - Nested in 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'craw
lServiceImpl': Injection of resource dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creat
ing bean with name 'createCrawlDao' defined in class path resource 
[org/apache/nutch/webui/config/SpringConfiguration.class]: Instantiation of bea
n failed; nested exception is 
org.springframework.beans.factory.BeanDefinitionStoreException: Factory method 
[public com.j256.ormlite.dao.Dao org.
apache.nutch.webui.config.SpringConfiguration.createCrawlDao() throws 
java.sql.SQLException] threw exception; nested exception is java.lang.Illega
lArgumentException: ORMLite does not know how to store interface java.util.Map 
for field metadata. Use another class or a custom persister.:
java.lang.IllegalArgumentException: ORMLite does not know how to store 
interface java.util.Map for field metadata. Use another class or a custom p
ersister.
        at com.j256.ormlite.field.FieldType.<init>(FieldType.java:189)
        at com.j256.ormlite.field.FieldType.createFieldType(FieldType.java:957)
        at 
com.j256.ormlite.table.DatabaseTableConfig.extractFieldTypes(DatabaseTableConfig.java:208)
        at 
com.j256.ormlite.table.DatabaseTableConfig.fromClass(DatabaseTableConfig.java:146)
        at com.j256.ormlite.table.TableInfo.<init>(TableInfo.java:53)
        at com.j256.ormlite.dao.BaseDaoImpl.initialize(BaseDaoImpl.java:151)
        at com.j256.ormlite.dao.BaseDaoImpl.<init>(BaseDaoImpl.java:128)
        at com.j256.ormlite.dao.BaseDaoImpl.<init>(BaseDaoImpl.java:107)
        at com.j256.ormlite.dao.BaseDaoImpl$4.<init>(BaseDaoImpl.java:907)
        at com.j256.ormlite.dao.BaseDaoImpl.createDao(BaseDaoImpl.java:907)
        at com.j256.ormlite.dao.DaoManager.createDao(DaoManager.java:70)
        at 
com.j256.ormlite.field.FieldType.configDaoInformation(FieldType.java:380)
        at com.j256.ormlite.dao.BaseDaoImpl.initialize(BaseDaoImpl.java:201)
        at com.j256.ormlite.dao.BaseDaoImpl.<init>(BaseDaoImpl.java:128)
        at com.j256.ormlite.dao.BaseDaoImpl.<init>(BaseDaoImpl.java:107)
        at com.j256.ormlite.dao.BaseDaoImpl$4.<init>(BaseDaoImpl.java:907)
        at com.j256.ormlite.dao.BaseDaoImpl.createDao(BaseDaoImpl.java:907)
        at com.j256.ormlite.dao.DaoManager.createDao(DaoManager.java:70)
        at com.j256.ormlite.spring.DaoFactory.createDao(DaoFactory.java:37)
        at 
org.apache.nutch.webui.config.CustomDaoFactory.createDao(CustomDaoFactory.java:39)
        at 
org.apache.nutch.webui.config.SpringConfiguration.createCrawlDao(SpringConfiguration.java:82)
{noformat}

> Create seed file with metadata using the REST API
> -------------------------------------------------
>
>                 Key: NUTCH-2353
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2353
>             Project: Nutch
>          Issue Type: Improvement
>          Components: injector, REST_api
>    Affects Versions: 1.12
>            Reporter: Jorge Luis Betancourt Gonzalez
>            Assignee: Jorge Luis Betancourt Gonzalez
>            Priority: Minor
>              Labels: rest_api
>             Fix For: 1.14
>
>
> At the moment its not possible to create a seed file and specify any metadata 
> when using the REST API. The file gets created but there is no option to add 
> any metadata to the seed URLs.
> If we use a payload like this:
> {code}
> {
>     "name":"name-of-seedlist", 
>     "seedUrls":[
>         {
>             "url" : "http://example.com";,
>             "metadata" : {
>                 "key1" : "value1",
>                 "key2" : "value2",
>                 "key3" : "value3"
>             }
>         }
>     ]
> }
> {code}
> It should be easy to specify the desired metadata. Also this should keep BC 
> with the previous array syntax if we only want to specify the list of URLs 
> without any metadata at all.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to