[Management, JMX/JBoss] - Schedulable & jboss-service.xml
by rabbiaqaswar
Hello
I am trying to use the Scheduler service provided by JBoss 4.2.2 GA. Here is how the scheduler-service in default/deploy directory looks like:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <server>
|
| <mbean code="org.jboss.varia.scheduler.Scheduler" name=":service=Scheduler">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">org.schedular.MySchedular</attribute>
| <attribute name="SchedulableArguments">TheName,123456789</attribute>
| <attribute name="SchedulableArgumentTypes">java.lang.String,long</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">1000</attribute>
| <attribute name="InitialRepetitions">5</attribute>
| <depends>
| <mbean code="javax.management.timer.Timer"
| name="jboss:service=Timer"/>
| </depends>
| </mbean>
|
| </server>
|
and here is the Scheduler class:
| package org.schedular;
|
| import java.util.Date;
| import org.jboss.varia.scheduler.Schedulable;
|
| public class MySchedular implements Schedulable {
|
| private String name;
| private long value;
|
| public MySchedular(String name, long value) {
| this.name = name;
| this.value = value;
| System.out.println("ctor, name: " + name + ", value: " + value);
| }
|
| public void perform(Date now, long remainingRepetitions) {
| System.out.println("perform, now: " + now +
| ", remainingRepetitions: " + remainingRepetitions +
| ", name: " + name + ", value: " + value);
| }
| }
This MySchedular is part of an ejb-module of the application so I have to place it inside the jar file containing all the ejbs. Now the problem is that when i start JBoss it gives the following error:
| [Scheduler] Failed to find: org.schedular.MySchedular
| java.lang.ClassNotFoundException: No ClassLoaders found for: org.schedular.MySchedular
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss:service=Scheduler
| State: FAILED
| Reason: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@d006a7 on mbean jboss:service=Scheduler; - nested throwable: (java.security.InvalidParameterException: Given class org.schedular.MySchedular is not not found)
|
When the jar file containing MySchedular is deployed, JBoss deploys it successfully. But the perform method in MySchedular is not executed. Now while the server is running, i make any changes like add an empty line in the scheduler-service.xml and save it, MySchedular perform method is invoked showing:
| INFO [STDOUT] ctor, name: TheName,value: 123456789
| INFO [STDOUT] perform, now: Sun Apr 20 18:15:55 GST 2008, remainingRepetitions: 4, name: TheName,value: 123456789
| INFO [STDOUT] perform, now: Sun Apr 20 18:15:56 GST 2008, remainingRepetitions: 3, name: TheName,value: 123456789
| INFO [STDOUT] perform, now: Sun Apr 20 18:15:57 GST 2008, remainingRepetitions: 2, name: TheName,value: 123456789
| INFO [STDOUT] perform, now: Sun Apr 20 18:15:58 GST 2008, remainingRepetitions: 1, name: TheName,value: 123456789
|
I cannot understand what am I missing here, please see if you can help.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145341#4145341
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145341
18 years, 3 months
[Beginners Corner] - How to integrate JBoss 4.0.3SP1 with Tibco 4.4.0
by amitapu
Hi all, I am new to JBoss and Tibco. I followed wiki.jboss.org/wiki/IntegrationWithTibcoEMS
But I did not succeed in deploying the example provided there. I am always getting the following errors:
anonymous wrote :
| 21:15:04,921 WARN [JMSContainerInvoker] JMS provider failure detected:
| javax.naming.NoInitialContextException: Cannot instantiate class: com.tibco.tibjms.naming.TibjmsInitialContextFactory [Root exceptio
| is java.lang.ClassNotFoundException: No ClassLoaders found for: com.tibco.tibjms.naming.TibjmsInitialContextFactory ]
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.(InitialContext.java:197)
| at org.jboss.jms.jndi.JNDIProviderAdapter.getInitialContext(JNDIProviderAdapter.java:30)
| at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:146)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
| at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173)
| at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:605)
| at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:932)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:428)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:179)
| at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:262)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:428)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
| at $Proxy55.start(Unknown Source)
| at org.jboss.ejb.EjbModule.startService(EjbModule.java:395)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:428)
| at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
| at $Proxy33.start(Unknown Source)
| at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:627)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
| at $Proxy34.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
| at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
|
However, I was able to get this example working with JBoss MQ.
I am stuck for the last 5 days. Any help will be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145331#4145331
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145331
18 years, 3 months
[Installation, Configuration & DEPLOYMENT] - Problem re-deploying war inside ear
by cardoso
Hi everybody,
when I am redeploying an ear-packed application (copying to default/server/deploy) the web app is not updated by jboss, although all files inside the EAR and WAR are changed or have new timestamps.
The server console output is:
| [TomcatDeployment] deploy, ctxPath=/myapp, vfsUrl=myapp.ear/myapp.war
|
The files in the default/tmp/deploy folder are the old ones.
There is no error message or exception shown in the console log, the server log shows the exception below:
| 2008-04-20 11:19:06,605 DEBUG [org.jboss.web.tomcat.service.deployers.TomcatDeployment] Unable to retrieve orb
| javax.management.InstanceNotFoundException: jboss:service=CorbaORB is not registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:529)
| at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:559)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment$EncListener.lifecycleEvent(TomcatDeployment.java:506)
| at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4358)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5357)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:346)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:347)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:89)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:67)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
| at $Proxy5.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| 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:327)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:255)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:659)
| at org.jboss.system.ServiceController.start(ServiceController.java:431)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:150)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:108)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:874)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:246)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:131)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:408)
| at org.jboss.Main.boot(Main.java:208)
| at org.jboss.Main$1.run(Main.java:534)
| at java.lang.Thread.run(Thread.java:595)
|
There is a servlet that is calling an EJB that it is looking up via initial context and "myapp/beanname/local", but this works fine, unless I re-deploy the application. After redeploying I am also getting class cast exceptions from the line in the servlet where the local interface of the EJB is requested.
I do not configure any ejb references in the jar or the war, as I understood from JBoss documentation that this is not required for JBoss.
After stopping JBoss and starting again everything is working fine again and the new webapp is used.
I am using:
- Sun Java 1.5.0_11 under Linux
- JBoss [Morpheus] 5.0.0.Beta4 (build: SVNTag=JBoss_5_0_0_Beta4 date=200802091115)
Any help appreciated.
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145329#4145329
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145329
18 years, 3 months