[Engine-devel] Eclipse IDE setup

Hi all, I am trying to set up an eclipse development environment for ovirt-engine and am running into a stubborn problem with missing classes. I have followed the directions for importing the Maven projects as written here: http://ovirt.org/wiki/Building_Ovirt_Engine/IDE The projects are able to be imported but I see lots of errors about missing imports such as: import org.ovirt.engine.api.model.* import org.ovirt.engine.core.common.* I should have a complete ovirt-engine source repository (I cloned the ovirt-engine git repo). Has anyone seen this problem before? Can you offer any suggestions to help me resolve it? Thanks! -- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center

Hi Adam! Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-( Laszlo ----- Original Message -----
From: "Adam Litke" <agl@us.ibm.com> To: engine-devel@ovirt.org Sent: Monday, February 6, 2012 3:49:33 PM Subject: [Engine-devel] Eclipse IDE setup
Hi all,
I am trying to set up an eclipse development environment for ovirt-engine and am running into a stubborn problem with missing classes. I have followed the directions for importing the Maven projects as written here: http://ovirt.org/wiki/Building_Ovirt_Engine/IDE
The projects are able to be imported but I see lots of errors about missing imports such as:
import org.ovirt.engine.api.model.* import org.ovirt.engine.core.common.*
I should have a complete ovirt-engine source repository (I cloned the ovirt-engine git repo). Has anyone seen this problem before? Can you offer any suggestions to help me resolve it? Thanks!
-- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote:
Hi Adam!
Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-(
Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors. This brings up a few questions: 1.) Which jdk should I use? I am currently using OpenJDK /usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) 2,) Does this need a Fedora/RH system to compile? 3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems. Thanks for the help!
Laszlo
----- Original Message -----
From: "Adam Litke" <agl@us.ibm.com> To: engine-devel@ovirt.org Sent: Monday, February 6, 2012 3:49:33 PM Subject: [Engine-devel] Eclipse IDE setup
Hi all,
I am trying to set up an eclipse development environment for ovirt-engine and am running into a stubborn problem with missing classes. I have followed the directions for importing the Maven projects as written here: http://ovirt.org/wiki/Building_Ovirt_Engine/IDE
The projects are able to be imported but I see lots of errors about missing imports such as:
import org.ovirt.engine.api.model.* import org.ovirt.engine.core.common.*
I should have a complete ovirt-engine source repository (I cloned the ovirt-engine git repo). Has anyone seen this problem before? Can you offer any suggestions to help me resolve it? Thanks!
-- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
-- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center

This is a multi-part message in MIME format. --------------080800080801040300050602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 02/06/2012 12:18 PM, Adam Litke wrote:
On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote:
Hi Adam!
Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-( Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors.
This brings up a few questions:
1.) Which jdk should I use? I am currently using OpenJDK
/usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
I am using a very similar jdk but on Fedora - #> java -version java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.4) (fedora-60.1.10.4.fc15-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) I can check what I am using on my Ubuntu machine when I get home. Have you put the correct settings in ~/.m2/settings.xml? http://www.ovirt.org/wiki/Building_oVirt_engine#Maven_personal_settings Jon
2,) Does this need a Fedora/RH system to compile?
3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems.
Thanks for the help!
Laszlo
----- Original Message -----
From: "Adam Litke"<agl@us.ibm.com> To: engine-devel@ovirt.org Sent: Monday, February 6, 2012 3:49:33 PM Subject: [Engine-devel] Eclipse IDE setup
Hi all,
I am trying to set up an eclipse development environment for ovirt-engine and am running into a stubborn problem with missing classes. I have followed the directions for importing the Maven projects as written here: http://ovirt.org/wiki/Building_Ovirt_Engine/IDE
The projects are able to be imported but I see lots of errors about missing imports such as:
import org.ovirt.engine.api.model.* import org.ovirt.engine.core.common.*
I should have a complete ovirt-engine source repository (I cloned the ovirt-engine git repo). Has anyone seen this problem before? Can you offer any suggestions to help me resolve it? Thanks!
-- Adam Litke<agl@us.ibm.com> IBM Linux Technology Center
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
--------------080800080801040300050602 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body text="#000000" bgcolor="#FFFFFF"> On 02/06/2012 12:18 PM, Adam Litke wrote: <blockquote cite="mid:20120206171834.GH3026@us.ibm.com" type="cite"> <pre wrap="">On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote: </pre> <blockquote type="cite"> <pre wrap="">Hi Adam! Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-( </pre> </blockquote> <pre wrap=""> Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors. This brings up a few questions: 1.) Which jdk should I use? I am currently using OpenJDK /usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode) </pre> </blockquote> <font face="Helvetica, Arial, sans-serif"><br> <br> I am using a very similar jdk but on Fedora - <br> <br> <br> <br> #> java -version<br> java version "1.6.0_22"<br> OpenJDK Runtime Environment (IcedTea6 1.10.4) (fedora-60.1.10.4.fc15-x86_64)<br> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)<br> <br> <br> I can check what I am using on my Ubuntu machine when I get home.<br> <br> Have you put the correct settings in ~/.m2/settings.xml?<br> <a class="moz-txt-link-freetext" href="http://www.ovirt.org/wiki/Building_oVirt_engine#Maven_personal_settings">http://www.ovirt.org/wiki/Building_oVirt_engine#Maven_personal_settings</a><br> <br> Jon<br> <br> </font> <blockquote cite="mid:20120206171834.GH3026@us.ibm.com" type="cite"> <pre wrap=""> 2,) Does this need a Fedora/RH system to compile? 3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems. Thanks for the help! </pre> <blockquote type="cite"> <pre wrap=""> Laszlo ----- Original Message ----- </pre> <blockquote type="cite"> <pre wrap="">From: "Adam Litke" <a class="moz-txt-link-rfc2396E" href="mailto:agl@us.ibm.com"><agl@us.ibm.com></a> To: <a class="moz-txt-link-abbreviated" href="mailto:engine-devel@ovirt.org">engine-devel@ovirt.org</a> Sent: Monday, February 6, 2012 3:49:33 PM Subject: [Engine-devel] Eclipse IDE setup Hi all, I am trying to set up an eclipse development environment for ovirt-engine and am running into a stubborn problem with missing classes. I have followed the directions for importing the Maven projects as written here: <a class="moz-txt-link-freetext" href="http://ovirt.org/wiki/Building_Ovirt_Engine/IDE">http://ovirt.org/wiki/Building_Ovirt_Engine/IDE</a> The projects are able to be imported but I see lots of errors about missing imports such as: import org.ovirt.engine.api.model.* import org.ovirt.engine.core.common.* I should have a complete ovirt-engine source repository (I cloned the ovirt-engine git repo). Has anyone seen this problem before? Can you offer any suggestions to help me resolve it? Thanks! -- Adam Litke <a class="moz-txt-link-rfc2396E" href="mailto:agl@us.ibm.com"><agl@us.ibm.com></a> IBM Linux Technology Center _______________________________________________ Engine-devel mailing list <a class="moz-txt-link-abbreviated" href="mailto:Engine-devel@ovirt.org">Engine-devel@ovirt.org</a> <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/engine-devel">http://lists.ovirt.org/mailman/listinfo/engine-devel</a> </pre> </blockquote> <pre wrap=""> </pre> </blockquote> <pre wrap=""> </pre> </blockquote> <br> </body> </html> --------------080800080801040300050602--

On 06/02/12 19:18, Adam Litke wrote:
On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote:
Hi Adam!
Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-(
Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors.
Hi Adam,
This brings up a few questions:
1.) Which jdk should I use? I am currently using OpenJDK
/usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
you are using the right JDK.
2,) Does this need a Fedora/RH system to compile?
The engine works on Fedora, RHEL, Ubuntu Gentoo and should work on any other Linux based operating system (Java is platform agnostic).
3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems.
There should not be any local issues, let's try to figure out what the issues are. The errors are probably not related to eclipse because you have compilation errors from the command line as well. I would start by compiling the engine and api with no tests and no UI: Run from the command line - 1. $ovirt_engine_home> mvn clean 2. $ovirt_engine_home> mvn install -DskipTests What is the result of the above two? Livnat
Thanks for the help!
Laszlo
----- Original Message -----
From: "Adam Litke" <agl@us.ibm.com> To: engine-devel@ovirt.org Sent: Monday, February 6, 2012 3:49:33 PM Subject: [Engine-devel] Eclipse IDE setup
Hi all,
I am trying to set up an eclipse development environment for ovirt-engine and am running into a stubborn problem with missing classes. I have followed the directions for importing the Maven projects as written here: http://ovirt.org/wiki/Building_Ovirt_Engine/IDE
The projects are able to be imported but I see lots of errors about missing imports such as:
import org.ovirt.engine.api.model.* import org.ovirt.engine.core.common.*
I should have a complete ovirt-engine source repository (I cloned the ovirt-engine git repo). Has anyone seen this problem before? Can you offer any suggestions to help me resolve it? Thanks!
-- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

On Mon, Feb 06, 2012 at 08:28:19PM +0200, Livnat Peer wrote:
On 06/02/12 19:18, Adam Litke wrote:
On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote:
Hi Adam!
Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-(
Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors.
Hi Adam,
This brings up a few questions:
1.) Which jdk should I use? I am currently using OpenJDK
/usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
you are using the right JDK.
2,) Does this need a Fedora/RH system to compile?
The engine works on Fedora, RHEL, Ubuntu Gentoo and should work on any other Linux based operating system (Java is platform agnostic).
3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems.
There should not be any local issues, let's try to figure out what the issues are.
The errors are probably not related to eclipse because you have compilation errors from the command line as well.
I would start by compiling the engine and api with no tests and no UI:
Run from the command line -
1. $ovirt_engine_home> mvn clean 2. $ovirt_engine_home> mvn install -DskipTests
What is the result of the above two?
Thanks Livnat! The mvn clean was successful. Here are the errors from the install step: [INFO] ------------------------------------------------------------------------ [INFO] Building Shared GWT code [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: auto-clean}] [INFO] [dependency:unpack {execution: copy}] [INFO] Configured Artifact: org.ovirt.engine.core:common:sources:3.0.0-0001:jar [INFO] Configured Artifact: org.ovirt.engine.core:compat:sources:3.0.0-0001:jar [INFO] Configured Artifact: org.ovirt.engine.core:searchbackend:sources:3.0.0-0001:jar [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/common/3.0.0-0001/common-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/compat/3.0.0-0001/compat-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/searchbackend/3.0.0-0001/searchbackend-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] skip non existing resourceDirectory /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/resources [INFO] [gwt:resources {execution: default}] [INFO] 750 source files copied from GWT module org.ovirt.engine.SharedGwt [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 749 source files to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/target/classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure Quota.java:[52,52] cannot find symbol symbol : variable QUOTA_NAME_SIZE location: class org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions Quota.java:[58,52] cannot find symbol symbol : variable QUOTA_DESCRIPTION_SIZE location: class org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 52 seconds [INFO] Finished at: Mon Feb 06 13:45:09 CST 2012 [INFO] Final Memory: 241M/575M [INFO] ------------------------------------------------------------------------ -- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center

On 06/02/12 21:47, Adam Litke wrote:
On Mon, Feb 06, 2012 at 08:28:19PM +0200, Livnat Peer wrote:
On 06/02/12 19:18, Adam Litke wrote:
On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote:
Hi Adam!
Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-(
Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors.
Hi Adam,
This brings up a few questions:
1.) Which jdk should I use? I am currently using OpenJDK
/usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
you are using the right JDK.
2,) Does this need a Fedora/RH system to compile?
The engine works on Fedora, RHEL, Ubuntu Gentoo and should work on any other Linux based operating system (Java is platform agnostic).
3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems.
There should not be any local issues, let's try to figure out what the issues are.
The errors are probably not related to eclipse because you have compilation errors from the command line as well.
I would start by compiling the engine and api with no tests and no UI:
Run from the command line -
1. $ovirt_engine_home> mvn clean 2. $ovirt_engine_home> mvn install -DskipTests
What is the result of the above two?
Thanks Livnat! The mvn clean was successful. Here are the errors from the install step:
1. do you have latest? when did you fetch last (I can fetch the same commit hash to make sure it compiles, I have latest and it compiles) 2. let try to compile the engine without the GWT stub - $ovirt_engine_home> cd backend/manager $ovirt_engine_home/backend/manager > mvn install -DskipTests What is the result of the above? BTW if you want online help I am on the ovirt IRC channel.
[INFO] ------------------------------------------------------------------------ [INFO] Building Shared GWT code [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: auto-clean}] [INFO] [dependency:unpack {execution: copy}] [INFO] Configured Artifact: org.ovirt.engine.core:common:sources:3.0.0-0001:jar [INFO] Configured Artifact: org.ovirt.engine.core:compat:sources:3.0.0-0001:jar [INFO] Configured Artifact: org.ovirt.engine.core:searchbackend:sources:3.0.0-0001:jar [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/common/3.0.0-0001/common-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/compat/3.0.0-0001/compat-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/searchbackend/3.0.0-0001/searchbackend-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] skip non existing resourceDirectory /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/resources [INFO] [gwt:resources {execution: default}] [INFO] 750 source files copied from GWT module org.ovirt.engine.SharedGwt [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 749 source files to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/target/classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure
Quota.java:[52,52] cannot find symbol symbol : variable QUOTA_NAME_SIZE location: class org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions
Quota.java:[58,52] cannot find symbol symbol : variable QUOTA_DESCRIPTION_SIZE location: class org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions
[INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 52 seconds [INFO] Finished at: Mon Feb 06 13:45:09 CST 2012 [INFO] Final Memory: 241M/575M [INFO] ------------------------------------------------------------------------

On Mon, Feb 06, 2012 at 10:24:36PM +0200, Livnat Peer wrote:
On 06/02/12 21:47, Adam Litke wrote:
On Mon, Feb 06, 2012 at 08:28:19PM +0200, Livnat Peer wrote:
On 06/02/12 19:18, Adam Litke wrote:
On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote:
Hi Adam!
Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-(
Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors.
Hi Adam,
This brings up a few questions:
1.) Which jdk should I use? I am currently using OpenJDK
/usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
you are using the right JDK.
2,) Does this need a Fedora/RH system to compile?
The engine works on Fedora, RHEL, Ubuntu Gentoo and should work on any other Linux based operating system (Java is platform agnostic).
3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems.
There should not be any local issues, let's try to figure out what the issues are.
The errors are probably not related to eclipse because you have compilation errors from the command line as well.
I would start by compiling the engine and api with no tests and no UI:
Run from the command line -
1. $ovirt_engine_home> mvn clean 2. $ovirt_engine_home> mvn install -DskipTests
What is the result of the above two?
Thanks Livnat! The mvn clean was successful. Here are the errors from the install step:
1. do you have latest? when did you fetch last (I can fetch the same commit hash to make sure it compiles, I have latest and it compiles)
Ok. I guess I had the 3.0 branch checked out when I was trying to fix the compile. By moving back to master, I was able to build from the command line successfully. However, I still get lots of errors in eclipse. I will include a few below: Action cannot be resolved to a type ActionResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 34 Java Problem Actions cannot be resolved to a type ActionsBuilder.java /restapi-definition/src/main/java/org/ovirt/engine/api/model line 35 Java Problem BaseDevice cannot be resolved to a type DeviceResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 28 Java Problem BaseDevices cannot be resolved to a type DevicesResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 33 Java Problem BaseResource cannot be resolved to a type RemovableStorageDomainContentsResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 28 Java Problem BaseResources cannot be resolved to a type RemovableStorageDomainContentsResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 28 Java Problem Bound mismatch: The type C is not a valid substitute for the bounded parameter <C extends BaseDevices> of the type ReadOnlyDevicesResource<D,C> DevicesResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 34 Java Problem Bound mismatch: The type D is not a valid substitute for the bounded parameter <D extends BaseDevice> of the type DeviceResource<D> DevicesResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 52 Java Problem Bound mismatch: The type R is not a valid substitute for the bounded parameter <R extends BaseResource> of the type StorageDomainContentResource<R> StorageDomainContentsResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 36 Java Problem Capabilities cannot be resolved to a type CapabilitiesResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 33 Java Problem CdRom cannot be resolved to a type TemplateResource.java /restapi-definition/src/main/java/org/ovirt/engine/api/resource line 51 Java Problem -- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center

Hi, I went through setting Eclipse IDE for engine development recently. After getting the maven build to work, and after importing all projects into eclipse, following setup is required to get rid of all compilation errors reported by eclipse: 1) at restapi-definition -> project -> properties -> java build path -> source -> add source folder -> target/generated sources/xjc 2) at webadmin -> project -> properties -> java build path -> source -> add source folder-> target/generated sources/annotations,gwt,test-annotations 3) To get rid of the error "The method setCharacterEncoding(String) is undefined for the type HttpServletResponse" in source frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/WebadminDynamicHostingServlet.java, I modified pom.xml at root level to change servlet API version from 2.3 to 2.4 as the concerned API is introduced in 2.4 <javax.ejb.api.version>3.0</javax.ejb.api.version> - <javax.servlet.api.version>2.3</javax.servlet.api.version> + <javax.servlet.api.version>2.4</javax.servlet.api.version> <jcraft.jsch.version>0.1.42</jcraft.jsch.version> 4) Make sure that you import the engine code formatter into eclipse _before_ starting development. Window -> Preferences -> Java -> Code Style -> Formatter -> Import -> <ovirt-src-root>/config/engine-code-format.xml 5) Above mentioned formatted doesn't work in comments. This can be resolved by adding "Remove trailing whitespace" in "Save actions" as follows: Window -> Preferences -> Java -> Editor -> Save Actions -> Additional Actions -> Configure -> Code Organizing -> Remove trailing whitespace -> All lines 6) For some reason, editing a properties file in eclipse results in a lot of "diff" in git, making it difficult to review the code change. So I'm resorting to editing properties file in a text editor outside eclipse for the time being. I suspect this may not happen on all machines. Regards, Shireesh ----- Original Message ----- From: "Livnat Peer" <lpeer@redhat.com> To: "Adam Litke" <agl@us.ibm.com> Cc: engine-devel@ovirt.org Sent: Tuesday, February 7, 2012 1:54:36 AM Subject: Re: [Engine-devel] Eclipse IDE setup On 06/02/12 21:47, Adam Litke wrote:
On Mon, Feb 06, 2012 at 08:28:19PM +0200, Livnat Peer wrote:
On 06/02/12 19:18, Adam Litke wrote:
On Mon, Feb 06, 2012 at 10:58:13AM -0500, Laszlo Hornyak wrote:
Hi Adam!
Please check if workspace maven resolution is enabled, and run a maven build with install. If it is still broken, then there must be a bad dependency in the pom.xml-s... it happens :-(
Thanks for your suggestions. Maven resolution is enabled. Then I tried to build on the command line using mvn directly but got the same errors as in eclipse. Next, I tried to checkout out the 3.0 branch (assuming that the build should be more stable) and I got a different set of compilation errors.
Hi Adam,
This brings up a few questions:
1.) Which jdk should I use? I am currently using OpenJDK
/usr/lib/jvm/java-1.6.0-openjdk/bin/java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.1) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
you are using the right JDK.
2,) Does this need a Fedora/RH system to compile?
The engine works on Fedora, RHEL, Ubuntu Gentoo and should work on any other Linux based operating system (Java is platform agnostic).
3.) My guess is that others are able to compile oVirt even if there are bad dependencies in the pom.xml files. Otherwise they would already be fixed. How do others fix the dependencies on their local systems.
There should not be any local issues, let's try to figure out what the issues are.
The errors are probably not related to eclipse because you have compilation errors from the command line as well.
I would start by compiling the engine and api with no tests and no UI:
Run from the command line -
1. $ovirt_engine_home> mvn clean 2. $ovirt_engine_home> mvn install -DskipTests
What is the result of the above two?
Thanks Livnat! The mvn clean was successful. Here are the errors from the install step:
1. do you have latest? when did you fetch last (I can fetch the same commit hash to make sure it compiles, I have latest and it compiles) 2. let try to compile the engine without the GWT stub - $ovirt_engine_home> cd backend/manager $ovirt_engine_home/backend/manager > mvn install -DskipTests What is the result of the above? BTW if you want online help I am on the ovirt IRC channel.
[INFO] ------------------------------------------------------------------------ [INFO] Building Shared GWT code [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: auto-clean}] [INFO] [dependency:unpack {execution: copy}] [INFO] Configured Artifact: org.ovirt.engine.core:common:sources:3.0.0-0001:jar [INFO] Configured Artifact: org.ovirt.engine.core:compat:sources:3.0.0-0001:jar [INFO] Configured Artifact: org.ovirt.engine.core:searchbackend:sources:3.0.0-0001:jar [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/common/3.0.0-0001/common-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/compat/3.0.0-0001/compat-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] Unpacking /home/aglitke/.m2/repository/org/ovirt/engine/core/searchbackend/3.0.0-0001/searchbackend-3.0.0-0001-sources.jar to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/java with includes null and excludes:null [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] skip non existing resourceDirectory /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/src/main/resources [INFO] [gwt:resources {execution: default}] [INFO] 750 source files copied from GWT module org.ovirt.engine.SharedGwt [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 749 source files to /home/aglitke/src/ovirt-engine/frontend/webadmin/modules/sharedgwt/target/classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure
Quota.java:[52,52] cannot find symbol symbol : variable QUOTA_NAME_SIZE location: class org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions
Quota.java:[58,52] cannot find symbol symbol : variable QUOTA_DESCRIPTION_SIZE location: class org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions
[INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 52 seconds [INFO] Finished at: Mon Feb 06 13:45:09 CST 2012 [INFO] Final Memory: 241M/575M [INFO] ------------------------------------------------------------------------
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

On 02/07/2012 04:26 PM, Shireesh Anjal wrote:
Hi,
I went through setting Eclipse IDE for engine development recently.
After getting the maven build to work, and after importing all projects into eclipse, following setup is required to get rid of all compilation errors reported by eclipse:
1) at restapi-definition -> project -> properties -> java build path -> source -> add source folder -> target/generated sources/xjc 2) at webadmin -> project -> properties -> java build path -> source -> add source folder-> target/generated sources/annotations,gwt,test-annotations
3) To get rid of the error "The method setCharacterEncoding(String) is undefined for the type HttpServletResponse" in source frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/WebadminDynamicHostingServlet.java, I modified pom.xml at root level to change servlet API version from 2.3 to 2.4 as the concerned API is introduced in 2.4
<javax.ejb.api.version>3.0</javax.ejb.api.version> -<javax.servlet.api.version>2.3</javax.servlet.api.version> +<javax.servlet.api.version>2.4</javax.servlet.api.version> <jcraft.jsch.version>0.1.42</jcraft.jsch.version>
4) Make sure that you import the engine code formatter into eclipse _before_ starting development.
Window -> Preferences -> Java -> Code Style -> Formatter -> Import -> <ovirt-src-root>/config/engine-code-format.xml
5) Above mentioned formatted doesn't work in comments. This can be resolved by adding "Remove trailing whitespace" in "Save actions" as follows:
Window -> Preferences -> Java -> Editor -> Save Actions -> Additional Actions -> Configure -> Code Organizing -> Remove trailing whitespace -> All lines
6) For some reason, editing a properties file in eclipse results in a lot of "diff" in git, making it difficult to review the code change. So I'm resorting to editing properties file in a text editor outside eclipse for the time being. I suspect this may not happen on all machines.
Shireesh - great points - care to update the wiki? Also - I'd like to hope we can clean the pom files so #1-#3 would not be needed manually?

On 02/08/2012 01:02 AM, Itamar Heim wrote:
On 02/07/2012 04:26 PM, Shireesh Anjal wrote:
Hi,
I went through setting Eclipse IDE for engine development recently.
After getting the maven build to work, and after importing all projects into eclipse, following setup is required to get rid of all compilation errors reported by eclipse:
1) at restapi-definition -> project -> properties -> java build path -> source -> add source folder -> target/generated sources/xjc 2) at webadmin -> project -> properties -> java build path -> source -> add source folder-> target/generated sources/annotations,gwt,test-annotations
3) To get rid of the error "The method setCharacterEncoding(String) is undefined for the type HttpServletResponse" in source frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/WebadminDynamicHostingServlet.java, I modified pom.xml at root level to change servlet API version from 2.3 to 2.4 as the concerned API is introduced in 2.4
<javax.ejb.api.version>3.0</javax.ejb.api.version> -<javax.servlet.api.version>2.3</javax.servlet.api.version> +<javax.servlet.api.version>2.4</javax.servlet.api.version> <jcraft.jsch.version>0.1.42</jcraft.jsch.version>
4) Make sure that you import the engine code formatter into eclipse _before_ starting development.
Window -> Preferences -> Java -> Code Style -> Formatter -> Import -> <ovirt-src-root>/config/engine-code-format.xml
5) Above mentioned formatted doesn't work in comments. This can be resolved by adding "Remove trailing whitespace" in "Save actions" as follows:
Window -> Preferences -> Java -> Editor -> Save Actions -> Additional Actions -> Configure -> Code Organizing -> Remove trailing whitespace -> All lines I would like to add that our maven checkstyle plugin also fails build on unused import. Make sure you also got it covered. I personally did not set this at my IDE, but I rather handle this issue manually.
6) For some reason, editing a properties file in eclipse results in a lot of "diff" in git, making it difficult to review the code change. So I'm resorting to editing properties file in a text editor outside eclipse for the time being. I suspect this may not happen on all machines.
Shireesh - great points - care to update the wiki? Also - I'd like to hope we can clean the pom files so #1-#3 would not be needed manually? _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

On Wednesday 08 February 2012 04:32 AM, Itamar Heim wrote:
On 02/07/2012 04:26 PM, Shireesh Anjal wrote:
Hi,
I went through setting Eclipse IDE for engine development recently.
After getting the maven build to work, and after importing all projects into eclipse, following setup is required to get rid of all compilation errors reported by eclipse:
1) at restapi-definition -> project -> properties -> java build path -> source -> add source folder -> target/generated sources/xjc 2) at webadmin -> project -> properties -> java build path -> source -> add source folder-> target/generated sources/annotations,gwt,test-annotations
3) To get rid of the error "The method setCharacterEncoding(String) is undefined for the type HttpServletResponse" in source frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/WebadminDynamicHostingServlet.java, I modified pom.xml at root level to change servlet API version from 2.3 to 2.4 as the concerned API is introduced in 2.4
<javax.ejb.api.version>3.0</javax.ejb.api.version> -<javax.servlet.api.version>2.3</javax.servlet.api.version> +<javax.servlet.api.version>2.4</javax.servlet.api.version> <jcraft.jsch.version>0.1.42</jcraft.jsch.version>
4) Make sure that you import the engine code formatter into eclipse _before_ starting development.
Window -> Preferences -> Java -> Code Style -> Formatter -> Import -> <ovirt-src-root>/config/engine-code-format.xml
5) Above mentioned formatted doesn't work in comments. This can be resolved by adding "Remove trailing whitespace" in "Save actions" as follows:
Window -> Preferences -> Java -> Editor -> Save Actions -> Additional Actions -> Configure -> Code Organizing -> Remove trailing whitespace -> All lines
6) For some reason, editing a properties file in eclipse results in a lot of "diff" in git, making it difficult to review the code change. So I'm resorting to editing properties file in a text editor outside eclipse for the time being. I suspect this may not happen on all machines.
Shireesh - great points - care to update the wiki?
Have added the above points to an existing wiki page: http://www.ovirt.org/wiki/Building_Ovirt_Engine/IDE
Also - I'd like to hope we can clean the pom files so #1-#3 would not be needed manually? -- Regards, Shireesh

On Mon, Feb 06, 2012 at 10:24:36PM +0200, Livnat Peer wrote:
BTW if you want online help I am on the ovirt IRC channel.
Thanks. I might need to take you up on your offer. Even after following the suggestions in this thread I still have around 400 unsolved errors across several different projects. What is your IRC nick? I wasn't able to recognize you on #ovirt. -- Adam Litke <agl@us.ibm.com> IBM Linux Technology Center

On 07/02/12 18:29, Adam Litke wrote:
On Mon, Feb 06, 2012 at 10:24:36PM +0200, Livnat Peer wrote:
BTW if you want online help I am on the ovirt IRC channel.
Thanks. I might need to take you up on your offer. Even after following the suggestions in this thread I still have around 400 unsolved errors across several different projects. What is your IRC nick? I wasn't able to recognize you on #ovirt.
lpeer, I'll be happy to help, if I'm not online you can try: - mkolesni - lhornyak Or in Westford (maybe the time zone will work better for you) we have: - jumper45 Livnat

Hi all I setup JRebel as wiki suggests to reduce redeployment time. When I started up JBoss, it's generally perfect except some errors ========== 2012-02-09 19:55:51,032 INFO [stdout] (MSC service thread 1-1) JRebel: Class 'org.jboss.as.ee.component.ViewConfiguration' could not be processed: 2012-02-09 19:55:51,033 ERROR [stderr] (MSC service thread 1-1) org.zeroturnaround.bundled.javassist.NotFoundException: addViewPostConstructInterceptor(..) is not found in org.jboss.as.ee.component.ViewConfiguration 2012-02-09 19:55:51,034 ERROR [stderr] (MSC service thread 1-1) at org.zeroturnaround.bundled.javassist.CtClassType.getDeclaredMethod(JRebel:1196) 2012-02-09 19:55:51,034 ERROR [stderr] (MSC service thread 1-1) at org.zeroturnaround.javarebel.jboss7.cbp.ViewConfigurationCBP.process(ViewConfigurationCBP.java:59 ========== Is anyone with same situation , or it is a minor exception I can ignore? Log is attached if you want it. thanks Joseph

Hi! I am not sure, I remember I have seen this exception in my installation and still it did not break any functionality, code replace worked fine. Now it is working fine without the exception... Laszlo ----- Original Message -----
From: jiaoyang@opzoon.com To: "Laszlo Hornyak" <lhornyak@redhat.com>, "engine-devel" <engine-devel@ovirt.org> Sent: Thursday, February 9, 2012 1:20:12 PM Subject: Exception with JRebel
Hi all
I setup JRebel as wiki suggests to reduce redeployment time. When I started up JBoss, it's generally perfect except some errors
========== 2012-02-09 19:55:51,032 INFO [stdout] (MSC service thread 1-1) JRebel: Class 'org.jboss.as.ee.component.ViewConfiguration' could not be processed: 2012-02-09 19:55:51,033 ERROR [stderr] (MSC service thread 1-1) org.zeroturnaround.bundled.javassist.NotFoundException: addViewPostConstructInterceptor(..) is not found in org.jboss.as.ee.component.ViewConfiguration 2012-02-09 19:55:51,034 ERROR [stderr] (MSC service thread 1-1) at org.zeroturnaround.bundled.javassist.CtClassType.getDeclaredMethod(JRebel:1196) 2012-02-09 19:55:51,034 ERROR [stderr] (MSC service thread 1-1) at org.zeroturnaround.javarebel.jboss7.cbp.ViewConfigurationCBP.process(ViewConfigurationCBP.java:59 ==========
Is anyone with same situation , or it is a minor exception I can ignore? Log is attached if you want it.
thanks Joseph
participants (8)
-
Adam Litke
-
Itamar Heim
-
jiaoyang@opzoon.com
-
Jon Choate
-
Laszlo Hornyak
-
Livnat Peer
-
Shireesh Anjal
-
Yair Zaslavsky