This project is read-only.
1

Resolved

OpenMBeanInfo serialization in JSR-262

description

From the breakpoint I could see it was the attribute 'DynamicValue'

 

Exception

System.InvalidCastException was unhandled
Message="Unable to cast object of type 'NetMX.Remote.Jsr262.OpenDataType_Type' to type 'NetMX.OpenMBean.OpenType'."
Source="NetMX.Remote.Jsr262"
StackTrace:
   at NetMX.Remote.Jsr262.PropertyModelInfoType.Deserialize() in C:\dev\Visual Studio 2008\NetMX-55182\NetMX\NetMX.Remote.Jsr262\Jsr262GeneratedTypesLogic.cs:line 447
   at NetMX.Remote.Jsr262.ResourceMetaDataType.<Deserialize>b__9(PropertyModelInfoType x) in C:\dev\Visual Studio 2008\NetMX-55182\NetMX\NetMX.Remote.Jsr262\Jsr262GeneratedTypesLogic.cs:line 383
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at NetMX.MBeanInfo..ctor(String className, String description, IEnumerable`1 attributes, IEnumerable`1 constructors, IEnumerable`1 operations, IEnumerable`1 notifications) in C:\dev\Visual Studio 2008\NetMX-55182\NetMX\NetMX\Info\MBeanInfo.cs:line 107
   at NetMX.Remote.Jsr262.ResourceMetaDataType.Deserialize() in C:\dev\Visual Studio 2008\NetMX-55182\NetMX\NetMX.Remote.Jsr262\Jsr262GeneratedTypesLogic.cs:line 382
   at NetMX.Remote.Jsr262.Client.Jsr262MBeanServerConnection.GetMBeanInfo(ObjectName name) in C:\dev\Visual Studio 2008\NetMX-55182\NetMX\NetMX.Remote.Jsr262\Client\Jsr262MBeanServerConnection.cs:line 165
   at JmxClientDemo.Program.QueryAgentConnectorDemo() in C:\dev\Visual Studio 2008\NetMX-55182\NetMX\Samples\JmxClientDemo\Program.cs:line 134
   at JmxClientDemo.Program.Main(String[] args) in C:\dev\Visual Studio 2008\NetMX-55182\NetMX\Samples\JmxClientDemo\Program.cs:line 18
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
InnerException:

 

Server Response

<?xml version='1.0' encoding='utf-8'?>
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Header>
<Action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
http://jsr262.dev.java.net/DynamicMBeanResource/MetadataResponse</Action>
<ns9:ConnectionId xmlns:ns3="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:ns4="http://schemas.xmlsoap.org/ws/2004/08/eventing"
xmlns:ns5="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
xmlns:ns6="http://schemas.xmlsoap.org/ws/2004/09/transfer"
xmlns:ns7="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:ns8="http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd"
xmlns:ns9="http://jsr262.dev.java.net/jmxconnector">
a9aa0eed-06d7-4d07-83ba-b284dee60547</ns9:ConnectionId>
<To xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</To>
<MessageID xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
uuid:e32bfaa4-69bb-4675-a641-4698acf0090d</MessageID>
<RelatesTo xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
urn:uuid:5ea27d46-4f73-465c-9d8a-c882565e4d03</RelatesTo>
</S:Header>
<S:Body>
<ns9:DynamicMBeanResourceMetaData xmlns:ns3="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:ns4="http://schemas.xmlsoap.org/ws/2004/08/eventing"
xmlns:ns5="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
xmlns:ns6="http://schemas.xmlsoap.org/ws/2004/09/transfer"
xmlns:ns7="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:ns8="http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd"
xmlns:ns9="http://jsr262.dev.java.net/jmxconnector">
  <ns9:Description>A description of the management interface of
  the MBean</ns9:Description>
  <ns9:PropertyType is-is="false" access="rw" type="ns9:Int"
  name="DynamicValue">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Integer"
        name="java.lang.Integer" type="ns9:Int" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>A dynamic value used to test getAttribute
    and setAttribute</ns9:Description>
  </ns9:PropertyType>
  <ns9:PropertyType is-is="false" access="rw" type="ns9:Int"
  name="ValueTickerInterval">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Integer"
        name="java.lang.Integer" type="ns9:Int" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>The interval (in millisecs) used by the
    value ticker</ns9:Description>
  </ns9:PropertyType>
  <ns9:PropertyType is-is="false" access="r" type="ns9:Int"
  name="SampleReadableValue">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Integer"
        name="java.lang.Integer" type="ns9:Int" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>A sample read only value</ns9:Description>
  </ns9:PropertyType>
  <ns9:PropertyType is-is="false" access="r" type="ns9:Long"
  name="StartTime">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Long"
        name="java.lang.Long" type="ns9:Long" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>The time that the application
    started</ns9:Description>
  </ns9:PropertyType>
  <ns9:OperationType impact="w" name="incrementDynamicValue">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Void"
        name="java.lang.Void" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>Increment the value of attribute
    "dynamicValue"</ns9:Description>
  </ns9:OperationType>
  <ns9:OperationType impact="w" name="resetDynamicValue">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Void"
        name="java.lang.Void" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>Reset the value of attribute
    "dynamicValue" to zero</ns9:Description>
  </ns9:OperationType>
  <ns9:OperationType impact="w" name="startValueTicker">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Void"
        name="java.lang.Void" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>Starts a thread that automatically
    increments the attribute "dynamicValue"</ns9:Description>
  </ns9:OperationType>
  <ns9:OperationType impact="w" name="stopValueTicker">
    <ns9:Field>
      <ns9:Name>openType</ns9:Name>
      <ns9:Value>
        <ns9:SimpleDataType description="java.lang.Void"
        name="java.lang.Void" />
      </ns9:Value>
    </ns9:Field>
    <ns9:Description>Stops the thread that automatically
    increments the attribute "dynamicValue"</ns9:Description>
  </ns9:OperationType>
  <ns9:NotificationType type=""
  name="com.acme.agentconnectordemo.dynamicValue">
    <ns9:Description>Notifications emitted to indicate a change
    in the value of attribute [dynamicValue]</ns9:Description>
    <ns9:NotificationType>
    jmx.attribute.change</ns9:NotificationType>
  </ns9:NotificationType>
  <ns9:DynamicMBeanResourceClass>
  com.acme.fix.management.demo.AgentConnectorDemo</ns9:DynamicMBeanResourceClass>
</ns9:DynamicMBeanResourceMetaData>
</S:Body>
</S:Envelope>

comments