Changes for page WO 5.4 Getting Started

Last modified by D Tim Cummings on 2013/06/14 16:27

From version 79.1
edited by Timothy Worman
on 2013/06/14 16:27
Change comment: Migrated to Confluence 5.3
To version 57.1
edited by Pascal Robert
on 2007/11/29 13:45
Change comment: There is no comment for this version

Summary

Details

Page properties
Parent
... ... @@ -1,1 +1,0 @@
1 -Deprecated
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.tworman
1 +XWiki.probert
Tags
... ... @@ -1,1 +1,0 @@
1 -devtools|deployment
Content
... ... @@ -1,180 +1,52 @@
1 -{{warning}}
2 -This is deprecated information!
3 -{{/warning}}
1 += Running the examples =
4 4  
3 +Apple has converted their WebObjects examples in the Eclipse format, but no documentation is provided on how to import them into Eclipse.  The examples are in ///Developer/Examples/JavaWebObjects//.
5 5  
5 +The first step is: install Eclipse and WOLips :-)  
6 6  
7 -{{toc maxLevel="1"/}}
7 +Some examples needs Derby, an embedded Java database (OpenBase is not included with WO anymore). To install the databases, you have to do:
8 8  
9 -= ProjectBuilder and XCode =
10 -
11 -ProjectBuilder and Xcode are no longer supported IDEs for WebObjects development or deployment. While legacy projects may still use it there is little, if any, support available for it. Existing projects (except Objective-C WebObjects projects, of course) should be [[migrated to WOLips>>doc:WOL.XcodeMigration]]. It isn't as hard as you might think, and WOLips is a much more powerful WebObjects IDE.
12 -
13 -= Installing WebObjects and WOLips =
14 -
15 -1. (((
16 -====== Download Golipse ======
17 -
18 -[[Golipse>>url:http://wocommunity.org/documents/tools/Golipse.app_build_22.zip||shape="rect"]] ([[source>>url:https://github.com/wocommunity/Golipse||shape="rect"]]) will fetch the needed version of Eclipse, WOLips and other tools for WebObjects development.
19 -)))
20 -
21 -{{note title="32-bit computers"}}
22 -By default Golipse will download and install a 64-bit version of Eclipse. If you have an older 32-bit machine you can specify the download URL for the Eclipse package in 'Golipse > Preferences'. The latest 32-bit package is "http:~/~/ftp.osuosl.org/pub/eclipse/eclipse/downloads/drops/R-3.6.2-201102101200/eclipse-SDK-3.6.2-macosx-cocoa.tar.gz"
23 -{{/note}}
24 -
25 -1. (((
26 -====== Install the WebObjects ======
27 -
28 -The best way to install the WebObjects frameworks is according to [[these instructions>>doc:WOL.Using WOLips With Multiple Versions of WebObjects]].
29 -)))
30 -1. (((
31 -====== Start Eclipse and switch to the WOLips perspective. ======
32 -
33 -* Under the //Window// menu, select //Open Perspective > Other...//.
34 -[[image:attach:PerpectiveMenu.png]]
35 -*
36 -
37 -====== Select //WOLips// and click //Ok//. ======
38 -
39 -[[image:attach:PerspectiveChoices.png]]
40 -
41 -{{note title="WOLips Perspective"}}
42 -If you don't switch to the WOLips perspective, you won't be able to create new WebObjects projects.
43 -{{/note}}
44 -)))
45 -
46 -{{info title="Xcode & WebObjects"}}
47 -Xcode is no longer the supported IDE for WebObjects development or deployment. However, downloading it and installing it will install tools debugging tools that you might find useful.
48 -
49 -* Apple Developer Site (Free): [[http:~~/~~/developer.apple.com/xcode/>>url:http://developer.apple.com/xcode/||shape="rect"]]
50 -* Mac OS X App Store (Free): [[http:~~/~~/itunes.apple.com/us/app/xcode/id448457090>>url:http://itunes.apple.com/us/app/xcode/id448457090||shape="rect"]]
51 -{{/info}}
52 -
53 -
54 -
55 -{{id name="javamonitor"/}}
56 -
57 -= Running Monitor and wotaskd on Mac OS X =
58 -
59 -Monitor and wotaskd are installed, but the launchd scripts to start them are not installed. You can grab them from a 10.5 Server installation, or follow those instructions.
60 -
61 -Make sure //Web Sharing// is enabled in the //Sharing// panel in //System Preferences// (note: 10.5 comes with Apache 2.2 as the default).
62 -
63 -Edit ///etc/apache2/httpd.conf// (if you did a fresh install, you may already have these - search httpd.conf first)
64 -
65 -Search for rewrite_module, and above it, add this line:
66 -
67 67  {{code}}
68 -LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
69 69  
70 -{{/code}}
11 +cd /Developer/Examples/JavaWebObjects/
12 +sudo sh installDatabases.sh <yourusername>
71 71  
72 -Go to the very end and add:
73 -
74 -{{code}}
75 -Include /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf
76 -
77 77  {{/code}}
78 78  
79 -Search for "Directory /" and comment out the Order and Deny lines:
16 +Now, you can import the examples into Eclipse. Start Eclipse, select //File// > //Import//,
80 80  
81 -{{code}}
82 -<Directory />
83 - Options FollowSymLinks
84 - AllowOverride None
85 - #Order deny,allow
86 - #Deny from all
87 -</Directory>
18 +[[image:ImportMenu.png]]
88 88  
89 -{{/code}}
20 +and select //General// > //Existing Projects// into Workplace.
90 90  
91 -Restart apache
22 +[[image:ImportGeneral.png]]
92 92  
93 -{{code}}
94 -sudo apachectl graceful
24 +On the next page, select //Select root directory// and browse your disk to ///Developer/Examples/JavaWebObjects//. You should see a list of projects to import.&nbsp; Deselect the second //javaeoutil// project, or else you won't be able to import the projects.
95 95  
96 -{{/code}}
26 +[[image:ImportProjectsList.png]]
97 97  
98 -If you run //ps auxw | grep httpd// you should see apache now running
28 +After the importation is done, you should see the projects in the WO Package Explorer. If you see the projects in Package Explorer (without "WO" in the name), that means that you are using the Java perpective instead of the WOLips perpective.&nbsp; Switch the perpective to WOLips.
99 99  
100 -Create ///Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist// with:
101 - (for OSX 10.5 make sure the permissions of this file are 644 system/wheel/everyone otherwise launchctl will throw a "dubious permissions" error when you try to load the plist with the commands that follow)
30 +[[image:PackageExplorer.png]]
102 102  
103 -{{code}}
104 -<?xml version="1.0" encoding="UTF-8"?>
105 -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
106 -<plist version="1.0">
107 -<dict>
108 - <key>Disabled</key>
109 - <false/>
110 - <key>GroupName</key>
111 - <string>appserverusr</string>
112 - <key>Label</key>
113 - <string>com.apple.webobjects.wotaskd</string>
114 - <key>OnDemand</key>
115 - <false/>
116 - <key>Program</key>
117 - <string>/System/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd</string>
118 - <key>ProgramArguments</key>
119 - <array>
120 - <string>wotaskd</string>
121 - <string>-WOPort</string>
122 - <string>1085</string>
123 - </array>
124 - <key>ServiceIPC</key>
125 - <false/>
126 - <key>UserName</key>
127 - <string>appserver</string>
128 -</dict>
129 -</plist>
32 +Now, you need to fix the examples, because the build path is pointing to the source projects of the WO frameworks, source that nobody outside Apple has access to :-)For each project, right-click on each project, select //Build Path// > //Configure Build Path...//
130 130  
131 -{{/code}}
34 +[[image:BuildPathMenu.png]]
132 132  
133 -Create ///Library/LaunchDaemons/com.apple.webobjects.womonitor.plist// with:
134 - (for OSX 10.5 make sure the permissions of this file are 644 system/wheel/everyone otherwise launchctl will throw a "dubious permissions" error when you try to load the plist with the commands that follow)
36 +Click on the //Projects// tab, select the references to the WO frameworks that have the Warning icon and click //Remove//.
135 135  
136 -{{code}}
137 -<?xml version="1.0" encoding="UTF-8"?>
138 -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
139 -<plist version="1.0">
140 -<dict>
141 - <key>Disabled</key>
142 - <false/>
143 - <key>GroupName</key>
144 - <string>appserverusr</string>
145 - <key>Label</key>
146 - <string>com.apple.webobjects.womonitor</string>
147 - <key>OnDemand</key>
148 - <false/>
149 - <key>Program</key>
150 - <string>/System/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor</string>
151 - <key>ProgramArguments</key>
152 - <array>
153 - <string>JavaMonitor</string>
154 - <string>-WOPort</string>
155 - <string>56789</string>
156 - </array>
157 - <key>ServiceIPC</key>
158 - <false/>
159 - <key>UserName</key>
160 - <string>appserver</string>
161 -</dict>
162 -</plist>
38 +[[image:ConfigureBuildPath.png]]
163 163  
164 -{{/code}}
40 +Click on the //Libraries// tab, click the //Add Library// button.&nbsp; Select //WebObjects Frameworks// and click //Next//.
165 165  
166 -Start the launchd daemons :
167 - (you may need to sudo here)
42 +[[image:AddLibrary.png]]
168 168  
169 -{{code}}
170 -launchctl load /Library/LaunchDaemons/com.apple.webobjects.wotaskd.plist
171 -launchctl load /Library/LaunchDaemons/com.apple.webobjects.womonitor.plist
44 +Click //System//, open the triangle next to //System// and make sure that //JavaEOAccess//, //JavaEOControl//, //JavaFoundation//, //JavaWebObjects//, //JavaWOExtensions// and //JavaXML// are selected. For //SchoolToolsClient//, you also need to add //JavaWebServicesSupport// and //JavaWebServicesClient// to the build path. For the //SchoolToolsServer//, you need to add //JavaWebServicesSupport//.
172 172  
173 -{{/code}}
46 +After you corrected the build path on a project, the project will rebuild itself and the errors shoud dissapear.
174 174  
175 -If you run "ps auxw | grep java" you should see wotaskd and java monitor now running. You should be able to connect to Monitor by this URL:
48 +//JavaBusinessLogic// and //RelatedLinks// requires Apache Derby, but the path to Derby's JAR is wrong. Remove the JAR from the build path, click //Add External JARs...//, browse your disk up to ///Developer/Examples/JavaWebObjects/Databases/db-derby-10.2.2.0-bin/lib// and select //derby.jar//.&nbsp; The build path should look like this:
176 176  
177 -{{code}}
178 -http://localhost:56789
50 +[[image:GoodDerbyPath.png]]
179 179  
180 -{{/code}}
52 +VoilĂ &nbsp; You finally can run the examples.&nbsp;
AddLibrary.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -34.2 KB
Content
BuildPathMenu.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -94.7 KB
Content
ConfigureBuildPath.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -55.4 KB
Content
GoodDerbyPath.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -46.0 KB
Content
ImportGeneral.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -29.0 KB
Content
ImportMenu.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -65.7 KB
Content
ImportProjectsList.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -57.1 KB
Content
PackageExplorer.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -27.6 KB
Content
PerpectiveMenu.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -68.5 KB
Content
PerspectiveChoices.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -31.1 KB
Content
WOSystemLibs.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -31.9 KB
Content
woswitch
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -2.5 KB
Content
... ... @@ -1,77 +1,0 @@
1 -#!/bin/sh
2 -
3 -WO54PATH=${NEXT_ROOT}
4 -WO53PATH=/Developer/WebObjects53
5 -TMPDIR=/tmp
6 -WOLIPSPROPS=~/Library/Application\ Support/WOLips/wolips.properties
7 -WOBUILDPROPS=~/Library/wobuild.properties
8 -
9 -if [ $# -ne 1 -o "$1" = "-h" ] ; then
10 - echo "Usage: $0 [53|54]"
11 - exit 1
12 -fi
13 -
14 -if [ $# -eq 1 ] ; then
15 - WOVERSION=
16 - echo "$1" | grep -qE "^5[34]" && WOVERSION=$1
17 - if [ "X" = "X${WOVERSION}" ] ; then
18 - echo "Unknown WebObjects Version: $1"
19 - exit 1
20 - fi
21 -fi
22 -
23 -WOSYSVERSION=
24 -WOVERSIONFILE=${WO54PATH}/System/Library/Frameworks/JavaWebObjects.framework/Resources/version.plist
25 -if [ -f ${WOVERSIONFILE} ] ; then
26 - WOSYSVERSION=`cat ${WOVERSIONFILE} | grep -A 1 CFBundleShortVersionString | \
27 - tail -1 | sed -e 's/^.*5\.\([0-9]\).*/5\1/'`
28 -fi
29 -if [ X${WOSYSVERSION} != X54 ] ; then
30 - echo WebObjects 5.4 is not currently installed
31 - exit
32 -fi
33 -
34 -if [ ! -d ${WO53PATH}/System -a ${WOVERSION} -eq 53 ] ; then
35 - if [ ! -f ${TMPDIR}/WebObjects5.3.3Update.pax.gz ] ; then
36 - cd ${TMPDIR}
37 - ftp http://supportdownload.apple.com/download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/Mac_OS_X/downloads/061-2998.20070215.33woU/WebObjects5.3.3Update.dmg && \
38 - dd if=${TMPDIR}/WebObjects5.3.3Update.dmg bs=0x1000 skip=0xb12 of=WebObjects5.3.3Update.pax.gz > /dev/null 2>&1 && \
39 - rm ${TMPDIR}/WebObjects5.3.3Update.dmg
40 - fi
41 - mkdir -p ${WO53PATH}
42 - cd ${WO53PATH}
43 - pax -zrf ${TMPDIR}/WebObjects5.3.3Update.pax.gz > /dev/null 2>&1 && \
44 - rm ${TMPDIR}/WebObjects5.3.3Update.pax.gz
45 - mkdir -p ${WO53PATH}/Library/Frameworks
46 -fi
47 -
48 -if [ ! -e ${WO53PATH}/System/Library/WebObjects/Executables/WOOpenURL ] ; then
49 - mkdir -p ${WO53PATH}/System/Library/WebObjects/Executables
50 - ln -s /usr/bin/open ${WO53PATH}/System/Library/WebObjects/Executables/WOOpenURL
51 -fi
52 -
53 -if [ -f "${WOBUILDPROPS}" ]
54 -then
55 - if [ ! -f "${WOBUILDPROPS}54" ] ; then
56 - cp "${WOBUILDPROPS}" "${WOBUILDPROPS}54"
57 - fi
58 - if [ ! -f "${WOBUILDPROPS}53" ] ; then
59 - cat "${WOBUILDPROPS}" | sed -E "s@=${WO54PATH}.(System|Lib|$)@=${WO53PATH}/\1@g ; s@/\$@@" > "${WOBUILDPROPS}53"
60 - fi
61 -fi
62 -
63 -if [ -f "${WOLIPSPROPS}" ]
64 -then
65 - if [ ! -f "${WOLIPSPROPS}54" ] ; then
66 - cp "${WOLIPSPROPS}" "${WOLIPSPROPS}54"
67 - fi
68 - if [ ! -f "${WOLIPSPROPS}53" ] ; then
69 - cat "${WOLIPSPROPS}" | sed -E "s@=${WO54PATH}.(System|Lib|$)@=${WO53PATH}/\1@g ; s@/\$@@" > "${WOLIPSPROPS}53"
70 - fi
71 -fi
72 -
73 -WOVERSTRING=`echo ${WOVERSION} | sed -E 's/^([0-9])/\1./'`
74 -echo Setting wolips properties for WebObjects ${WOVERSTRING}
75 -cp "${WOBUILDPROPS}${WOVERSION}" "${WOBUILDPROPS}"
76 -cp "${WOLIPSPROPS}${WOVERSION}" "${WOLIPSPROPS}"
77 -
XWiki.XWikiComments[0]
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.simon
Comment
... ... @@ -1,3 +1,0 @@
1 -If you are running WO 5.3.3 and building Wonder source (rather than downloading the binaries) then you will need to stick this in your ~~/Library/wobuild.properties file after running the woswitch script so that the install puts the frameworks in the right location:
2 -
3 -wonder.framework.install.root=/Developer/WebObjects53/Library/Frameworks
Date
... ... @@ -1,1 +1,0 @@
1 -2008-12-07 04:56:07.0
XWiki.XWikiComments[1]
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.wessman
Comment
... ... @@ -1,1 +1,0 @@
1 -Note that Golipse's script doesn't support installation paths with whitespaces in it. The errors are present in the log, but far from obvious.
Date
... ... @@ -1,1 +1,0 @@
1 -2011-06-23 17:44:29.0
XWiki.XWikiComments[2]
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.jbrook
Comment
... ... @@ -1,3 +1,0 @@
1 -The link to Golipse at the top of the page is broken.
2 -
3 -Update: And of course I should have fixed it instead of commenting. Fixed now.
Date
... ... @@ -1,1 +1,0 @@
1 -2011-10-31 16:07:00.0