Changes for page Debugging WOLips

Last modified by Pascal Robert on 2012/02/11 05:22

From version 66.1
edited by mark_ritchie
on 2009/09/14 02:05
Change comment: There is no comment for this version
To version 67.1
edited by Pascal Robert
on 2011/09/12 01:18
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.mark_ritchie
1 +XWiki.probert
Content
... ... @@ -1,10 +1,10 @@
1 -= Debugging WOLips as the master does! =
1 += Debugging WOLips as the master does =
2 2  
3 -These instructions is intended for the developer who wants to compile and run WOLips source for the purpose of debugging or other exploration. Thanks very much to Mike Schrag for the guidance to get this setup and working!
3 +These instructions is intended for the developer who wants to compile and run WOLips source for the purpose of debugging or other exploration. Thanks very much to Mike Schrag for the guidance to get this setup and working
4 4  
5 5  == Overview of what's going on ==
6 6  
7 -We're going to check out the latest source for WOLips, build it and arrange for Eclipse to launch is a debug mode to test it out. It's very handy that Eclipse has a built in ability to launch itself in debug mode and load the local versions of the plugins. If you read the old and out dated instructions floating about that talk about building an entire release and installing them into a new copy of Eclipse then you're going to like this method a whole lot better! ;-)
7 +We're going to check out the latest source for WOLips, build it and arrange for Eclipse to launch is a debug mode to test it out. It's very handy that Eclipse has a built in ability to launch itself in debug mode and load the local versions of the plugins. If you read the old and out dated instructions floating about that talk about building an entire release and installing them into a new copy of Eclipse then you're going to like this method a whole lot better ;-)
8 8  
9 9  == The setup ==
10 10  
... ... @@ -16,23 +16,27 @@
16 16  
17 17  {{panel title="Snow Leopard Update" bgColor="#FFFFCE"}}
18 18  
19 -I gave this a go on Snow Leopard and it worked fine with one little detail which I've noted at the end of this page.
19 +I gave this a go on Snow Leopard and it worked ok however there were a few problems which I've detailed near the end of this document.
20 20  Here's the setup I was using:
21 -- Mac OS X 10.6.1
21 +- Mac OS X 10.6.2
22 +- WebObjects 5.4.3
22 22  - Java 1.6.0_15
23 -- Eclipse 3.4.2 (eclipse-SDK-3.4.2-macosx-carbon.tar.gz)
24 +- Eclipse 3.4.2 Build id: M20090211-1700 (eclipse-SDK-3.4.2-macosx-carbon.tar.gz)
25 +- woproject svn repository version 6031
26 +- Wonder svn repository version 10655
27 +YMMV\!
24 24  
25 25  {{/panel}}
26 26  
27 27  == Checking out the source code ==
28 28  
29 -**A note for the impatient - don't try to checkout the source right into Eclipse. The files aren't structured in a way that allows this to work. I know because I tried to do it that way first!** ;-)
33 +**A note for the impatient - don't try to checkout the source right into Eclipse. The files aren't structured in a way that allows this to work. I know because I tried to do it that way first** ;-)
30 30  
31 31  === Check out the source code into a local folder ===
32 32  
33 33  You're checking out a local copy of the code from the source repository. Next, we're going to selectively import (but **not** copy) parts of that code into Eclipse. I'm using command line subversion to check out the lastest version however feel free to use a different tool or different version, as you like.
34 34  
35 -svn co https:~/~/svn.objectstyle.org/repos/woproject/trunk/woproject ,,/woproject,,
39 +git clone [[git://github.com/wolips/wolips.git]] /woproject
36 36  
37 37  Note that I've checked out the source code into my home folder. It doesn't matter where you put the source code as long as you can find it in the steps below.
38 38  
... ... @@ -41,8 +41,8 @@
41 41  Launch a clean copy of Eclipse with no plugings installed. Strictly speaking, probably not necessary however these are the steps which I took.
42 42  
43 43  Create a new Workspace
44 -I chose ,,/WOLipsDebugging
45 -[[image:Workspace.png]],,
48 +I chose /WOLipsDebugging
49 +[[image:Workspace.png]]
46 46  
47 47  === Import woenvironment ===
48 48  
... ... @@ -59,13 +59,13 @@
59 59  [[image:woenvironmentProject.png]]
60 60  Click Finish.
61 61  
62 -Once Eclipse has finished building the project, there should be no errors! If that's not the case, then you need to back up and make sure that you've followed all the steps above.
66 +Once Eclipse has finished building the project, there should be no errors If that's not the case, then you need to back up and make sure that you've followed all the steps above.
63 63  
64 64  === Import wolips projects into your workspace ===
65 65  
66 -Repeat the steps above and import all the wolips projects except for 3!
67 -**EntityModler, eomodeldoc and org.objectstyle.wolips.eomodeler.factories
68 -Are special projects which require special setup and caffination before touching.**
70 +Repeat the steps above and import all the wolips projects except for 3
71 +EntityModler, eomodeldoc and org.objectstyle.wolips.eomodeler.factories
72 +are special projects which require special setup and caffination before touching.
69 69  
70 70  The import of wolips should look like this:
71 71  [[image:wolipsImport.png]]
... ... @@ -116,8 +116,20 @@
116 116  * org.objectstyle.wolips.groovy.ui
117 117  * org.objectstyle.wolips.jprofiler.launching
118 118  
119 -== The run configuration setup ==
123 +=== Error message: Libraries not found for JavaEOAccess and other WebObjects libraries ===
120 120  
125 +A couple projects have been committed to the repository with references to WebObjects libraries in /Library/WebObjects/lib. You'll need to update these to the correct location on your machine. If you've done nothing special to your WebObjects environment then this should be something like: /System/Library/Frameworks
126 +If you've done something else then you'll need to change the library locations (or perhaps update your WOLips properties file.)
127 +
128 +=== Error message: Cannot find artifact for parent POM... ===
129 +
130 +When building woenvironment, you might hit this error:
131 +Cannot find artifact for parent POM: org.objectstyle.woproject:woproject-all-parent::2.1 for project org.objectstyle.woproject.ant:woenvironment:jar:2.1-SNAPSHOT at /Users/...
132 +
133 +The simple solution is delete the pom.xml file. Full details are here: [[http://wiki.objectstyle.org/confluence/display/WOL/mail/6259075]]
134 +
135 +== The configuration setup ==
136 +
121 121  At this point, you should have a long list of packages which should all be compiling.
122 122  If that's not the case, please document additional steps here, making special note of your setup.
123 123  
... ... @@ -140,12 +140,12 @@
140 140  
141 141  Click the Debug button in the debug configuration window to launch the test version.
142 142  This will be a clean version of Eclipse with the workspace which you set and any other settings.
143 -By default, all of the plugins are loaded and ready for testing!
144 -And now, you should be running inside the debug version of Eclipse with all the wolips bits to play with!
159 +By default, all of the plugins are loaded and ready for testing
160 +And now, you should be running inside the debug version of Eclipse with all the wolips bits to play with
145 145  
146 146  == Snow Leopard Update ==
147 147  
148 -I was running the carbon version of Eclipse 3.4.2 on Snow Leopard.
164 +I was running the carbon version of Eclipse 3.4.2 Build id: M20090211-1700 on Snow Leopard 10.6.2
149 149  Up to this point, I was following the instructions above however when I tried to launch Eclipse, I got this error:
150 150  
151 151  {{code value="java"}}
... ... @@ -157,11 +157,20 @@
157 157  
158 158  {{/code}}
159 159  
160 -This is a known problem and is documented <a href="http:~/~/www.eclipse.org/swt/faq.php#cocoa32launch">here</a>
161 -The fix is to add the --d32 parameter to the launch arguments.--
176 +This is a known problem and is documented here: [[http://www.eclipse.org/swt/faq.php#cocoa32launch]]
177 +The fix is to add the d32 parameter to the launch arguments.
162 162  
163 -Original: --os $target.os} --ws $target.ws} --arch $target.arch} --nl $target.nl}
164 -Updated: --os $target.os} --ws $target.ws} --arch $target.arch} --nl $target.nl} --d32--
179 +Original: os $target.os} ws $target.ws} arch $target.arch} nl $target.nl}
180 +Updated: os $target.os} ws $target.ws} arch $target.arch} nl $target.nl} d32
165 165  
182 +A second problem which I encountered was running out of memory while running test version of Eclipse
183 +I had to add the VM argument "-Xmx2G" and then 'Run' as opposed to 'Debug' the app. For the most part, that worked.
184 +
166 166  My final setup looked like this:
167 -[[image:32Bit_jvm_arguments.png]]
186 +[[image:32Bit_jvm_2GB_mem.png]]
187 +
188 +== There was more than one SQL reverse engineer factory defined. ==
189 +
190 +[[image:MoreThenOneReverseEngineeringFactory.png]]
191 +This exception occurs when you've forgotten to close the org.objectstyle.wolips.eomodeler.factories project.
192 +The fix is to close the project. Thanks to Mike Schrag for putting me on the right path when I was at my wits end with this damn problem.