import-tool errors

43 views
Skip to first unread message

Steve McCoole

unread,
Dec 19, 2014, 2:35:16 PM12/19/14
to hippo-c...@googlegroups.com
The import-tool seems to have several issues.  I'm just trying to do a bulk import of some binaries only.  

I pulled the latest archetype project listed on the site (1.06.02) and tried to build.  Several beans in the applicationContext.xml did not exist and I had to comment them out.

Now I have it sort of running but it seems to try to process taxonomies even if the configuration for processing taxonomies is false.

Here's my properties file.

#
#  Copyright 2012-2014 Hippo
#
#  Licensed under the Apache License, Version 2.0 (the  "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS"
#  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#
import.repository.address = vm://
import.repository.username = admin
import.repository.password = admin
import.signal.inbox = /Users/mccoole/opt/cms/import-inbox
import.signal.file.includes = wgoimportstart
import.signal.direct.start = wgoimportstart

# base path to the data to be imported
import.data.base.path = /Users/mccoole/opt/cms/import-data

# path to be stripped from import.data.base.path
#   local Windows example: file:///C:/import-tool/generateddemo/target/tomcat6x/webapps/import-admin/example/data
import.data.strip.path = /Users/mccoole/opt/cms/import-data

# path to be stripped from import.data.binary.base.path, resulting in paths how binaries are referenced in documents
#   local Windows example: /import-tool/generateddemo/target/tomcat6x/webapps/import-admin/example/data
import.data.binary.prefix = /Users/mccoole/opt/cms/import-data

# base path for binaries (CHECK THIS PROPERTY)
#   local Windows example: C:${import.data.binary.prefix}/binaries
import.data.binary.base.path =  ${import.data.binary.prefix}/binaries

# path to be stripped from binaries, resulting in repository paths
import.data.binary.strip.path = ${import.data.binary.prefix}/binaries

# base path for documents (CHECK THIS PROPERTY)
import.repository.document.base.path = /content/documents/imported
import.repository.taxonomy.base.path = /content/taxonomies

import.config.active = true
import.config.simulatorMode = false
import.config.batchSize = 50
import.config.batchSaveCountToRefresh = 2
import.config.processDocuments = false
import.config.overwriteExisting = true
import.config.processBinaries = true
import.config.overwriteBinaries = true
import.config.processBinariesOnly = true
import.config.createEmptyFolders = true
import.config.processTaxonomies = false
import.config.overwriteTaxonomies = false
import.config.processProjectItems = true
import.config.overwriteProjectItems = true
import.config.useMetaData = true

import.config.classMappingNames = 
import.config.classMappingNamesPattern = classpath*:org/onehippo/forge/migration/demo/beans/**/*.class

# white space separated list for the default hippo availabilities
#import.document.default.hippo.availabilities = preview live
import.document.default.hippo.availabilities = preview
import.document.default.hippo.std.state = unpublished
import.document.default.hippo.std.state.summary = preview

Here's the exception that I am getting:

[INFO] [talledLocalContainer] 2014-12-19 12:52:00,758 INFO  [org.onehippo.forge.migration.BaseApplication.process():279] ### processing taxonomies
[INFO] [talledLocalContainer] 2014-12-19 12:52:00,760 WARN  [org.onehippo.forge.migration.spring.SpringImportApplicationExecutor.executeAndReturn():101] Failed to run application.
[INFO] [talledLocalContainer] java.lang.NullPointerException
[INFO] [talledLocalContainer] at org.onehippo.forge.migration.binary.TaxonomyManager.readTaxonomies(TaxonomyManager.java:71)
[INFO] [talledLocalContainer] at org.onehippo.forge.migration.BaseApplication.process(BaseApplication.java:285)
[INFO] [talledLocalContainer] at org.onehippo.forge.migration.BaseApplication.run(BaseApplication.java:404)
[INFO] [talledLocalContainer] at org.onehippo.forge.migration.spring.SpringImportApplicationExecutor.executeAndReturn(SpringImportApplicationExecutor.java:99)
[INFO] [talledLocalContainer] at org.onehippo.forge.migration.spring.SpringImportApplicationExecutor.execute(SpringImportApplicationExecutor.java:52)
[INFO] [talledLocalContainer] at org.onehippo.forge.migration.spring.SpringImportApplicationExecutor$1.run(SpringImportApplicationExecutor.java:68)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] 2014-12-19 12:52:00,761 INFO  [org.onehippo.forge.migration.spring.SpringImportApplicationExecutor.executeAndReturn():104] Import Statistics:

So apparently I need to define a taxonomy mapping (how?) even though I don't want to process taxonomies?

Has anyone been able to make this work recently?  

Woonsan Ko

unread,
Dec 19, 2014, 3:32:38 PM12/19/14
to hippo-c...@googlegroups.com
Hi Steve,

I used to play with it long time ago, but I haven't recently.
Anyway, after browsing the source code, I found that you can configure it in applicationContext.xml:

  <bean id="configuration" class="org.onehippo.forge.migration.util.ImportConfiguration" init-method="initialize">
    <!-- SNIP -->
    <!-- TAXONOMY -->
    <property name="taxonomyMappings" ref="importConfigTaxonomyMappings" />
    <!-- SNIP -->
  </bean>

So, for example, if you define a bean with id="importConfigTaxonomyMappings" like the following (just an empty map) in applicationContext.xml, then I guess you can avoid taxonomy processing.

<bean id="importConfigTaxonomyMappings" class="org.springframework.beans.factory.config.MapFactoryBean">
  <property name="sourceMap">
    <map>
    </map>
  </property>
</bean>

Regards,

Woonsan



--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.


--
w....@onehippo.com     www.onehippo.com
Boston - 745 Atlantic Ave, Third Floor, Boston MA 02111
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466

Steve McCoole

unread,
Dec 19, 2014, 3:47:59 PM12/19/14
to hippo-c...@googlegroups.com
Thanks Woonsan, I was entirely focused on the properties file, following through the example on the site, so was being silly not looking at the applicationContext file, which of course I even said I had been in before.  I'll try it out.

Jeroen Hoffman

unread,
Dec 19, 2014, 3:53:43 PM12/19/14
to hippo-c...@googlegroups.com

Hi Steve,

As far as I know the quickstart at http://import-tool.forge.onehippo.org/quickstart.html generates a working example project using an archetype. We checked that quite recently.

Is that what you followed?

HTH
Jeroen

Op 19 dec. 2014 21:48 schreef "Steve McCoole" <steve....@objectpartners.com>:

Steve McCoole

unread,
Dec 19, 2014, 4:09:30 PM12/19/14
to hippo-c...@googlegroups.com
That's what I followed.  

You received this message because you are subscribed to a topic in the Google Groups "Hippo Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hippo-community/2JkE09_NcDo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hippo-communi...@googlegroups.com.



--
Steve McCoole, Principal Consultant Mobile Development
Object Partners Inc.  www.objectpartners.com

Steve McCoole

unread,
Dec 19, 2014, 4:47:57 PM12/19/14
to hippo-c...@googlegroups.com
So far I have had to add the following to the applicationContext.xml:

    <bean id="importConfigTaxonomyMappings" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigDocumentTypeMappingMap" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigBinaryMappingMap" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigExcludedBinaryFolderMappings" class="java.lang.String">
        <constructor-arg value=""/>
    </bean>

    <bean id="importConfigRuntimeFileMappings" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigRuntimeFolderMappings" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigFileRenameMappings" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigFolderMappings" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigExcludedFolderMappings" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigExcludedFolderPattern" class="org.springframework.beans.factory.config.MapFactoryBean">
        <property name="sourceMap">
            <map>
            </map>
        </property>
    </bean>

    <bean id="importConfigExcludedFilePattern" class="org.springframework.beans.factory.config.MapFactoryBean">

Steve McCoole

unread,
Dec 20, 2014, 4:20:06 PM12/20/14
to hippo-c...@googlegroups.com
After a few more hours of trying to work this out, I've had to abandon the effort.  I sort of got it to work, but then PDF's starting throwing Tika errors and I had some strange issues where imported images would sometimes show up in the CMS console and some times would not, making me concerned about the consistency of the repository state.  With flash loading broken too, we are going to have to resort to importing images and assets one at a time, a painful process, in order to be on schedule.  Some time in the future a better way to get a lot of assets and images loaded into a site would be a welcome addition.  Thanks to all that offered advice and suggestions.

Steve
Reply all
Reply to author
Forward
0 new messages