[Management, JMX/JBoss] - Class loader probelm
by xaleyba
Hi
I've a simple service that I use to start a JMS ActiveMQ broker configured in this way:
|
| <mbean code="com.xx.activemq.mbean.service.ActiveMQNetwork"
| name="jms.ActiveMQ:service=ActiveMQNetwork">
| <attribute name="PropertiesResource">remote-jndi.properties</attribute>
| <attribute name="MasterPropertiesResource">masterbroker.properties</attribute>
| <attribute name="SlavePropertiesResource">slavebroker.properties</attribute>
| <depends>jboss:service=Naming</depends>
| <depends>user:service=QuartzService,name=QuartzService</depends>
| </mbean>
|
| <!-- Proxy factory for MyService that will call target method on the target service -->
| <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
| name="jboss.jmx:type=adaptor,name=MyActiveMQNetworkInvokeTarget,protocol=jrmp,service=proxyFactory">
| <!-- Use the standard JRMPInvoker from conf/jboss-service.xxml -->
| <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
| <!-- The target MBean -->
| <depends optional-attribute-name="TargetName">jms.ActiveMQ:service=ActiveMQNetwork</depends>
| <!-- Where to bind the proxy factory -->
| <attribute name="JndiName">MyActiveMQNetworkInvokeTarget</attribute>
| <!-- Invoke target method instead of invoke(Invocation mi) -->
| <attribute name="InvokeTargetMethod">true</attribute>
| <!-- Comma-separated list of exported interfaces -->
| <attribute name="ExportedInterfaces">com.bs.activemq.mbean.service.ActiveMQNetworkMBean</attribute>
| <!-- client-side interceptors -->
| <attribute name="ClientInterceptors">
| <interceptors>
| <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
| <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
| <interceptor>org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor</interceptor>
| <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
| </interceptors>
| </attribute>
| </mbean>
|
|
My application works very well till yesterday when I installed a new webapp that use Spring. As my JBoss service use Spring too, it started to generate problems.
So, I need to isolate class loading in my service and I did it adding the following to jboss-service.xml file:
|
| <server>
| <loader-repository>
| com.notifications.broker:loader=activemq-broker-service.sar
| <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
| </loader-repository>
|
|
It worked well to solve my Spring problem but now I've a new problem. I got the error:
|
| 09:13:32,429 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
| 09:13:35,895 INFO [ServiceConfigurator] Problem configuring service jboss.jmx:type=adaptor,name=MyActiveMQNetworkInvokeTarget,protocol=jrmp,service=proxyFactory
| java.lang.IllegalArgumentException: Failed to find class: com.xx.activemq.mbean.service.ActiveMQNetworkMBean
| at org.jboss.util.propertyeditor.ClassArrayEditor.setAsText(ClassArrayEditor.java:38)
| at org.jboss.system.ServiceConfigurator.parseTextSerialData(ServiceConfigurator.java:541)
| at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:311)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:442)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:153)
| at org.jboss.system.ServiceController.install(ServiceController.java:215)
| at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
| at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
| 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 $Proxy4.install(Lorg.w3c.dom.Element;Ljavax.management.ObjectName;)Ljava.util.List;(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:232)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
| at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
| at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
| 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)
|
|
| ----
|
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.jmx:type=adaptor,name=MyActiveMQNetworkInvokeTarget,protocol=jrmp,service=proxyFactory
| State: FAILED
| Reason: java.lang.IllegalArgumentException: Failed to find class: com.xx.activemq.mbean.service.ActiveMQNetworkMBean
| I Depend On:
| jboss:service=invoker,type=jrmp
| jms.ActiveMQ:service=ActiveMQNetwork
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.jmx:type=adaptor,name=MyActiveMQNetworkInvokeTarget,protocol=jrmp,service=proxyFactory
| State: FAILED
| Reason: java.lang.IllegalArgumentException: Failed to find class: com.xx.activemq.mbean.service.ActiveMQNetworkMBean
| I Depend On:
| jboss:service=invoker,type=jrmp
| jms.ActiveMQ:service=ActiveMQNetwork
|
|
I understand that proxyFactory could not load my service classes because class loaders isolation but, how could I solve it ?
Thanks in advance
C
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027083#4027083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027083
19Â years, 1Â month
[JBossWS] - How to make XML processeing by myself using contract first (
by oskar.carlstedt
Hi!!
After reading a lot of posts I cannot find anything that really helps me here. So, time for a question.
I have my WSDL file that uses types/schema/import... to import new schema types. Now I want to create a session bean (or whatever else) that can handle this request using xml beans as data binding. I want to use xml beans because I have a lot of other xml processing in my code using xml beans, therefore xml beans is the most correct choice in this solution.
As I can see it is very hard to write a mapping file using xml beans directly. Is it possible at all? A more practical way to go is to use a method SOAPElements, e.g. a method like:
public SOAPElement doSomething(SOAPELement theRequest) {
MyXmlObject myXmlObj = SomeUtils.convertToMyXmlObject(thRequest);
....
MyXmlResponseObject myXmlResponseObj = ...
return SomUtils.convertToSoapElement(myXmlResponseObj);
}
Is this the way to go? Have anyone of you out here done this using the new JbossWS implementation (not the old axis based ws4ee). I can't proceed using trial and error here, it will take too long. I tried the following:
I tried to put javax.xml.soap.SOAPElement as java types in the jaxrpc mapping file. In Jboss4.0.5GA with JBossWS 1.2.0GA all request where mapped corectly, but it is impossible to send responses. The log says cannot find parameter ... for type javax.xml.soap.SOAPELement.
Then I tried to remove all sub types (only top messages where left types typed) left mapped. Then I couldn't deploy my service. A lot of missing type mapping errors occurred in the log..
Thanks
Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027082#4027082
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027082
19Â years, 1Â month