[
http://jira.jboss.com/jira/browse/JBAS-5471?page=comments#action_12410072 ]
Galder Zamarreno commented on JBAS-5471:
----------------------------------------
After injecting the mbeanServer in the kernelAbstraction, I got:
18:26:22,985 ERROR [STDERR] Caused by: java.lang.RuntimeException:
java.lang.NullPointerException
18:26:22,986 ERROR [STDERR] at
org.jboss.ejb3.deployers.JBossASKernel.installMBean(JBossASKernel.java:149)
18:26:22,990 ERROR [STDERR] at
org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:587)
Is there any need to call:
public void installMBean(ObjectName on, DependencyPolicy dependencies,
Object service)
{
if(mbeanServer == null)
throw new RuntimeException("No MBeanServer has been injected");
try
{
mbeanServer.registerMBean(service, on);
install(on.getCanonicalName(), dependencies, null, service);
Judging from the log just before the exception:
18:26:20,829 INFO [JBossASKernel] installing bean:
jboss.j2ee:jar=acme-ejb3-service.jar,name=SystemTimeService,service=EJB3
18:26:20,830 INFO [JBossASKernel] with dependencies:
18:26:20,830 INFO [JBossASKernel] and demands:
18:26:20,830 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
18:26:20,830 INFO [JBossASKernel] and supplies:
18:26:20,831 INFO [JBossASKernel] Class:com.acme.ejb3.service.Time
18:26:22,203 INFO [EJBContainer] STARTED EJB: com.acme.ejb3.as5.service.SystemTimeService
ejbName: SystemTimeService
The bean itself has already been installed in the MC, so installMBean
should only need to make sure that it's registered properly with the mbean
server. I don't think there's a need to call install() again. I'll try this
and see
what happens.
Deploying EJB3 service throws "java.lang.RuntimeException: No
MBeanServer has been injected"
--------------------------------------------------------------------------------------------
Key: JBAS-5471
URL:
http://jira.jboss.com/jira/browse/JBAS-5471
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: EJB3
Affects Versions: JBossAS-5.0.0.Beta4
Reporter: Galder Zamarreno
Assigned To: Galder Zamarreno
Fix For: JBossAS-5.0.0.CR1
Attachments: acme-ejb3-service-src.zip, acme-ejb3-service.jar, server.log
I'm trying to deploy an EJB3 service but I'm unable to do so as the following
is thrown:
2008-04-22 17:21:20,640 ERROR [STDERR] (main) Caused by: java.lang.RuntimeException: No
MBeanServer has been injected
2008-04-22 17:21:20,641 ERROR [STDERR] (main) at
org.jboss.ejb3.deployers.JBossASKernel.installMBean(JBossASKernel.java:135)
2008-04-22 17:21:20,641 ERROR [STDERR] (main) at
org.jboss.ejb3.service.ServiceContainer.registerManagementInterface(ServiceContainer.java:587)
Please find attached:
- source code for EJB3 service
- deployment archive
- server.log with TRACE on org.jboss.ejb3
I suspect Ejb3JBoss5Deployment should be injecting mbeanServer in the kernelAbstraction
but it doesn't:
public Ejb3JBoss5Deployment(DeploymentUnit ejb3Unit, Kernel kernel, MBeanServer
mbeanServer, org.jboss.deployers.structure.spi.DeploymentUnit jbossUnit, DeploymentScope
deploymentScope, JBossMetaData metaData, PersistenceUnitsMetaData
persistenceUnitsMetaData)
{
super(ejb3Unit, deploymentScope, metaData, persistenceUnitsMetaData);
this.jbossUnit = jbossUnit;
kernelAbstraction = new JBossASKernel(kernel);
// todo maybe mbeanServer should be injected?
this.mbeanServer = mbeanServer;
}
I'll have a go at passing the mbeanServer to the kernelAbstraction and see if that
fixes it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira