Super irritating deployment problem and resolution

5 views
Skip to first unread message

Mark McCraw

unread,
Apr 17, 2007, 3:30:16 PM4/17/07
to wotips
So I've been using Eclipse/WOLips for WebObjects a few weeks now, and
by and large I love it. However, there are a couple of irritating
problems with building for deployment, and I thought I would share my
experiences here. The first is that when you do an ant build, if the
build fails because of something not strictly in your code (a library
is missing, for instance), it will just silently exit without throwing
up any real flags. It will even generate a full distribution
hierarchy with an empty (or partially empty) jar file (see /Resources/
Java within your distribution), which you then foolishly deploy to the
live server thinking that everything is okay. We finally discovered
this by examining the contents of the deployed jar after much
frustration. The only indication that you will have that something is
wrong is if you check the "Problems" tab in Eclipse, and you will see
the problem listed there. So always try to keep that tab empty, and
check it first if things seem weird.

The second problem is as follows:

When you ant compile an application in Eclipse, the deployment package
contains a directory called Whatever.woa/Contents/MacOS. It contains
an executable and 2 files called MacOSClassPath.txt and
MacOSXServerClassPath.txt. These files list the frameworks that you
set up the application to use (nested under WO Frameworks in the
Package Explorer of Eclipse). If you add frameworks in eclipse (by
right-clicking "WO Frameworks and selecting "Configure") and rebuild,
it updates the other resources for that application in /Library/
WebObjects/Applications/, but it does not update MacOSClassPath.txt
and MacOSXServerClassPath.txt. So your deployed application will be
missing resources from frameworks that it needs, resulting in
confusing "Class not found" exceptions. The only way to correct the
situation is to manually delete the local copy of the application
from /Library/WebObjects/Applications (or dist, if that's where you're
building them to) and THEN rebuild and redeploy. If you don't
manually remove the application bundle, you can clean and rebuild from
Eclipse until you are blue in the face, and it will never update those
files.

I hope this saves someone the grief that it caused me.

Fred Shurtleff

unread,
Apr 18, 2007, 10:30:38 AM4/18/07
to wot...@googlegroups.com
Thanks Mark for sharing your experiences. I too have been wrestling with
these problems, and now have a better understanding of WOLip's workings.

John Huss

unread,
Apr 18, 2007, 10:59:27 AM4/18/07
to wot...@googlegroups.com
I think it's pretty much a no-brainer that you shouldn't deploy an
application that doesn't successfully compile (that has errors in the
problems tab).

John

Mike Schrag

unread,
Apr 18, 2007, 11:13:53 AM4/18/07
to wot...@googlegroups.com
> However, there are a couple of irritating
> problems with building for deployment
You should log these as bugs against wolips if you haven't already.

ms

Reply all
Reply to author
Forward
0 new messages