Hide Forgot
Version-Release number of selected component (if applicable): the git commit where this happens: 265e3867fc4d6c97546b5d88f791993cf915c4b1 Steps to Reproduce: 1. run webadmin in DEV mode 2. go to hosts->new 3. fill the form with correct data 4. press OK 5. confirm also the next dialog (press OK) Actual results: java.lang.ClassNotFoundException: org.ovirt.engine.core.common.validation.HostnameOrIPConstraint in class AnnotationParser in method parseClassArray Additional info: This exception is thrown only the first time - if the window is not refreshed, and the steps to reproduce the error are performed again, the exception is not thrown. Also in web mode this exception is not thrown. After some analyze it seems that the problem is, that during the submit the VdsStatic is about to be serialized and during the check, if it can be, also the ip field of this class is checked, if is not annotated with the @GwtTransient annotation. The ip field of this class is also annotated with the @HostnameOrIp annotation. This annotation references the HostnameOrIPConstraint, which does not exist, because it is not mentioned in the SharedGwt.gwt.xml. And it can not be mentioned in this file, because it references the ValidationUtils which references the java.util.regex.Pattern which is not emulated by GWT.
The reason why it fails for the first time and not for the second one is as follows: When the HostnameOrIp annotation is first time inspected, the sun.reflect.annotation.AnnotationType.getInstance is called which tries to get the AnnotationType from sun.misc.SharedSecrets. If it is not there yet, the new one is about to be created. The creation is as follows: - first the methods are processed - than the result is set to the SharedSecrets - than the annotations of this annotation are processed The last step fails, because of the class not found When the class is second time inspected, the SharedSecrets already contains the annotation, so the logic which fails on class not found is not executed. For me the following solution works: the gwt-extension contains the HostnameOrIp class which overrides the one implemented in common and removes the payload() method for the client. When also the @Constraint(validatedBy = HostnameOrIPConstraint.class) is removed (which does not make sense to have it there on the front-end), the creation of the new host works fine for me.
closing ON_QA bugs as oVirt 3.1 was released: http://www.ovirt.org/get-ovirt/