9 Replies Latest reply: Jul 2, 2009 9:47 AM by David Lloyd RSS

Why is kernel looking for default constructor?

Richard Opalka Master

I don't know what I'm doing wrong :(
Could somebody help me with an idea what I might be doing wrong, please?

I've got the following deployer:

package org.jboss.wsf.container.jboss50.deployer;

import java.util.Set;

import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;

public class WSDeploymentAspectDeployer extends AbstractRealDeployer
{

 private final DeploymentAspect aspect;

 /**
 * Constructor.
 */
 public WSDeploymentAspectDeployer( DeploymentAspect aspect )
 {
 super();

 this.aspect = aspect;

 // inputs
 // ...
 // outputs
 // ...
 }

 @Override
 public void internalDeploy(DeploymentUnit unit) throws DeploymentException
 {
 // the deploy staff
 }

 @Override
 public void internalUndeploy(DeploymentUnit unit)
 {
 // the undeploy staff
 }
}



I've got the following configuration:
...
 <bean
 name="WSContainerMetaDataDeploymentAspect"
 class="org.jboss.wsf.container.jboss50.deployment.metadata.ContainerMetaDataDeploymentAspect">
 </bean>

 <bean name="WSContainerMetaDataDeployer" class="org.jboss.wsf.container.jboss50.deployer.WSDeploymentAspectDeployer">
 <constructor>
 <parameter class="org.jboss.wsf.spi.deployment.DeploymentAspect">
 <inject bean="WSContainerMetaDataDeploymentAspect"/>
 </parameter>
 </constructor>
 </bean>
...


And I'm getting the following exception (kernel tries to lookup public default constructor I don't provide):
15:59:53,815 ERROR [AbstractKernelController] Error installing to Instantiated: name=WSDeploymentAspectsDeployer state=Described
org.jboss.joinpoint.spi.JoinpointException: Constructor not found org.jboss.wsf.container.jboss50.deployer.WSDeploymentAspectDeployer[] in [ReflectConstructorInfoImpl@74247cc2{[ReflectClassInfoImpl@77ae020{name=org.jboss.wsf.spi.deployment.DeploymentAspect}]}]
 at org.jboss.joinpoint.plugins.Config.findConstructorInfo(Config.java:275)
 at org.jboss.kernel.plugins.config.Configurator.resolveConstructor(Configurator.java:290)
 at org.jboss.kernel.plugins.config.Configurator.findConstructor(Configurator.java:256)
 at org.jboss.kernel.plugins.config.Configurator.getConstructorJoinPoint(Configurator.java:213)
 at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getConstructorJoinPoint(AbstractKernelConfigurator.java:137)
 at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:61)
 at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
 at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
 at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
 at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
 at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
 at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
 at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
 at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
 at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
 at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
 at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
 at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
 at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
 at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
 at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
 at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
 at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
 at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
 at org.jboss.Main.boot(Main.java:221)
 at org.jboss.Main$1.run(Main.java:556)
 at java.lang.Thread.run(Thread.java:595)