What I am trying is to build the bootstrap KernelDeployment ManagedDeployments in the
ProfileServiceBootstrap start. This is working except for the conf/initialize.xml as it
fails to
| Caused by: java.lang.IllegalStateException: ClassLoader has not been set
| at
org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.getClassLoader(AbstractDeploymentUnit.java:152)
| at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:60)
| at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
| ... 6 more
|
Why in the BeanMetaDataFactoryVisitor.addBeanComponent is it ok to use the className when
there is only a ClassLoaderMetaData set, but no DeploymentUnit.classLoader, but if there
is no ClassLoaderMetaData, we try to load the class?
| protected static void addBeanComponent(DeploymentUnit unit, BeanMetaData bean)
| {
| DeploymentUnit component = unit.addComponent(bean.getName());
| component.addAttachment(BeanMetaData.class.getName(), bean);
| String className = bean.getBean();
| if (className != null)
| {
| Object qualifier;
| if (bean.getClassLoader() == null)
| {
| ClassLoader cl = unit.getClassLoader();
| try
| {
| qualifier = cl.loadClass(className);
| }
| catch (Exception e)
| {
| throw new IllegalArgumentException("Exception loading class for
ScopeKey addition.", e);
| }
| }
| else
| {
| qualifier = className;
| }
| component.getScope().addScope(CommonLevels.CLASS, qualifier);
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4188981#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...