For now I've re-added and partially reverted the change so the interfaces are 
available to the exception interface; see the commit messages for TODOs and 
FIXME. Pradeep, pl. open a jira ticket on this issues. Thanks;

commit 7c5c3c5dfcc985dfd6dd890c96fa840a2bac3e0e
Author: Rohit Yadav <[email protected]>
Date:   Wed Jan 9 05:43:41 2013 -0800

    api: Re-add deleted addProxyObject method on CloudException
    
    - This was removed part of the response work
    - Re-adding as this kind of method definition is available in several other
      exception classes and is used in a lot of cmd classes and in service layer
    - TODO: We need to find a way to replace old code and refactor method with 
the
      new definition that gets only uuid.
    - FIXME: Some tables don't have uuid for ex. ClusterVSMMapVO, in this case
      we should keep the method until we find a way to fix this issue
    
    Partially reverting a88ce6bb7f495dddeb954d1fc7826176646b3590
    
    Signed-off-by: Rohit Yadav <[email protected]>

diff --git a/api/src/com/cloud/exception/CloudException.java 
b/api/src/com/cloud/exception/CloudException.java
index fd83956..2ec6142 100644
--- a/api/src/com/cloud/exception/CloudException.java
+++ b/api/src/com/cloud/exception/CloudException.java
@@ -56,6 +56,15 @@ public class CloudException extends Exception {
                return;
        }
 
+    public void addProxyObject(Object voObj, Long id, String idFieldName) {
+       // Get the VO object's table name.
+       String tablename = AnnotationHelper.getTableName(voObj);
+       if (tablename != null) {
+               addProxyObject(tablename, id, idFieldName);
+       }
+       return;
+    }
+


________________________________________
From: Rohit Yadav [[email protected]]
Sent: Wednesday, January 09, 2013 7:10 PM
To: Pradeep Soundararajan; [email protected]
Subject: RE: ASF master nonoss build failed

Hi Pradeep,

That is part of the response change. ClusterVSMMapVO does not have a uuid 
column and the addProxyObject with args definition 
(java.lang.String,long,java.lang.String) was removed and replaced with 
(java.lang.String).
I don't know the best way to fix this, I can re-add the deleted/old method and 
keep both of the methods; a lot of exception classes have addProxyObject with 
the definition that accepts tablename, id and column, I'm not sure if we want 
the old methods or have them replaces by new one (uuid one will help us escape 
manually putting table name for all exceptions).

Pl. open a jira issue and assign to Min, she would be able to suggest the best 
way to fix it, also because there are a lot of cmd classes and managerimpls 
(service layer) where this pattern can be seen.

Git commit in which the old method was removed:

commit a88ce6bb7f495dddeb954d1fc7826176646b3590
Author: Min Chen <[email protected]>
Date:   Wed Dec 19 23:49:44 2012 -0800

    Remove IdentityProxy from CloudException and ExceptionResponse.

diff --git a/api/src/com/cloud/exception/CloudException.java 
b/api/src/com/cloud/exception/CloudException.java
index 8cfae21..fd83956 100644
--- a/api/src/com/cloud/exception/CloudException.java
+++ b/api/src/com/cloud/exception/CloudException.java
@@ -30,7 +30,7 @@ import com.cloud.utils.AnnotationHelper;
 public class CloudException extends Exception {

        // This holds a list of uuids and their names. Add uuid:fieldname pairs
-       protected ArrayList<IdentityProxy> idList = new 
ArrayList<IdentityProxy>();
+       protected ArrayList<String> idList = new ArrayList<String>();

        protected Integer csErrorCode;

@@ -44,26 +44,19 @@ public class CloudException extends Exception {
         
setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
     }

-    public void addProxyObject(Object voObj, Long id, String idFieldName) {
-       // Get the VO object's table name.
-       String tablename = AnnotationHelper.getTableName(voObj);
-       if (tablename != null) {
-               addProxyObject(tablename, id, idFieldName);
-       }
-       return;
-    }
+

        public CloudException() {
                super();
                
setCSErrorCode(CSExceptionErrorCode.getCSErrCode(this.getClass().getName()));
        }

-       public void addProxyObject(String tableName, Long id, String 
idFieldName) {
-               idList.add(new IdentityProxy(tableName, id, idFieldName));
+       public void addProxyObject(String uuid) {
+               idList.add(uuid);


________________________________________
From: Pradeep Soundararajan
Sent: Wednesday, January 09, 2013 6:37 PM
To: Rohit Yadav
Subject: RE: ASF master nonoss build failed

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) 
on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] CiscoNexusVSMDeviceManagerImpl.java:[345,26] 
addProxyObject(java.lang.String) in com.cloud.exception.CloudException cannot 
be applied to (java.lang.String,long,java.lang.String)
[ERROR] -> [Help 1]

Please find the next error :)

I am using the command: mvn install -Dnonoss


-----Original Message-----
From: Rohit Yadav [mailto:[email protected]]
Sent: Wednesday, January 09, 2013 6:28 PM
To: [email protected]
Subject: RE: ASF master nonoss build failed

Oops, my mistake, the interface definition change to array of strings.

Fixed in:
commit 2eee2cd999889d105395621eb1f22103ca6f51c5
Author: Rohit Yadav <[email protected]>
Date:   Wed Jan 9 04:56:32 2013 -0800

    plugins: Fix getPropertiesFiles() for pluggable service plugins, 
CiscoNexusVSMEElement


Thanks for bringing this, pl. run it again and let me know if it fails for some 
other reasons.

Regards.
________________________________________
From: Pradeep Soundararajan [[email protected]]
Sent: Wednesday, January 09, 2013 6:15 PM
To: [email protected]
Subject: ASF master nonoss build failed

I have noticed today non-oss build on ASF master failed.  Till yesterday it was 
going fine. I have copied the entire logs here: http://pastebin.com/JmRnYLiY

Snippet of the error message:

[INFO] Apache CloudStack Plugin - Hypervisor VMware ...... FAILURE [3.699s] 
..........
..........
..........
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) 
on project cloud-plugin-hypervisor-vmware: Compilation failure: Compilation 
failure:
[ERROR] CiscoNexusVSMDeviceManagerImpl.java:[345,26] 
addProxyObject(java.lang.String) in com.cloud.exception.CloudException cannot 
be applied to (java.lang.String,long,java.lang.String)
[ERROR] CiscoNexusVSMElement.java:[62,7] 
com.cloud.network.element.CiscoNexusVSMElement is not abstract and does not 
override abstract method getPropertiesFiles() in 
com.cloud.utils.component.PluggableService
[ERROR] CiscoNexusVSMElement.java:[239,4] method does not override or implement 
a method from a supertype

Thanks,
Pradeep S

Reply via email to