A multiparent classloader along with something that calculates the transitive closure of extension dependencies would probably fix this, something along the lines of (not having looked closely at this):

1. As the extension is being loaded, the following would happen:

- A classloader would be created for the extension's system composite. This would have as one of its parents the classloader of the parent composite. Another parent would be a classloader that was instantiated for the main dependency jar, call that the "extension classloader". Additional dependencies would be loaded in classloaders which were parents to the extension classloader

2. As the application composite is loaded, the following would then happen:

- the application classloader will have multiple parents: the classloader of the parent application context and the "extension classloader" defined above.

If someone can point me to the specific problem, I can take a look. In any event, we should generally not be setting CCL and only do so in very specific circumstances.

Jim

On Aug 18, 2006, at 11:45 AM, Raymond Feng wrote:

Hi,

I created a JIRA against Axis2: http://issues.apache.org/jira/ browse/AXIS2-1047

Does it make sense?

Thanks,
Raymond

----- Original Message ----- From: "ant elder" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, August 18, 2006 7:29 AM
Subject: Re: Standalone distro broken when working with extensions?


The problem is
org.apache.axis2.deployment.DescriptionBuilder.processMessageReceiver s its using the thread context class loader to find the Axis2 message receiver classes but thats not going contain them as they are in the Tuscany launcher
boot or extension class loader.

  ...ant

On 8/18/06, ant elder <[EMAIL PROTECTED]> wrote:

I feel your pain Rick, I'm having similar problems getting servlet based services to go with one classloader issue after another. I'd hit this problem you're seeing and had just bypassed the axis bit to see what other problems i hit next. The one thats next is too hard so i'll go back now and
try to work out whats going on here with the axis2 config...

   ...ant


On 8/18/06, Rick Rineholt < [EMAIL PROTECTED]> wrote:
>
> Wanting to run some webservices (axis) client bindings from the a
> command line environment I've encountered several roadblocks. It was > possible to previously use the standalone distro, create an extension > directory drop the jar containing the extension into that directory and > put all jars it depends on into the boot directory. I know putting all
> the dependent jars into the boot was a temporary workaround.
> I've not done any deep analysis on this but I suspect some of the
> binding initialization is happening when only the application
> classloader is in scope.  I've also tried another approach by just
> including the extensions (axis) dependent jars on the original
> classpath. Doing this seem to have the system scan those jars as "sca > bundles (jars)" looking for a default.scdl and throwing an exception if
> its not found.
>
> Is there a correct way to make this work with what is in SVN ? If yes,
> how?
> If not, anyone know of a quick workaround so I can make progress on
> this?  I'd prefer a solution not involving running in some other
> environment (junit, eclipse, maven etc).
> If no, anone working on this? Any idea how soon it can be fixed? Need
> help?
> Thanks
>
> Running this I see:
> log4j:WARN No appenders could be found for logger
> (org.apache.axiom.om.util.StAXUtils).
> log4j:WARN Please initialize the log4j system properly.
> Exception in thread "main"
> org.apache.tuscany.spi.component.TargetException: Error initializing
> component instance [directoryScanExtender]
>     at
> org.apache.tuscany.core.implementation.PojoAtomicComponent.init(
> PojoAtomicComponent.java:96)
>     at
> org.apache.tuscany.core.component.scope.InstanceWrapperImpl.start(
> InstanceWrapperImpl.java:49)
>     at
>
> org.apache.tuscany.core.component.scope.ModuleScopeContainer.eagerIn itComponents
> (ModuleScopeContainer.java:154)
>     at
> org.apache.tuscany.core.component.scope.ModuleScopeContainer.onEvent (
> ModuleScopeContainer.java :68)
>     at
> org.apache.tuscany.spi.component.AbstractSCAObject.publish(
> AbstractSCAObject.java:92)
>     at
>
> org.apache.tuscany.core.implementation.composite.AbstractCompositeCo mponent.publish
> (AbstractCompositeComponent.java :178)
>     at
>
> org.apache.tuscany.core.implementation.composite.AbstractCompositeCo mponent.start
> (AbstractCompositeComponent.java:117)
>     at
> org.apache.tuscany.core.launcher.LauncherImpl.bootRuntime(
> LauncherImpl.java :100)
>     at
> org.apache.tuscany.core.launcher.MainLauncherImpl.boot(
> MainLauncherImpl.java:140)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke (
> NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at org.apache.tuscany.hostutil.LaunchHelper.invoke (
> LaunchHelper.java:96)
>     at
> org.apache.tuscany.launcher.MainLauncherBooter.main(
> MainLauncherBooter.java:51)
> Caused by: org.apache.tuscany.core.injection.ObjectCallbackException:
> Exception thrown by callback method [public void
> org.apache.tuscany.core.services.extension.DirectoryScanExtender.ini t()]
>     at
> org.apache.tuscany.core.injection.MethodEventInvoker.invokeEvent(
> MethodEventInvoker.java:46)
>     at
> org.apache.tuscany.core.implementation.PojoAtomicComponent.init (
> PojoAtomicComponent.java:94)
>     ... 14 more
> Caused by: org.apache.tuscany.spi.ObjectCreationException: Exception
> thrown by setter [setServletHost]
>     at
> org.apache.tuscany.core.injection.MethodInjector.inject (
> MethodInjector.java:54)
>     at
>
> org.apache.tuscany.core.implementation.PojoAtomicComponent.createIns tance
> (PojoAtomicComponent.java:123)
>     at
>
> org.apache.tuscany.core.component.scope.ModuleScopeContainer.eagerIn itComponents(
> ModuleScopeContainer.java:153)
>     at
> org.apache.tuscany.core.component.scope.ModuleScopeContainer.onEvent (
> ModuleScopeContainer.java:68)
>     at
> org.apache.tuscany.spi.component.AbstractSCAObject.publish(
> AbstractSCAObject.java :92)
>     at
>
> org.apache.tuscany.core.implementation.composite.AbstractCompositeCo mponent.publish
> (AbstractCompositeComponent.java:178)
>     at
>
> org.apache.tuscany.core.implementation.composite.AbstractCompositeCo mponent.start(
> AbstractCompositeComponent.java:117)
>     at
>
> org.apache.tuscany.core.services.extension.DirectoryScanExtender.dep loyExtension
> (DirectoryScanExtender.java:120)
>     at
> org.apache.tuscany.core.services.extension.DirectoryScanExtender.ini t (
> DirectoryScanExtender.java:83)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke (
> DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at
> org.apache.tuscany.core.injection.MethodEventInvoker.invokeEvent(
> MethodEventInvoker.java:42)
>     ... 15 more
> Caused by: java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at
> org.apache.tuscany.core.injection.MethodInjector.inject (
> MethodInjector.java:46)
>     ... 28 more
> Caused by: org.apache.axis2.AxisFault: ClassNotFoundException Error in
> loading message receivers
> org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver
>     at
>
> org.apache.axis2.deployment.URLBasedAxisConfigurator.getAxisConfigur ation(
> URLBasedAxisConfigurator.java:75)
>     at
>
> org.apache.axis2.context.ConfigurationContextFactory.createConfigura tionContext
> (ConfigurationContextFactory.java:61)
>     at
>
> org.apache.tuscany.binding.axis2.util.TuscanyAxisConfigurator.getCon figurationContext(
> TuscanyAxisConfigurator.java:40)
>     at
> org.apache.tuscany.binding.axis2.Axis2BindingBuilder.setServletHost(
> Axis2BindingBuilder.java:49)
>     ... 33 more
>
>
> -------------------------------------------------------------------- -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



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

Reply via email to