org.jboss.system.ServiceConfigurator has a bug that prevents two scoped 
dependent services deploy correctly. The bug is reproducible by running "ant" 
in top level directory of the archive attached to the case.  The only required 
external setting is the JBOSS_HOME environment variable, that should point to 
the installation directory of the server instance to test with. The sar will be 
deployed in $JBOSS_HOME/server/deploy.


This is the description of example and the bug:

The service example.Dependent depends on example.Dependency, as shown in the 
sar's deployment descriptor:

<server>
  | 
  |    <loader-repository>example:name=ScopedLoaderRepository
  |       
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
  |    </loader-repository>
  | 
  |    <mbean code="example.Dependency"
  |           name="example:name=Dependency">
  |    </mbean>
  | 
  |    <mbean code="example.Dependent"
  |           name="example:name=Dependent">
  |       <depends optional-attribute-name="Dependency"
  |                proxy-type="attribute">example:name=Dependency</depends>
  |    </mbean>
  | 
  | </server>

For a non-scoped configuration, the deployment succeeds.

For a scoped configuration, the deployment fails with:

12:21:33,152 INFO  [ServiceConfigurator] Problem configuring service 
example:name=Dependent
  | java.lang.ClassNotFoundException: No ClassLoaders found for: 
example.DependencyMBean
  |         at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:198)
  |         at 
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)
  |         at 
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
  |         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  |         at 
org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:356)
  |         at 
org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:442)
  |         ....
  | 


The problem is caused by the fact that during Dependent's configuration phase, 
ServiceConfigurator tries to create an example.Dependency dynamic proxy 
instance  using the current thread context class loader, which is associated 
with the top level loader repository. A class loader associated with the top 
level repository has no way of loading a class deployed within a scoped 
deployment, hence the exception.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944025#3944025

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944025


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to