[JBoss JIRA] Created: (WELD-462) Injection into EJB Interceptor classes does not occur
by Ian (JIRA)
Injection into EJB Interceptor classes does not occur
-----------------------------------------------------
Key: WELD-462
URL: https://jira.jboss.org/jira/browse/WELD-462
Project: Weld
Issue Type: Bug
Affects Versions: 1.0.1.Final
Environment: JBoss 6.0.0 M2 with Weld 1.0.1 Final, on Windows XP SP3 and JDK 1.6
Reporter: Ian
An interceptor for an EJB (not a Weld interceptor) is a contained managed class, yet it is not being injected with any dependencies.
Some example code:
public class FaultBarrierInterceptor {
@Inject
private Logger log;
@AroundInvoke
public Object intercept(final InvocationContext invocationContext)
throws Exception {
try {
return invocationContext.proceed();
}
catch (RuntimeException e) {
log.error("An uncaught exception was caught: \n-METHOD: " + invocationContext.getMethod() + "\n-PARAMS: " +
Arrays.toString(invocationContext.getParameters()));
throw new MyUncaughtException(e);
}
}
}
When you debug this code, the logger variable is not injected.
The code for the EJB has a local interface (it's an EJB 3.0 structure, not 3.1). The interceptor definition is:
@Stateless
@Interceptors( {FaultBarrierInterceptor.class})
public class OptinServiceBean
implements OptinService {
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months
[JBoss JIRA] Closed: (WELDINT-18) Ear Deployment fails
by Pete Muir (JIRA)
[ https://jira.jboss.org/browse/WELDINT-18?page=com.atlassian.jira.plugin.s... ]
Pete Muir closed WELDINT-18.
----------------------------
> Ear Deployment fails
> --------------------
>
> Key: WELDINT-18
> URL: https://jira.jboss.org/browse/WELDINT-18
> Project: Weld Integration (CLOSED)
> Issue Type: Bug
> Components: Weld Bootstrapper
> Environment: JBoss 5.1.0.GA (for java 1.5) with the webbeans that comes with that
> Reporter: Martin Eigenbrodt
> Assignee: Ales Justin
> Fix For: 6.0.0.Beta6
>
>
> I've build the numberguess example and it runs fine if deployed as war.
> I've then wrapped the war in an ear that contains nothingh but the war. Deploying this ear fails:
> http://services.grp.haufemg.com:9090/epwiki/Build%20Guideline#preview
> 15:05:26,718 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console
> 15:05:26,875 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/Programme/Java/jboss-5.1.0.GA/server/default/deploy/webbeans-numberguess.ear/ state=PreReal mode=Manual required
> State=Real
> org.jboss.deployers.spi.DeploymentException: Error deploying: vfszip:/C:/Programme/Java/jboss-5.1.0.GA/server/default/deploy/webbeans-numberguess.ear/
> at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
> at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:136)
> at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployerWithInput.deploy(AbstractRealDeployerWithInput.java:125)
> at org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.deployComponents(AbstractComponentDeployer.java:102)
> at org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer.internalDeploy(AbstractComponentDeployer.java:82)
> 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.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:619)
> Caused by: java.lang.IllegalArgumentException: Exception loading class for ScopeKey addition.
> at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:67)
> at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
> ... 34 more
> Caused by: java.lang.ClassNotFoundException: org.jboss.webbeans.bootstrap.WebBeansBootstrap from BaseClassLoader@f1c18{VFSClassLoaderPolicy@1fd96c5{name=vfszip:/C:/Programme/Java/jboss-5.1.0.GA/server
> /default/deploy/webbeans-numberguess.ear/ domain=ClassLoaderDomain@eb67e8{name=DefaultDomain parentPolicy=BEFORE parent=org.jboss.bootstrap.NoAnnotationURLClassLoader@1dd7056} roots=[MemoryContextHand
> ler@28669459[path= context=vfsmemory://5c4o22s-3vjcoj-fwj7bm70-1-fwj7cfjv-2a real=vfsmemory://5c4o22s-3vjcoj-fwj7bm70-1-fwj7cfjv-2a], DelegatingHandler(a)5956743[path=webbeans-numberguess.ear context=fi
> le:/C:/Programme/Java/jboss-5.1.0.GA/server/default/deploy/ real=file:/C:/Programme/Java/jboss-5.1.0.GA/server/default/deploy/webbeans-numberguess.ear]] delegates=null exported=[] <IMPORT-ALL>NON_EMP
> TY}}
> at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:63)
> ... 35 more
> 15:05:26,921 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 4 months