Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4869

TypeConverter does not properly convert ExpressionValue

XMLWordPrintable

    • Workaround Exists
    • Hide

      Replace the expression with the direct value.
      In the example of the description:
      original:
      <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
      change:
      <socket-binding-group name="standard-sockets" default-interface="public" port-offset="0"> <!-- or a value you like to use -->

      Show
      Replace the expression with the direct value. In the example of the description: original: <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> change: <socket-binding-group name="standard-sockets" default-interface="public" port-offset="0"> <!-- or a value you like to use -->

      Executing the following code results in an IAE:

              String[] offsetPath = {"jboss.as:socket-binding-group=standard-sockets","port-offset"};
             
              MBeanServer server = ManagementFactory.getPlatformMBeanServer();
              ObjectName name;
              try {
                  name = new ObjectName(offsetPath[0]);           
                  Object offset = server.getAttribute(name, offsetPath[1]);           
              } catch (Exception e){
                  e.printStackTrace();
              } 
      
      ExpressionValue(ModelValue).asInt() line: 58   
      ModelNode.asInt() line: 226   
      TypeConverter$IntegerTypeConverter.fromModelNode(ModelNode) line: 303   
      TypeConverter.fromModelNode(ModelNode, ModelNode) line: 83   
      ModelControllerMBeanHelper.getAttribute(RootResourceHack$ResourceAndRegistration, PathAddress, ObjectName, String) line: 220   
      ModelControllerMBeanHelper.getAttribute(ObjectName, String) line: 181   
      ModelControllerMBeanServerPlugin.getAttribute(ObjectName, String) line: 69   
      PluggableMBeanServerImpl.getAttribute(ObjectName, String) line: 154   
      TestSingleton.<init>() line: 39   
      NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not available [native method]   
      NativeConstructorAccessorImpl.newInstance(Object[]) line: 39   
      DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27   
      Constructor<T>.newInstance(Object...) line: 513   
      ConstructedValue<T>.getValue() line: 61   
      ValueManagedReferenceFactory.getReference() line: 49   
      ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(InterceptorContext) line: 90   
      InterceptorContext.proceed() line: 288   
      WeavedInterceptor.processInvocation(InterceptorContext) line: 53   
      InterceptorContext.proceed() line: 288   
      NamespaceContextInterceptor.processInvocation(InterceptorContext) line: 50   
      InterceptorContext.proceed() line: 288   
      EjbBMTInterceptor.handleInvocation(InterceptorContext) line: 105   
      EjbBMTInterceptor(BMTInterceptor).processInvocation(InterceptorContext) line: 56   
      InterceptorContext.proceed() line: 288   
      CurrentInvocationContextInterceptor.processInvocation(InterceptorContext) line: 41   
      InterceptorContext.proceed() line: 288   
      TCCLInterceptor.processInvocation(InterceptorContext) line: 45   
      InterceptorContext.proceed() line: 288   
      ChainedInterceptor.processInvocation(InterceptorContext) line: 61   
      SingletonComponent(BasicComponent).constructComponentInstance(ManagedReference, boolean, InterceptorFactoryContext) line: 161   
      SingletonComponent(BasicComponent).createInstance() line: 85   
      SingletonComponent.getComponentInstance() line: 116   
      SingletonComponent.start() line: 130    
      

              kkhan1@redhat.com Kabir Khan
              emuckenhuber_jira Emanuel Muckenhuber (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: