[Remoting] - Newbie Remoting Problem (Class does not expose a management
by gottad
Hi,
I'm new at remoting with JBoss. I Use JBoss 4.2.0GA, Remoting 2.0.0 and Java JDK 1.5.0_12. I'm not possible to deploy the 2.0.0 Remoting-Server-Example. I get the Exception "Class does not expose a management interface".
This is my Server:
package rem;
|
| import javax.management.MBeanServer;
| import org.jboss.remoting.InvocationRequest;
| import org.jboss.remoting.InvokerLocator;
| import org.jboss.remoting.ServerInvocationHandler;
| import org.jboss.remoting.ServerInvoker;
| import org.jboss.remoting.callback.InvokerCallbackHandler;
| import org.jboss.remoting.transport.Connector;
|
| public class SampleInvocationHandler implements ServerInvocationHandler
| {
| public Object invoke(InvocationRequest invocation) throws Throwable{
| System.out.println("Invocation request is: " + invocation.getParameter());
| return "ich Server, dein Request ("+invocation.getParameter()+") meine Antwort";
| }
| public void addListener(InvokerCallbackHandler callbackHandler){}
|
| public void removeListener(InvokerCallbackHandler callbackHandler) {}
| public void setMBeanServer(MBeanServer server){}
|
| public void setInvoker(ServerInvoker invoker){}
| }
I compiled this File and placed it in a folder called "rem" (because of its package) and this folder would be included into an file called rem_test.jar. I have placed this rem_test.jar File in the JBOSS/server/default/lib directory.
I created then a META-INF Folder and placed there 2 XML-Files. The First one is "jboss-app.xml" with this content:
<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
| <jboss-app>
| <module>
| <service>rem.sar</service>
| </module>
| </jboss-app>
The second one is "jboss-service.xml" with this content:
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE server>
|
| <server>
| <!-- <classpath codebase="../" archives="*"/> -->
| <mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.remoting:service=Connector,transport=Socket"
| display-name="Socket transport Connector">
| <attribute name="Configuration">
| <config>
| <invoker transport="socket">
| <attribute name="numAcceptThreads">1</attribute>
| <attribute name="maxPoolSize">303</attribute>
| <attribute name="clientMaxPoolSize" isParam="true">304</attribute>
| <attribute name="socketTimeout">60000</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">6666</attribute>
| <!-- <attribute name="clientConnectAddress">127.0.0.1</attribute>
| <attribute name="clientConnectPort">7777</attribute> -->
| <attribute name="enableTcpNoDelay" isParam="true">false</attribute>
| <attribute name="backlog">200</attribute>
| </invoker>
| <handlers>
| <handler subsystem="remSample">
| rem.SampleInvocationHandler</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
| </server>
I created a Folder called "rem.sar" in the JBoss/server/default/deploy Folder and placed there the "META-INF" Folder with both xml files.
If I start JBoss, i get the Exception that JBoss need a management Interface. But i thought this was the "ServerInvocationHandler"? Here is part from the Log-File:
...
| 2007-06-08 18:23:17,113 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/C:/schulung/jboss-4.2.0.GA/server/default/deploy/rem.sar/
| org.jboss.deployment.DeploymentException: Class does not expose a management interface: java.lang.Object; - nested throwable: (javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| 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:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
| ...
I hope i make a stupid mistake, but i can't find my fault (and i still have no client). I'm trying since 12 hours about this problem, i hope someone can help me.
Thanks a lot!
Thomas (gottad)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052708#4052708
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052708
18Â years, 10Â months
[JBoss Seam] - Timers from previous deployments are still persistent
by tuxzilla
I have a ScheduleController that schedule tasks:
| @Startup
| @Scope(ScopeType.APPLICATION)
| @Name("scheduleController")
| public class ScheduleController {
| @In
| private Schedule schedule;
|
| @In(create=true)
| private ScheduledTask aTask;
|
| @Create
| public void scheduleAllTasks() {
| // this is for test only
| List<ScheduledTask> perMinuteTasks = new ArrayList<ScheduledTask>();
| perMinuteTasks.add(aTask);
| // starts 3 minutes later, once every two minutes
| schedule.runIntervaledTask(180000L, 120000L, perMinuteTasks);
| }
| }
|
Schedule.java has the asynchronous method:
| @Asynchronous
| public Timer runIntervaledTask(@Duration Long delay,
| @IntervalDuration long interval,
| List<ScheduledTask> tasks) {
| if (tasks != null) {
| for (ScheduledTask task : tasks) {
| task.execute();
| }
| }
| return null;
| }
|
After a few redeployment, it seems that I have timers from previous deployments still executing. In the console I saw these messages:
anonymous wrote :
| 11:08:42,593 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,609 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,625 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,625 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,625 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,625 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,640 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,640 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,656 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,656 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,671 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,687 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,703 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,703 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,703 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,703 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,718 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,734 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,734 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,734 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,750 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,750 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,765 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,765 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,781 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,781 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,796 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,796 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,812 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,812 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,843 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,859 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,859 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,859 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,875 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,890 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,890 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,890 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,906 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,921 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,953 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,953 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,953 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,953 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,984 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:42,984 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,000 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,000 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,015 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,031 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,046 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,046 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,062 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
| 11:08:43,078 ERROR [TimerImpl] Error invoking ejbTimeout: java.lang.RuntimeException: java.lang.IllegalStateException: Attempted to invoke a Seam component outside the context of a web application
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052697#4052697
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052697
18Â years, 10Â months