You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Ulrich Mayring <ul...@denic.de> on 2001/09/14 16:43:18 UTC

TimeScheduler question

Hi folks,

I'm trying to use the TimeScheduler in my block, which is called
qbrowser.java. This is an excerpt of qbrowser.xinfo:

<dependency>

<role>org.apache.avalon.cornerstone.services.scheduler.TimeScheduler</role>
	<service name="TimeScheduler" version="1.0"/>
</dependency>

This is in my qbrowser's assembly.xml:

<!-- The qbrowser block -->
<block class="de.denic.app.nic.qbrowser.qbrowser" name="qbrowser">
	<provide name="JMQManager" role="de.denic.blocks.jmq.JMQManager"/>
	<provide name="TimeScheduler"
role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
</block>

This is what phoenix.log says when I start it:

Fri Sep 14 16:18:01 CEST 2001 [ERROR  ] <<Phoenix.qbrowser>> (): Unknown
error during run phase startup of application.  Details Follow.
org.apache.avalon.excalibur.container.ContainerException: Name
TimeScheduler not contained
        at
org.apache.avalon.excalibur.container.AbstractContainer.getEntry(AbstractContainer.java:75)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.getBlockEntry(Unknown
Source)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.visitDependencies(Unknown
Source)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.visitBlock(Unknown
Source)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.walkGraph(Unknown
Source)
        at
org.apache.avalon.phoenix.components.application.DefaultServerApplication.runPhase(Unknown
Source)
        at
org.apache.avalon.phoenix.components.application.DefaultServerApplication.start(Unknown
Source)
Fri Sep 14 16:18:01 CEST 2001 [WARN   ] <<Phoenix>> (): Failed to start
application qbrowser.
org.apache.avalon.excalibur.container.ContainerException: Name
TimeScheduler not contained
        at
org.apache.avalon.excalibur.container.AbstractContainer.getEntry(AbstractContainer.java:75)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.getBlockEntry(Unknown
Source)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.visitDependencies(Unknown
Source)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.visitBlock(Unknown
Source)
        at
org.apache.avalon.phoenix.components.phases.BlockDAG.walkGraph(Unknown
Source)
        at
org.apache.avalon.phoenix.components.application.DefaultServerApplication.runPhase(Unknown
Source)
        at
org.apache.avalon.phoenix.components.application.DefaultServerApplication.start(Unknown
Source)

What could be the problem?

Thanks a lot in advance,

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Ulrich Mayring <ul...@denic.de>.
Ulrich Mayring wrote:
> 
> Hm, now phoenix.log says:

[...]

I'm sorry, my mistake. Not phoenix.log says that, but it appears on the
console.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Ulrich Mayring <ul...@denic.de>.
Peter Donald wrote:
> 
> Oh in that case you have misspecified the class name of Block. You specified
> 
> org.apache.avalon.cornerstone.services.scheduler.DefaultTimeScheduler
> 
> when you really meant
> 
> org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler

Yep, now it works, thanks a lot! Sorry for the confusion, but sometimes,
when you're stuck, you can look at the code for hours and don't see
anything :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Peter Donald <do...@apache.org>.
On Mon, 17 Sep 2001 20:15, Ulrich Mayring wrote:
> Peter Donald wrote:
> > Hmm - that means that
> > org/apache/avalon/cornerstone/services/scheduler/DefaultTimeScheduler.xin
> >fo is not in classpath which means you haven't included cornerstone.bar in
> > your .sar or that the cornerstone.bar is correupt or something else I
> > haven't thought of ;)
>
> Umm yes, that is clear, let me rephrase my question ;-)

;)

> Why is Avalon looking for
> org/apache/avalon/cornerstone/services/scheduler/TimeScheduler.xinfo,
> when I have
> org/apache/avalon/cornerstone/blocks/scheduler/DefaultTimeScheduler.xinfo
> in my cornerstone.bar? :)


Oh in that case you have misspecified the class name of Block. You specified 

org.apache.avalon.cornerstone.services.scheduler.DefaultTimeScheduler

when you really meant 

org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler

;)

-- 
Cheers,

Pete

--------------------------------------------------
 Where ignorance is bliss, 'tis folly to be wise.
--------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Ulrich Mayring <ul...@denic.de>.
Peter Donald wrote:
> 
> Hmm - that means that
> org/apache/avalon/cornerstone/services/scheduler/DefaultTimeScheduler.xinfo
> is not in classpath which means you haven't included cornerstone.bar in your
> .sar or that the cornerstone.bar is correupt or something else I haven't
> thought of ;)

Umm yes, that is clear, let me rephrase my question ;-)

Why is Avalon looking for
org/apache/avalon/cornerstone/services/scheduler/TimeScheduler.xinfo,
when I have
org/apache/avalon/cornerstone/blocks/scheduler/DefaultTimeScheduler.xinfo
in my cornerstone.bar? :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Peter Donald <do...@apache.org>.
On Mon, 17 Sep 2001 19:57, Ulrich Mayring wrote:
> Peter Donald wrote:
> > On Sat, 15 Sep 2001 01:12, Ulrich Mayring wrote:
> > > <!-- The TimeScheduler block -->
> > > <block
> > > class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeSche
> > >dule r> </block>
> >
> > I think you forgot name="scheduler" attribute ;)
>
> Aye captain, that was it, thanks a lot. Now I get this:
>
> java.lang.Exception: Unable to locate resource
> (org/apache/avalon/cornerstone/services/scheduler/DefaultTimeScheduler.xinf
>o) to create block info for scheduler.

Hmm - that means that 
org/apache/avalon/cornerstone/services/scheduler/DefaultTimeScheduler.xinfo 
is not in classpath which means you haven't included cornerstone.bar in your 
.sar or that the cornerstone.bar is correupt or something else I haven't 
thought of ;)

-- 
Cheers,

Pete

Frank Zappa observed: "It's not getting any smarter out
                       there.You have to come to terms with
                       stupidity, and make it work for you."

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Ulrich Mayring <ul...@denic.de>.
Paul Hammant wrote:
> 
> Do a ..
> 
>    dir /B/S >apps.txt
> 
> .. in phoenix/dist/apps after trying to launch phoenix and email me the
> apps.txt

Well, I don't have that directory, my structure looks like:

/usr/local/avalon/apps
/usr/local/avalon/bin
/usr/local/avalon/lib
/usr/local/avalon/logs

In logs is phoenix.log. Anyway, the problem is solved now.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Paul Hammant <Pa...@yahoo.com>.
>
>
>java.lang.Exception: Unable to locate resource
>(org/apache/avalon/cornerstone/services/scheduler/DefaultTimeScheduler.xinfo)
>to create block info for scheduler.
>
Do a ..

   dir /B/S >apps.txt

.. in phoenix/dist/apps after trying to launch phoenix and email me the 
apps.txt

- Paul H


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Ulrich Mayring <ul...@denic.de>.
Peter Donald wrote:
> 
> On Sat, 15 Sep 2001 01:12, Ulrich Mayring wrote:
> > <!-- The TimeScheduler block -->
> > <block
> > class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeSchedule
> >r> </block>
> 
> I think you forgot name="scheduler" attribute ;)

Aye captain, that was it, thanks a lot. Now I get this:

java.lang.Exception: Unable to locate resource
(org/apache/avalon/cornerstone/services/scheduler/DefaultTimeScheduler.xinfo)
to create block info for scheduler.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Peter Donald <do...@apache.org>.
On Sat, 15 Sep 2001 01:12, Ulrich Mayring wrote:
> <!-- The TimeScheduler block -->
> <block
> class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeSchedule
>r> </block>

I think you forgot name="scheduler" attribute ;)

-- 
Cheers,

Pete

---------------------------------------------------
"If you don't know where you want to go, we'll make 
sure you get taken." 
Microsoft ad slogan, translated into Japanese.
---------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Peter Donald <do...@apache.org>.
On Sat, 15 Sep 2001 01:38, Ulrich Mayring wrote:
> Peter Donald wrote:
> > On Sat, 15 Sep 2001 01:12, Ulrich Mayring wrote:
> > > <!-- The TimeScheduler block -->
> > > <block
> > > class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeSche
> > >dule r> </block>
> >
> > Looks like you missed a " at the end of DefaultTimeScheduler ... could
> > that be it (or it a mistake in transcribing?).
>
> No, it was copy&paste. You're right, I fixed the mistake and now I get:
>
> org.apache.avalon.phoenix.components.deployer.DeploymentException:
> Malformed assembly file.
>         at
> org.apache.avalon.phoenix.components.deployer.DefaultSarDeployer.assembleBl
>ocks(Unknown Source)

Have a look in the log file and there should be more information - 
specifically I am looking for bit after this that saids 

rethrown from
...

Does that give you any more clues?

> I ran the file through Xerces now and it didn't complain. Sorry for
> being stupid, but I just can't figure it out. If I remove the line
> <block
> class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeSchedule
>r"/> then I don't get this exception, but the other one I posted before.

I will try to write a DTD on weekend so they are easier to validate before 
hand ;) remind me if I forget.

-- 
Cheers,

Pete

--------------------------------------------------
 Logic: The art of being wrong with confidence...
--------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Ulrich Mayring <ul...@denic.de>.
Peter Donald wrote:
> 
> On Sat, 15 Sep 2001 01:12, Ulrich Mayring wrote:
> > <!-- The TimeScheduler block -->
> > <block
> > class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeSchedule
> >r> </block>
> 
> Looks like you missed a " at the end of DefaultTimeScheduler ... could that
> be it (or it a mistake in transcribing?).

No, it was copy&paste. You're right, I fixed the mistake and now I get:

org.apache.avalon.phoenix.components.deployer.DeploymentException:
Malformed assembly file.
        at
org.apache.avalon.phoenix.components.deployer.DefaultSarDeployer.assembleBlocks(Unknown
Source)

I ran the file through Xerces now and it didn't complain. Sorry for
being stupid, but I just can't figure it out. If I remove the line
<block
class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeScheduler"/>
then I don't get this exception, but the other one I posted before.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Peter Donald <do...@apache.org>.
On Sat, 15 Sep 2001 01:12, Ulrich Mayring wrote:
> <!-- The TimeScheduler block -->
> <block
> class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeSchedule
>r> </block>

Looks like you missed a " at the end of DefaultTimeScheduler ... could that 
be it (or it a mistake in transcribing?).

-- 
Cheers,

Pete

-----------------------------------------------
   "You can't depend on your eyes when your 
   imagination is out of focus." -Mark Twain 
-----------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Ulrich Mayring <ul...@denic.de>.
Peter Donald wrote:
> 
> The following should work. Note that I use lowercase names in assembly.xml
> names just for ease of reading.
> 
> <block name="scheduler"
> class="org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler"/>
> 
> <block class="de.denic.app.nic.qbrowser.qbrowser" name="qbrowser">
>         <provide name="JMQManager" role="de.denic.blocks.jmq.JMQManager"/>
>         <provide name="scheduler"
> role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
> </block>
> 
> However note that in the qbrowser.xinfo file that the service name should
> directly corespond to name of interface. (Role name usually also coresponds
> to name of interface but in reality can be any arbitrary string). So you
> would have something like
> 
> <dependency>
>   <role>org.apache.avalon.cornerstone.services.scheduler.TimeScheduler</role>
>   <service
>       name="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"
>       version="1.0"/>
> </dependency>
> 
> Hope that helps.

Hm, now phoenix.log says:

org.apache.avalon.phoenix.components.deployer.DeploymentException: Error
building configuration from
file:/usr/local/avalon/apps/qbrowser/conf/assembly.xml.
        at
org.apache.avalon.phoenix.components.deployer.DefaultSarDeployer.getConfigurationFor(Unknown
Source)
        at
org.apache.avalon.phoenix.components.deployer.DefaultSarDeployer.deploy(Unknown
Source)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(Unknown
Source)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(Unknown
Source)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(Unknown
Source)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(Unknown
Source)
        at org.apache.avalon.phoenix.frontends.CLIMain.execute(Unknown
Source)
        at org.apache.avalon.phoenix.frontends.CLIMain.main(Unknown
Source)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.avalon.phoenix.launcher.Main.main(Unknown Source)

I've made the changes to qbrowser.xinfo that you suggested. Here's my
entire assembly.xml:

<assembly>
 
<!-- The qbrowser block -->
<block class="de.denic.app.nic.qbrowser.qbrowser" name="qbrowser">
    <provide name="JMQManager" role="de.denic.blocks.jmq.JMQManager"/>
    <provide name="scheduler"
role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
</block>
 
<!-- The TimeScheduler block -->
<block
class="org.apache.avalon.cornerstone.services.scheduler.DefaultTimeScheduler>
</block>
 
<!-- The JMQManager block -->
<block class="de.denic.blocks.jmq.JMQManagerImpl" name="JMQManager">
</block>
 
</assembly>

The JMQManager block runs fine in other blocks. Thanks for the help!

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Re: TimeScheduler question

Posted by Peter Donald <do...@apache.org>.
On Sat, 15 Sep 2001 00:43, Ulrich Mayring wrote:
> Hi folks,
>
> I'm trying to use the TimeScheduler in my block, which is called
> qbrowser.java. This is an excerpt of qbrowser.xinfo:
>
> <dependency>
>
> <role>org.apache.avalon.cornerstone.services.scheduler.TimeScheduler</role>
> 	<service name="TimeScheduler" version="1.0"/>
> </dependency>
>
> This is in my qbrowser's assembly.xml:
>
> <!-- The qbrowser block -->
> <block class="de.denic.app.nic.qbrowser.qbrowser" name="qbrowser">
> 	<provide name="JMQManager" role="de.denic.blocks.jmq.JMQManager"/>
> 	<provide name="TimeScheduler"
> role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
> </block>
>
> This is what phoenix.log says when I start it:

I assume you have a block like

The following should work. Note that I use lowercase names in assembly.xml 
names just for ease of reading.

<block name="scheduler"    
class="org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler"/>

<block class="de.denic.app.nic.qbrowser.qbrowser" name="qbrowser">
	<provide name="JMQManager" role="de.denic.blocks.jmq.JMQManager"/>
	<provide name="scheduler"
role="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"/>
</block>


However note that in the qbrowser.xinfo file that the service name should 
directly corespond to name of interface. (Role name usually also coresponds 
to name of interface but in reality can be any arbitrary string). So you 
would have something like

<dependency>
  <role>org.apache.avalon.cornerstone.services.scheduler.TimeScheduler</role>
  <service 
      name="org.apache.avalon.cornerstone.services.scheduler.TimeScheduler"
      version="1.0"/>
</dependency>

Hope that helps.

-- 
Cheers,

Pete

-----------------------------------------------
"Only two things are infinite, the universe and 
human stupidity, and I'm not sure about the 
former." -Albert Einstein 
-----------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org