[daisy] Problem presavehook generating xinfo-info file

Bart Van den Abeele bvda at schaubroeck.be
Wed Oct 11 09:44:09 CDT 2006


Hi again :-),

This afternoon i tried to customize a presavehook and i succeeded!  I 
started naming it PostSaveHook because that was the intention, but at 
this moment it still is a presavehook.

The only thing that went wrong was the generation of the xinfo-file of 
my java file by maven.  It generated the following:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE type PUBLIC "-//AVALON/Type DTD Version 1.0//EN" 
"http://avalon.apache.org/dtds/meta/type_1_1.dtd" >

<type>
  <info>
    <name>scandocument-postsavehook</name>
    <version>1.0.0</version>
    <lifestyle>singleton</lifestyle>
    <collection>hard</collection>
  </info>
</type>

and had to generate:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE type PUBLIC "-//AVALON/Type DTD Version 1.0//EN" 
"http://avalon.apache.org/dtds/meta/type_1_1.dtd" >

<type>
  <info>
    <name>scandocument-postsavehook</name>
    <version>1.0.0</version>
    <lifestyle>singleton</lifestyle>
    <collection>hard</collection>
  </info>
    <dependencies>
    <dependency key="postsavehook-registrar" 
type="org.outerj.daisy.repository.PreSaveHookRegistrar"/>
  </dependencies>
</type>

So i mannualy adapted this file in the jar, deployed it and everything 
worked fine.
When i didn't add these lines, the daisy-repository 2.0 dev wouldn't 
start and generate an error about not finding the key 
postsavehook-registrar.

I added the error in error.txt and the project in a project.zip.
Grtz,
Bart


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PostSaveHook.rar
Type: application/octet-stream
Size: 7640 bytes
Desc: not available
Url : http://lists.cocoondev.org/pipermail/daisy/attachments/20061011/2a44ff90/PostSaveHook-0001.obj
-------------- next part --------------
Microsoft Windows XP [versie 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\bvda>c:\app\daisy-2.0\repo.bat

C:\Documents and Settings\bvda>cd c:\app\daisy-2.0\daisy\repository\server

C:\app\daisy-2.0\daisy\repository\server>start-repository

C:\app\daisy-2.0\daisy\repository\server>set MERLIN_JVM_OPTS=-Xdebug -Xnoagent -
Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=800
1 -Djava.security.auth.login.config=login.config -Dorg.apache.commons.logging.Lo
g=org.outerj.daisy.logging.DaisyLog -Dfile.encoding=UTF-8

C:\app\daisy-2.0\daisy\repository\server>set DAISY_MERLIN_REPO=c:\Docume~1\bvda\
.maven\repository

C:\app\daisy-2.0\daisy\repository\server>if "c:\Docume~1\bvda\.maven\repository"
 == "" set DAISY_MERLIN_REPO=C:\Documents and Settings\bvda\.maven\repository

C:\app\daisy-2.0\daisy\repository\server>merlin -repository c:\Docume~1\bvda\.ma
ven\repository -config myconfig.xml src/conf/block.xml
Listening for transport dt_socket at address: 8001
[INFO   ] (kernel): info report
-----------------------------------------------------------
Merlin Kernel Environment Listing
-----------------------------------------------------------

  ${user.dir} == C:\app\daisy-2.0\daisy\repository\server
  ${user.home} == C:\Documents and Settings\bvda

  ${avalon.repository.cache} == C:\app\merlin\system
  ${avalon.repository.online} == true
  ${avalon.repository.hosts} == http://www.dpml.net,http://www.ibiblio.org/maven


  ${merlin.lang} == null
  ${merlin.home} == C:\app\merlin
  ${merlin.system} == C:\app\merlin\system
  ${merlin.config} == C:\app\merlin\config
  ${merlin.kernel} == file:/C:/app/merlin/config/kernel.xml
  ${merlin.logging.implementation} == artifact:avalon-logging/avalon-logging-log
kit-impl#1.0.0
  ${merlin.logging.config} == null
  ${merlin.runtime} == artifact:avalon-activation/avalon-activation-impl#2.0.0
  ${merlin.override} == myconfig.xml
  ${merlin.dir} == C:\app\daisy-2.0\daisy\repository\server
  ${merlin.temp} == C:\DOCUME~1\bvda\LOCALS~1\Temp
  ${merlin.context} == C:\app\daisy-2.0\daisy\repository\server\home
  ${merlin.anchor} == C:\app\daisy-2.0\daisy\repository\server
  ${merlin.info} == true
  ${merlin.debug} == false
  ${merlin.audit} == false
  ${merlin.server} == true
  ${merlin.autostart} == true
  ${merlin.code.security.enabled} == false
  ${merlin.deployment.timeout} == 0
  ${merlin.repository} == c:\Docume~1\bvda\.maven\repository
  ${merlin.repository.hosts} == http://www.dpml.net/,http://www.ibiblio.org/mave
n/
  ${merlin.deployment} == file:/${merlin.dir}/src/conf/block.xml

-----------------------------------------------------------
[INFO   ] (daisy.jcl.org.apache.xbean.spring.context.impl.XBeanXmlBeanDefinition
Reader): Loading XML bean definitions from URL [file:activemq-conf.xml]
[INFO   ] (daisy.jcl.org.apache.xbean.spring.context.ClassPathXmlApplicationCont
ext): Bean factory for application context [org.apache.xbean.spring.context.Clas
sPathXmlApplicationContext;hashCode=2347640]: org.springframework.beans.factory.
support.DefaultListableBeanFactory defining beans [org.apache.activemq.xbean.XBe
anBrokerService,dataSource,statements]; root of BeanFactory hierarchy
[INFO   ] (daisy.jcl.org.apache.xbean.spring.context.ClassPathXmlApplicationCont
ext): 3 beans defined in application context [org.apache.xbean.spring.context.Cl
assPathXmlApplicationContext;hashCode=2347640]
[INFO   ] (daisy.jcl.org.springframework.core.CollectionFactory): JDK 1.4+ colle
ctions available
[INFO   ] (daisy.jcl.org.springframework.core.CollectionFactory): Commons Collec
tions 3.x available
[INFO   ] (daisy.jcl.org.apache.xbean.spring.context.ClassPathXmlApplicationCont
ext): Unable to locate MessageSource with name 'messageSource': using default [o
rg.springframework.context.support.DelegatingMessageSource at e2b07b]
[INFO   ] (daisy.jcl.org.apache.xbean.spring.context.ClassPathXmlApplicationCont
ext): Unable to locate ApplicationEventMulticaster with name 'applicationEventMu
lticaster': using default [org.springframework.context.event.SimpleApplicationEv
entMulticaster at 1fb24d3]
[INFO   ] (daisy.jcl.org.springframework.beans.factory.support.DefaultListableBe
anFactory): Pre-instantiating singletons in factory [org.springframework.beans.f
actory.support.DefaultListableBeanFactory defining beans [org.apache.activemq.xb
ean.XBeanBrokerService,dataSource,statements]; root of BeanFactory hierarchy]
[INFO   ] (daisy.jcl.org.apache.activemq.broker.BrokerService): ActiveMQ 4.0 JMS
 Message Broker (DaisyJMS) is starting
[INFO   ] (daisy.jcl.org.apache.activemq.broker.BrokerService): For help or more
 information please see: http://incubator.apache.org/activemq/
[INFO   ] (daisy.jcl.org.apache.activemq.store.jdbc.JDBCPersistenceAdapter): Dat
abase driver recognized: [mysql-ab_jdbc_driver]
[INFO   ] (daisy.jcl.org.apache.activemq.transport.TransportServerThreadSupport)
: Listening for connections at: tcp://pc-bvda:61616
[INFO   ] (daisy.jcl.org.apache.activemq.broker.TransportConnector): Connector t
cp://localhost:61616 Started
[INFO   ] (daisy.jcl.org.apache.activemq.transport.vm.VMTransportFactory): bindi
ng to broker: DaisyJMS
[INFO   ] (daisy.jcl.org.apache.activemq.broker.TransportConnector): Connector v
m://DaisyJMS Started
[INFO   ] (daisy.jcl.org.apache.activemq.broker.BrokerService): ActiveMQ JMS Mes
sage Broker (DaisyJMS, ID:pc-bvda-2989-1160577681233-1:0) started
[INFO   ] (daisy.jmsclient.jmsclient): JMS connection established.
[INFO   ] (daisy.datasource.datasource): Running on database: "MySQL" version "5
.0.21-community-nt".
[INFO   ] (daisy.repository.httpconnector): Version Jetty/5.1.10
[INFO   ] (daisy.repository.httpconnector): Started HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Started SocketListener on 0.0.0.0:92
63
[INFO   ] (daisy.repository.httpconnector): Started org.mortbay.http.HttpServer@
16c14c0
[INFO   ] (daisy.repository.httpconnector): Stopped HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Started HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Stopped HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Started HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Stopped HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Started HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Stopped HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Started HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Stopped HttpContext[/,/]
[INFO   ] (daisy.repository.httpconnector): Started HttpContext[/,/]
---- exception report ----------------------------------------------------------

Exception: org.apache.avalon.merlin.KernelException
Message: Kernel startup failure.
---- cause ---------------------------------------------------------------------

Exception: org.apache.avalon.merlin.KernelException
Message: Cannot deploy application.
---- cause ---------------------------------------------------------------------

Exception: org.apache.avalon.activation.LifecycleException
Message: Unable to create a new component instance in appliance [/daisy/scandocu
ment-postsavehook/hook] due to a component deployment failure.
---- cause ---------------------------------------------------------------------

Exception: org.apache.avalon.framework.service.ServiceException
Message: Unknown key: postsavehook-registrar (Key='postsavehook-registrar')
---- stack trace ---------------------------------------------------------------

org.apache.avalon.framework.service.ServiceException: Unknown key: postsavehook-
registrar (Key='postsavehook-registrar')
org.apache.avalon.activation.impl.DefaultServiceManager.lookup(DefaultServiceMan
ager.java:150)
org.apache.avalon.activation.impl.DefaultServiceManager.lookup(DefaultServiceMan
ager.java:129)
be.schaubroeck.digidoc.ScanDocumentPostSaveHook.service(ScanDocumentPostSaveHook
.java:75)
org.apache.avalon.framework.container.ContainerUtil.service(ContainerUtil.java:1
43)
org.apache.avalon.activation.impl.DefaultComponentFactory.incarnation(DefaultCom
ponentFactory.java:325)
org.apache.avalon.activation.impl.DefaultComponentFactory.incarnate(DefaultCompo
nentFactory.java:130)
org.apache.avalon.activation.impl.SingletonLifestyleManager.refreshReference(Sin
gletonLifestyleManager.java:144)
org.apache.avalon.activation.impl.SingletonLifestyleManager.commission(Singleton
LifestyleManager.java:60)
org.apache.avalon.activation.impl.DefaultAppliance.commission(DefaultAppliance.j
ava:94)
org.apache.avalon.activation.impl.DefaultRuntime.commission(DefaultRuntime.java:
86)
org.apache.avalon.composition.model.impl.DefaultSystemContext.commission(Default
SystemContext.java:362)
org.apache.avalon.composition.model.impl.DefaultDeploymentModel.commission(Defau
ltDeploymentModel.java:122)
org.apache.avalon.composition.model.impl.Commissioner.run(Commissioner.java:185)

java.lang.Thread.run(Thread.java:595)
--------------------------------------------------------------------------------



C:\app\daisy-2.0\daisy\repository\server>


More information about the daisy mailing list