[2002-04-08 18:29 +0200] Ole Bulbuk ([EMAIL PROTECTED]) wrote: > Hi, > > I am very new to Avalon but like it already quite alot. > I am using Phoenix to start my server (block) but I would like to use a > ExcaliburComponentManager inside my block to be able to use roles, etc. > I use the ComponentManager provided by Phoenix (4.0a3) as the parent manager > of the ExcaliburComponentManager. > > I just don't know at the moment how to get rid of the following exception:
Hi Ole -- I don't know if it could really be this simple, but notice that the Role added is de.ebp.worerkpool.Market ^^^ and the exception is looking for de.ebp.workerpool.Market ^^^ Good luck! Gary > > Phoenix 4.0a3 > > DEBUG 10182 [de.ebp.g] (): added Role de.ebp.worerkpool.Market with > shorthand market for de.ebp.workerpool.MarketComp > DEBUG 10182 [de.ebp.g] (): added Role de.ebp.workerpool.ProducerFactory > with shorthand fileProducerFactory for > de.ebp.globus.messageinput.FileProducerFactoryComp > DEBUG 10182 [de.ebp.g] (): added Role de.ebp.workerpool.ConsumerFactory > with shorthand fileConsumerFactory for > de.ebp.globus.messageinput.FileConsumerFactoryComp > DEBUG 10182 [de.ebp.g] (): looking up shorthand market, returning > de.ebp.worerkpool.Market > DEBUG 10182 [de.ebp.g] (): Adding component (de.ebp.worerkpool.Market = > de.ebp.workerpool.MarketComp) > DEBUG 10182 [de.ebp.g] (): Attempting to get Handler for: > de.ebp.worerkpool.Market > DEBUG 10182 [de.ebp.g] (): Handler type = > org.apache.avalon.excalibur.component.DefaultComponentHandler > DEBUG 10182 [de.ebp.g] (): ComponentHandler initialized for: > de.ebp.workerpool.MarketComp > DEBUG 10182 [de.ebp.g] (): Could not find ComponentHandler, attempting > to create one for role: de.ebp.workerpool.Market > DEBUG 10182 [de.ebp.g] (): Could not find component for role: > de.ebp.workerpool.Market > java.lang.NullPointerException > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279) > at java.lang.ClassLoader.loadClass(ClassLoader.java:290) > at java.lang.ClassLoader.loadClass(ClassLoader.java:290) > at java.lang.ClassLoader.loadClass(ClassLoader.java:253) > at > org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Excal > iburComponentManager.java:273) > at > org.apache.avalon.excalibur.component.ExcaliburComponentManager.hasComponent > (ExcaliburComponentManager.java:140) > at > de.ebp.globus.block.GlobusServerBlock.initialize(GlobusServerBlock.java:124) > at > org.apache.avalon.phoenix.components.application.LifecycleHelper.startup(Lif > ecycleHelper.java:200) > at > org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase > (DefaultApplication.java:177) > at > org.apache.avalon.phoenix.components.application.DefaultApplication.start(De > faultApplication.java:89) > at > org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKer > nel.java:125) > at > org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(Def > aultKernel.java:170) > at > org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Default > Deployer.java:168) > at > org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(Def > aultEmbeddor.java:351) > at > org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(Def > aultEmbeddor.java:345) > at > org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(De > faultEmbeddor.java:330) > at > org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultA > pplications(DefaultEmbeddor.java:320) > at > org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(Defaul > tEmbeddor.java:162) > at > org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:96) > at org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:64) > at java.lang.reflect.Method.invoke(Native Method) > at org.apache.avalon.phoenix.launcher.Main.main(Main.java:54) > > In my naive thinking things go really wrong here: > ExcaliburComponentManager.hasComponent(ExcaliburComponentManager.java:140) > > But the Java source looks like this: > > 133 public boolean hasComponent( final String role ) > 134 { > 135 if ( ! m_initialized ) return false; > 136 if ( m_disposed ) return false; > > 138 boolean exists = m_componentHandlers.containsKey( role ); > > 140 if ( ! exists && null != m_parentManager ) > 141 { > 142 exists = m_parentManager.hasComponent( role ); > 143 } > > 145 return exists; > 146 } > > Of course source and class files are both from the Excalibur 4.1 > distribution. > > My _real_ problem seem to be documented in the following lines: > > DEBUG 10182 [de.ebp.g] (): Attempting to get Handler for: > de.ebp.worerkpool.Market > DEBUG 10182 [de.ebp.g] (): Handler type = > org.apache.avalon.excalibur.component.DefaultComponentHandler > DEBUG 10182 [de.ebp.g] (): ComponentHandler initialized for: > de.ebp.workerpool.MarketComp > DEBUG 10182 [de.ebp.g] (): Could not find ComponentHandler, attempting > to create one for role: de.ebp.workerpool.Market > > So first a component handler is initialized for the role and then it > couldn't be found. But I suppose I won't be able to get the clue out of it > before I have the right source/class files. > I tried to compile Excalibur from the provided source myself but didn't > succeed: > > [javac] > C:\Java\Avalon\Excalibur-4.1\src\scratchpad\org\apache\avalon\excalibur\cach > e\store\test\MemoryStoreTestCase.java:19: cannot resolve symbol > [javac] symbol : class AbstractCacheStoreTestCase > [javac] location: class > org.apache.avalon.excalibur.cache.store.test.MemoryStoreTestCase > [javac] extends AbstractCacheStoreTestCase > [javac] ^ > > I could get rid of this all probably by gettint everything from the CVS and > doing it all myself. But I would really like to have an official > distribution instead. > > Any hint would be helpful. > > Regards, > > Ole > > P.S.: I am using JDK 1.3.1 on Windows 2000 with Cygwin. > -- > Ole Bulbuk Tel.: 0331/74759/60 > Ernst Basler + Partner Fax: 0331/74759/90 > Tuchmacherstr. 47 E-Mail: mailto:[EMAIL PROTECTED] > 14482 Potsdam WWW: http://www.ebp.de > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>