Hi Damian,

The build folder for Maven projects is not recognized by WOLips causing this 
kind of exception. You have to configure the classpath in the Run Configuration 
panel. This tutorial [1] demonstrates step by step how to do it.

[1]http://wiki.objectstyle.org/confluence/display/WOL/Maven+Running+or+Debugging+as+WO+Application

Cheers,

Henrique

On 18/05/2011, at 09:59, Damian Stasiak wrote:

> Hello everybody,
> I have two classes: FirstClass and SecondClass.
> In FirstClass WO I have:
> <html>
> <head></head>
> <body>
>     <webobject name = "secondClass"/>
> </body>
> </html>
> --
> secondClass : SecondClass {
>     myVar = "whatever";
> }
> In SecondClass WO I have:
> <webobject name = "myString"/>
> --
> myString : WOString {
>     value = ^myVar;
> }
> and in API file I have variable myVar
> 
> In both java files I have:
> @Override
>     public boolean synchronizesVariablesWithBindings() {
>         return false;
>     }
> 
> When I create that project (Eclipse + m2j plugin) as new 
> WebObjectsApplication everything works fine and when I run FirstClass I see 
> "whatever". But when I create project with Maven (woapplication-archetype) 
> and run those same files I get: 
> Application: test
> Error: com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException 
> exception
> Reason:
> com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: 
> [<your.app.components.SecondClass name: your.app.components.SecondClass 
> subcomponents: null > takeValueForKey()]: attempt to assign value to unknown 
> key: 'myVar'.
> This WOComponent does not have an instance variable of the name myVar or 
> _myVar, nor a method of the name setMyVar or _setMyVar
> 
> Program versions:
> Eclipse: 3.6.2
> Maven: 2.2.1
> WOLips plugin: 3.6.70242
> m2j: 0.13
> 
> Do you have any idea? Am I doing sth wrong or this is because of bad 
> configuration?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/hprange%40gmail.com
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to