I have this block of code:

final FortressConfig config = new FortressConfig(); config.setContextDirectory(""); config.setWorkDirectory(""); config.setContainerConfiguration("systemTRY.xconf"); config.setRoleManagerConfiguration("reportTRY.roles"); // config.setLoggerManagerConfiguration("logkit.xconf");

ContainerManager cm = new DefaultContainerManager(config.getContext()); ContainerUtil.initialize( cm );

DefaultContainer container = (DefaultContainer) cm.getContainer(); ServiceManager manager = container.getServiceManager();

// ServiceSelector selector = (ServiceSelector) manager.lookup(Runner.ROLE+"Selector"); // Runner service=(Runner)selector.select("Runner.Another");

Runner service=(Runner)manager.lookup(Runner.ROLE); System.out.println(service.getName()); container.getServiceManager().release(service); org.apache.avalon.framework.container.ContainerUtil.dispose( cm );

reportTRY.roles

<?xml version="1.0"?> <role-list> <role name="Runner"> <component shorthand="Runner" class="DefaultRunner"/> </role> </role-list>


systemTRY.xconf


<my-system> <Runner id="Runner" name="I M DEFAULT RUNNER"/> </my-system>


when I ran this code, it could lookup the service well,but when I debug this code to this statement


ContainerManager cm = new DefaultContainerManager(config.getContext());

and once I stepped this statement, it kept throwing the following exception:

java.lang.AbstractMethodError: org/apache/excalibur/event/impl/AbstractQueue.enqueue at org.apache.excalibur.event.command.AbstractThreadManager$PipelineRunner.run(AbstractThreadManager.java:310)


at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)



at java.lang.Thread.run(Thread.java:484)



why is this?


Thanks Mike

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to