-
1. Re: Scheduler IllegalStateException while migrating jboss4 -
jaikiran May 28, 2009 4:39 AM (in response to radimchatkalahari)Are you sure the same MBean name is not registered some place else through some other file? Can you post the entire console logs (not the server.log).
-
2. Re: Scheduler IllegalStateException while migrating jboss4 -
radimchatkalahari May 28, 2009 6:51 AM (in response to radimchatkalahari)When I remove META-INF\mes-scheduler-service.xml
server starts normally.
There is no other xml file containing this MBean
zipped logs can be found here:
http://radimch.net.tvtrinec.cz/2009-05-28/jboss5.1.0_log.zip
and here is zipped content of MyApp.ear/META-INF directory
http://radimch.net.tvtrinec.cz/2009-05-28/MyApp.ear_META-INF.zip
Thanks
Radim -
3. Re: Scheduler IllegalStateException while migrating jboss4 -
jaikiran May 28, 2009 7:19 AM (in response to radimchatkalahari)Can you upload your entire EAR?
In the meantime, you can workaround this by editing the %JBOSS_HOMR%/server/< servername>/conf/bootstrap/deployers.xml to comment out the following:<bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl"> <!-- Comment this out <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.deployment:service=DeployersImpl", exposedInterface=org.jboss.deployers.plugins.deployers.DeployersImplMBean.class, registerDirectly=true)</annotation> --> <constructor><parameter><inject bean="jboss.kernel:service=KernelController"/></parameter></constructor> <!-- Accept any implementor of deployer --> <incallback method="addDeployer"/> <uncallback method="removeDeployer"/> <property name="mgtObjectCreator"><inject bean="ManagedObjectCreator"/></property> </bean>
This workaround will not have any adverse effect. -
4. Re: Scheduler IllegalStateException while migrating jboss4 -
radimchatkalahari May 28, 2009 7:42 AM (in response to radimchatkalahari)I reduced ear to only relevant classes (mbean called from within PingService is also missing -> this app could not be run correctly, but should be deployable...)
http://radimch.net.tvtrinec.cz/2009-05-28/jboss5.1.0_MyApp.ear.zip
thanks
Radim -
5. Re: Scheduler IllegalStateException while migrating jboss4 -
jaikiran May 28, 2009 7:58 AM (in response to radimchatkalahari)You EAR META-INF contains this:
META-INF |--- jboss-app.xml |--- mes-scheduler-service.xml
By default, any *-service.xml is picked up and deployed. Your jboss-app.xml additionally lists this mes-scheduler-service.xml (again).<?xml version="1.0" encoding="UTF-8"?> <jboss-app> <module> <service>META-INF/mes-scheduler-service.xml</service> </module> </jboss-app>
This results, in an internal MBean created per deployment to be registered twice and thus leads to that WARN message. I would recommend that you don't list the mes-scheduler-service.xml in the jboss-app.xml -
6. Re: Scheduler IllegalStateException while migrating jboss4 -
radimchatkalahari May 28, 2009 8:44 AM (in response to radimchatkalahari)Thank you very much for you help,
your solution works great.
Radim -
7. Re: Scheduler IllegalStateException while migrating jboss4 -
radimchatkalahari May 28, 2009 11:53 AM (in response to radimchatkalahari)Registering is now ok, but I dive in another problem:
My PingService MBean (PingScheduler depends on it)
is not registered (deployed) by jboss 5.1.0
I Could not find it in jmx-console (in jboss 4.x that was ok)
- I even tried to follow MBean naming conventions by renaming IPingService to PingServiceMBean but without success..
Here is code of PingService:@Service @Local(IPingService.class) @Remote(IPingService.class) @Management(IPingService.class) public class PingService implements IPingService { private static Log log = LogFactory.getLog(PingService.class); private static final String SERVICE_NAME = "PingService"; @EJB(beanName = "PingEJB") private IPingEJB fPingEJB; public void create() throws Exception { log.info("Creating service " + SERVICE_NAME); } public void destroy() { log.info("Destroying service " + SERVICE_NAME); } public void start() throws Exception { log.info("Starting service " + SERVICE_NAME); } public void stop() { log.info("Stopping service " + SERVICE_NAME); } @TransactionAttribute(TransactionAttributeType.REQUIRED) public void ping() { fPingEJB.whoIsAlive(); } }
thank you
Radim -
8. Re: Scheduler IllegalStateException while migrating jboss4 -
jaikiran May 28, 2009 11:59 AM (in response to radimchatkalahari)I think the dependency name is different now. Try this, change the depends to:
<depends>PingService</depends>
and change the service bean code to:@Service(objectName = "PingService")