PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

export command for ImportExport doesn't seem to be working #179

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Stop Connector Manager with some connectors configured.
2. cd webapps/connector-manager
3. java -classpath WEB-INF/lib/connector-spi.jar:\
                   WEB-INF/lib/connector.jar:\
                   WEB-INF/lib/spring.jar:\
                   WEB-INF/lib/commons-logging.jar \
    com.google.enterprise.connector.importexport.ImportExport \
    export export.xml

What is the expected output?

  Should see all configured connectors dumped to export.xml file.

What do you see instead?

Exception in thread "main"
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid
bean definition with name 'FeedHandler' defined in file
[/home/martyg/svnbench/catalinaBaseImageTest3/catalinaBase/webapps/connector-man
ager/WEB-INF/applicationContext.xml]:
Could not resolve placeholder 'catalina.base'

From here try defining the missing property:

1. java -Dcatalina.base=. \
        -classpath WEB-INF/lib/connector-spi.jar:\
                   WEB-INF/lib/connector.jar:\
                   WEB-INF/lib/spring.jar:\
                   WEB-INF/lib/commons-logging.jar \
    com.google.enterprise.connector.importexport.ImportExport \
    export export.xml

What is the expected output?

  Should see all configured connectors dumped to export.xml file.

What do you see instead?

Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'FeedHandler' defined in file
[/home/martyg/svnbench/catalinaBaseImageTest3/catalinaBase/webapps/connector-man
ager/WEB-INF/applicationContext.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [com.google.enterprise.connector.pusher.FeedFileHandler]:
Constructor threw exception; nested exception is java.io.IOException:
Couldn't get lock for
~/svnbench/catalinaBaseImageTest3/catalinaBase/logs/google-connectors.feed%g.log

I believe this is being caused by pre-instantiating singleton beans and
then creating the beans and the file is already locked.

From here, just delete all the FeedHandler related beans:

1. Remove the following <bean> declarations from the applicationContext.xml
file:
   - FeedFormatter, FeedHandler, FeedWrapperLogger
   - Remove the MethodInvokingFactoryBeans where the targetObject is
FeedWrapperLogger.
2. java -classpath WEB-INF/lib/connector-spi.jar:\
                   WEB-INF/lib/connector.jar:\
                   WEB-INF/lib/spring.jar:\
                   WEB-INF/lib/commons-logging.jar \
    com.google.enterprise.connector.importexport.ImportExport \
    export export.xml

What is the expected output?

  Should see all configured connectors dumped to export.xml file.

What do you see instead?

Export seems to be empty:

<ConnectorInstances>
</ConnectorInstances>

Seems the coordinatorMap on the SpringInstantiator is not initialized when
the Context is standalone.

Original issue reported on code.google.com by mgron...@gmail.com on 13 Aug 2009 at 12:25

GoogleCodeExporter commented 8 years ago
Fixed revision r2533

Original comment by Brett.Mi...@gmail.com on 19 Jul 2010 at 8:36

GoogleCodeExporter commented 8 years ago
This was fixed in 2.0.4 but not in subsequent versions 2.4.0 through 2.6.0, and 
fixed again in 2.6.6.

Original comment by jla...@google.com on 9 Dec 2010 at 10:41