Re: WOApplication cannot be cast to Application
Re: WOApplication cannot be cast to Application
- Subject: Re: WOApplication cannot be cast to Application
- From: Paul Yu <email@hidden>
- Date: Mon, 07 Apr 2014 07:03:35 -0400
Jon
When you created the run configuration for your old project in eclipse, which Application did you choose?
Paul
Sent from my iPad
> On Apr 7, 2014, at 6:23 AM, Pascal Robert <email@hidden> wrote:
>
>
>> Le 2014-04-07 à 05:25, Jon Kleiser <email@hidden> a écrit :
>>
>> Hi Hugi,
>>
>> I cannot see how imports can be the problem here. The reasons are
>
> It can be a problem if it can’t find the WO classes in the project’s class path...
>
>> - All my java files are in the same 'default package'
>
> You really should avoid using the default package and move your classes in a package.
>
>> - In my DirectAction.java there are no imports that mention "Application", and those that end with ".*;" should not cause confusion (com.webobjects..., java.io).
>> - This is no problem on my old Mac
>>
>> /Jon
>>
>>> On 7. Apr, 2014, at 10:44, Hugi Thordarson wrote:
>>>
>>> Hi Jon.
>>> Check your imports, you're probably importing the wrong Application class(com.apple.eawt.Application or some such).
>>>
>>> Cheers,
>>> - hugi
>>>
>>>
>>>> On 7.4.2014, at 08:40, Jon Kleiser <email@hidden> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I just try to run an old WO project on a "new" Mac with OSX 10.8.5. I installed Eclipse/WOLips using Golipse as described on this page <http://wiki.wocommunity.org/display/WEB/Project+Wonder+Installation>. However, I had to install WOLips separately, as it didn't seem to be installed by Golipse. Now I've got Eclipse 3.8.2 and WOLips37Stable (3.7.20140223.48, incl. Goodies), and I imported my project that I have run (for years) on another Mac (OSX 10.6.8) with Eclipse Indigo and WOLips/Goodies 3.7.10096. When I try to run my project on the "new" Mac, I get a ClassCastException (and "19 more") saying
>>>> com.webobjects.appserver.WOApplication cannot be cast to Application
>>>>
>>>> ... referring to this line in my DirectAction.java:
>>>> protected static final Application app = (Application)WOApplication.application();
>>>>
>>>> Can anybody give me a hint about what's wrong in my new setup?
>>>>
>>>> /Jon
>>>> _______________________________________________
>>>> 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
>>
>>
>> _______________________________________________
>> 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
>
>
> _______________________________________________
> 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
_______________________________________________
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