• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Exception only when framework is embedded
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exception only when framework is embedded


  • Subject: Exception only when framework is embedded
  • From: Art Isbell <email@hidden>
  • Date: Thu, 07 Aug 2008 16:06:03 -1000

Eclipse 3.3.2
WOLips 3.3.5281
Mac OS X 10.5.4
WO 5.3.3 frameworks and /Library/WebObjects/Extensions

OK, I'm at wit's end (or maybe half-wit's or dimwit's end :-)

A non-WOnder app, Waldo, depends on a non-WOnder framework, WOCommon.  The WOCommon framework defines a class wocommon.Session that derives from WOSession.  Waldo defines a class waldo.Session that derives from wocommon.Session.

Waldo runs without error from within Eclipse running in Web server connect mode.

Ant-built Waldo runs without error from outside Eclipse when the ant-built WOCommon framework is not embedded in Waldo.  /Library/Frameworks/WOCommon.framework is a symbolic link to <my_Eclipse_workspace_path>/WOCommon/dist/WOCommon.framework so that /Library/Frameworks/WOCommon.framework is always up-to-date with the ant-built WOCommon framework in the dist directory of my WOCommon framework project.

Ant-built Waldo throws a class cast exception when run from outside Eclipse with identical launch arguments (those configured in JavaMonitor and used when wotaskd launches the app) when the ant-built WOCommon framework is embedded in Waldo by setting the wo.wolocalroot framework "embed" property to "true".  The class cast exception is thrown at this statement in Waldo's Main.java:

final Session sessionL = (Session)session();

because session() returns a wocommon.Session but is being cast to a waldo.Session.

When the WOCommon framework isn't embedded but is otherwise identical as best I can tell, session() returns a waldo.Session.  For some reason, a wocommon.Session is being created rather than a waldo.Session when the WOCommon framework is embedded.  WTF?!

I have compared the class paths in MacOSClassPath.txt and in the launch output for Waldo with and without the WOCommon framework embedded.  The class paths are identical with the exception of the paths to wocommon.jar.  The checksums of waldo.jar and wocommon.jar are identical in the embedded and non-embedded cases.  I've run out of ideas.

I need to deploy Waldo with the WOCommon framework embedded because a different WOCommon framework version is in /Library/Frameworks on the deployment server.  But I am unable to do so because of this class cast exception that has defied my ability to debug the problem for a couple of very frustrating days.  Can someone please point out the error in my ways?

Aloha,
Art

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Exception only when framework is embedded
      • From: Florijan Stamenkovic <email@hidden>
    • Re: Exception only when framework is embedded
      • From: Mike Schrag <email@hidden>
    • Re: Exception only when framework is embedded
      • From: Ramsey Gurley <email@hidden>
    • Re: Exception only when framework is embedded
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: WO App written in WO 5.4 won't run on Leopard Server with WO 5.4
  • Next by Date: Re: Exception only when framework is embedded
  • Previous by thread: Re: WO App written in WO 5.4 won't run on Leopard Server with WO 5.4
  • Next by thread: Re: Exception only when framework is embedded
  • Index(es):
    • Date
    • Thread