2 Replies Latest reply on Dec 13, 2007 2:42 PM by Scott Stark

    ManagedProperty value check

    Alexey Loubyansky Master

      I am getting an exception below trying to set null as a value for int. Is there a way to check the validity of the value before setting it? There is 'String ManagedProperty.checkValidValue(Serializable)' but the implementation always returns null, meaning always valid.

      java.lang.reflect.UndeclaredThrowableException
       at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.setValue(AbstractManagedObjectFactory.java:760)
       at org.jboss.managed.plugins.WritethroughManagedPropertyImpl.setValue(WritethroughManagedPropertyImpl.java:111)
       at org.jboss.resource.deployers.management.DsDataSourceTemplate.writeTemplate(DsDataSourceTemplate.java:148)
       at org.jboss.resource.deployers.management.DsDataSourceTemplate.applyTemplate(DsDataSourceTemplate.java:69)
       at org.jboss.profileservice.management.ManagementViewImpl.applyTemplate(ManagementViewImpl.java:551)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:56)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:771)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
      Caused by: java.lang.IllegalArgumentException: Wrong arguments. setBackgroundValidationMinutes for target org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData@135b50c expected=[int] actual=[null]
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:356)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
       at org.jboss.beans.info.plugins.AbstractPropertyInfo.set(AbstractPropertyInfo.java:182)
       at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.setValue(AbstractManagedObjectFactory.java:756)
       at org.jboss.managed.plugins.WritethroughManagedPropertyImpl.setValue(WritethroughManagedPropertyImpl.java:111)
       at org.jboss.resource.deployers.management.DsDataSourceTemplate.writeTemplate(DsDataSourceTemplate.java:148)
       at org.jboss.resource.deployers.management.DsDataSourceTemplate.applyTemplate(DsDataSourceTemplate.java:69)
       at org.jboss.profileservice.management.ManagementViewImpl.applyTemplate(ManagementViewImpl.java:551)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
       at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
       at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:56)
       at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:771)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
       at org.jboss.remoting.Client.invoke(Client.java:1634)
       at org.jboss.remoting.Client.invoke(Client.java:548)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at AOPProxy$1.applyTemplate(AOPProxy$1.java)
       at org.jboss.test.profileservice.test.ProfileServiceUnitTestCase.testAddDataSource(ProfileServiceUnitTestCase.java:392)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at AOPProxy$1.applyTemplate(AOPProxy$1.java)
       at org.jboss.test.profileservice.test.ProfileServiceUnitTestCase.testAddDataSource(ProfileServiceUnitTestCase.java:392)