[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-28 Thread cazzaran


Peter,

It does... 

-Josh

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:
> Does the Java version of Group have a public no args constructor?
> 
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 28, 2005 3:50 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Error: Cannot invoke method when using a VO
> 
> 
> 
> I have a delegate class on my server called GroupDelegate, and it has
> a method addGroup(Group group).
> 
> When I try and call this method on my remote object, I get the error:
> 
> Error: Cannot invoke method addGroup
> 
> However, if I switch my method's signature to addGroup(String
> groupName), the method executes, and the group is added to the DB.
> 
> Group is just a POJO, and obviously the second method wont work
> because there is a lot more information than just the groupName that
> needs to be recorded...
> 
> Interestingly, when I do a getGroups I get back an array of the
> correct objects, and in my client side model of my Group class I have
> correctly done the Object.registerClass. The only time I seem to have
> an issue is when I pass it BACK to my server as a Group.
> 
> Any ideas? -Josh
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-28 Thread cazzaran


Peter,

Here's my whitelist:



*



businessdelegates.UserDelegate
stateful-class
false


businessdelegates.GroupDelegate
stateful-class
false




-Josh

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:
> Ah, what does the unnamed whitelist in the remote-object section look
> like? Does it include your Group class? I apologize for not double
> checking whether it was still a requirement in Flex 1.5, but I know it
> was in Flex 1.0.
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 28, 2005 4:19 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> Peter,
> 
> It does... 
> 
> -Josh
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Does the Java version of Group have a public no args constructor?
> > 
> > 
> > -Original Message-
> > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, March 28, 2005 3:50 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Error: Cannot invoke method when using a VO
> > 
> > 
> > 
> > I have a delegate class on my server called GroupDelegate, and it has
> > a method addGroup(Group group).
> > 
> > When I try and call this method on my remote object, I get the error:
> > 
> > Error: Cannot invoke method addGroup
> > 
> > However, if I switch my method's signature to addGroup(String
> > groupName), the method executes, and the group is added to the DB.
> > 
> > Group is just a POJO, and obviously the second method wont work
> > because there is a lot more information than just the groupName that
> > needs to be recorded...
> > 
> > Interestingly, when I do a getGroups I get back an array of the
> > correct objects, and in my client side model of my Group class I have
> > correctly done the Object.registerClass. The only time I seem to have
> > an issue is when I pass it BACK to my server as a Group.
> > 
> > Any ideas? -Josh
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread cazzaran


I turned on remote object debugging, but it seems to make my
flexbuilder unresponsive. After a while, builder says that I should
abort the script or it will make my machine lock up. If I set remote
object debug to false and restart the server, this no longer happens.

But I think I found the issue anyway; it seems that for some reason,
the Group isn't being sent over the wire as a Group, even though I
have the Object.registerClass correct. Also, when I get an array of
Groups from my server, they are correct. 

But it seems that in my client class, when I do:

var group:Group = new Group();
group.name = "test";
remoteDelegate.addGroup(group);

it gives me that "can't invoke method error", because it's not a Group
POJO, it's just a hashmap. Why is this happening?


--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:
> Have you managed to turn on debugging for remote-object in
> /WEB-INF/flex/flex-config.xml and looked at the trace of the AMF error
> in the NetConnection Debugger? There may be more information on the
> fault object in the rootcause property.
> 
> If you have access to the server locally, you can also try turning on
> Debug level logging for the AMF Gateway in
> /WEB-INF/flex/gateway-config.xml and checking your Flex logs (or
> possibly just watching the console output if you manually launch JRun
> and have console logging enabled for Flex). This will show you what data
> type was being deserialized for your input parameter and it will also
> let you see the raw response going back with information similar to that
> shown in the NetConnection Debugger (though the server side is more
> accurate as the NCD is an old Flash Remoting tool that has a few issues
> - mainly that it doesn't show objects typed with Object.registerClass).
> 
> 
>  
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 28, 2005 4:58 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> Peter,
> 
> Here's my whitelist:
> 
> 
> 
> *
> 
> 
> 
> businessdelegates.UserDelegate
> stateful-class
> false
> 
> 
> businessdelegates.GroupDelegate
> stateful-class
> false
> 
> 
> 
> 
> -Josh
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Ah, what does the unnamed whitelist in the remote-object section look
> > like? Does it include your Group class? I apologize for not double
> > checking whether it was still a requirement in Flex 1.5, but I know it
> > was in Flex 1.0.
> > 
> > -Original Message-
> > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, March 28, 2005 4:19 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> > 
> > 
> > 
> > Peter,
> > 
> > It does... 
> > 
> > -Josh
> > 
> > --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> > wrote:
> > > Does the Java version of Group have a public no args constructor?
> > > 
> > > 
> > > -Original Message-
> > > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > > Sent: Monday, March 28, 2005 3:50 PM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Error: Cannot invoke method when using a VO
> > > 
> > > 
> > > 
> > > I have a delegate class on my server called GroupDelegate, and it
> has
> > > a method addGroup(Group group).
> > > 
> > > When I try and call this method on my remote object, I get the
> error:
> > > 
> > > Error: Cannot invoke method addGroup
> > > 
> > > However, if I switch my method's signature to addGroup(String
> > > groupName), the method executes, and the group is added to the DB.
> > > 
> > > Group is just a POJO, and obviously the second method wont work
> > > because there is a lot more information than just the groupName that
> > > needs to be recorded...
> > > 
> > > Interestingly, when I do a getGroups I get back an array of the
> > > correct objects, and in my client side model of my Group class I
> have
> > > correctly done the Object.registerClass. The only time I seem to
> have
> > > an issue is when I pass it BACK to my server as a Group.
> > > 
> > > Any ideas? -Josh
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  
> > > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread cazzaran


Found it... but it doesn't make total sense...

here's the response trace:

Info: Serializing response
  (Message #0 targetURI=/1/onStatus, responseURI=null)
(Object #0)
  level = "error"
  code = "Server.Processing"
  type = ""
  rootcause = (Object #1)
level = "error"
code = null
type = ""
details = ""
description = "Could not set object null on class
pojos.Group's method setOrganization"
  details = "The expected argument types are (pojos.Group) but the
supplied types were (flashgateway.io.ASObject) and converted to (null)."
  description = "Cannot invoke method 'addGroup'."


Below's the serialized request. You can see that the organization IS
being serialized... I'm not sure why it thinks that the expected
argument types are Group. The addGroup requires a Group, but the
Group.setOrganization method takes an Organization. They all have
_remoteClass assigned, too. Weird...

Info: Deserializing request
  (Message #0 targetURI=groupDelegate.addGroup, responseURI=/1)
(Array #0)
  [0] = (Object #1)
_flag = "Envelope"
headers = (Array #2)
  [0] = (Array #3)
[0] = "ServiceType"
[1] = false
[2] = "stateful-class"
data = (Array #4)
  [0] = (Typed Object #5 'pojos.Group')
organization = (Typed Object #6 'pojos.Organization')
  _remoteClass = "pojos.Organization"
  contactNumber = null
  address1 = null
  roles = (Array #7)
[0] = (Typed Object #8 'pojos.Role')
  roleRights = "a, d, m"
  users = (Array #9)
  _remoteClass = "pojos.Role"
  userRights = "d"
  groupRights = "a, d, m"
  name = "Local Message Creator"
  id = "402881e500523eca0100523ffc040001"
  organization = (Ref #6)
  superuser = false
[1] = (Typed Object #10 'pojos.Role')
  roleRights = "adm"
  users = (Array #11)
[0] = (Typed Object #12 'pojos.User')
  password = "passger"
  organizationId = null
  _remoteClass = "pojos.User"
  username = "cazzaran"
  email = "[EMAIL PROTECTED]"
  role = (Ref #10)
  roleID = "1"
  firstName = "Josh"
  id = "1"
  organization = (Ref #6) the rest
truncated





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-11 Thread cazzaran


Christoph,

Actually, I haven't solved it yet. It trying different things, which
mostly amount to working *around* the problem (like reducing my object
graph depth, etc). I agree, I like using deep object graphs to, but
can't seem to get it to work.

-Josh

--- In flexcoders@yahoogroups.com, Christoph Guse <[EMAIL PROTECTED]> wrote:
> Hi cazzaran,
> 
> how did you solve your problem? I'm interested in a solution, because I 
> have a very similar problem. In my case I have an object (OgoJobVO) in 
> which is another object (OgoAccountVO) in which is another object 
> (OgoPersonVO).
> When I get the Job-Object from the Server, everything works fine.
When I 
> try to call a function in a POJO where a Job-Object as an argument, I 
> get the following error in the NetConnectionDebugger:
> 
> Status (object #2)
> .code: "Server.Processing"
> .description: "Cannot invoke method 'insertJob'."
> .details: "The expected argument types are (ogo.OgoJobVO, 
> java.lang.String, java.lang.String) but the supplied types were 
> (flashgateway.io.ASObject, java.lang.String, java.lang.String) and 
> converted to (null, null, null)."
> .level: "error"
> .type: ""
> .rootcause (object #3)
> ..code: (undefined)
> ..description: "Type ogo.vo.OgoJobVO not found"
> ..details: ""
> ..level: "error"
> ..type: ""
> 
> The call looks like this:
> var call = service.insertJob(jobarg,login,password);
> 
> I tested the argument jobarg with
> 
> if(jobarg instanceof OgoJobVO){
> text="type of OgoJobVO";
> }
> else{
> text="is not type of OgoJobVO";
>   }
>   mx.core.Application.application.debugtext = text;
> 
> This returns "type of OgoJobVO".
> 
> I really would like to use nested Objects.
> 
> I appreciate for any suggestions.
> 
> Christoph
> 
> cazzaran wrote:
> 
> >
> > Found it... but it doesn't make total sense...
> >
> > here's the response trace:
> >
> > Info: Serializing response
> >   (Message #0 targetURI=/1/onStatus, responseURI=null)
> > (Object #0)
> >   level = "error"
> >   code = "Server.Processing"
> >   type = ""
> >   rootcause = (Object #1)
> > level = "error"
> > code = null
> > type = ""
> > details = ""
> > description = "Could not set object null on class
> > pojos.Group's method setOrganization"
> >   details = "The expected argument types are (pojos.Group) but the
> > supplied types were (flashgateway.io.ASObject) and converted to
(null)."
> >   description = "Cannot invoke method 'addGroup'."
> >
> >
> > Below's the serialized request. You can see that the organization IS
> > being serialized... I'm not sure why it thinks that the expected
> > argument types are Group. The addGroup requires a Group, but the
> > Group.setOrganization method takes an Organization. They all have
> > _remoteClass assigned, too. Weird...
> >
> > Info: Deserializing request
> >   (Message #0 targetURI=groupDelegate.addGroup, responseURI=/1)
> > (Array #0)
> >   [0] = (Object #1)
> > _flag = "Envelope"
> > headers = (Array #2)
> >   [0] = (Array #3)
> > [0] = "ServiceType"
> > [1] = false
> > [2] = "stateful-class"
> > data = (Array #4)
> >   [0] = (Typed Object #5 'pojos.Group')
> > organization = (Typed Object #6 'pojos.Organization')
> >   _remoteClass = "pojos.Organization"
> >   contactNumber = null
> >   address1 = null
> >   roles = (Array #7)
> > [0] = (Typed Object #8 'pojos.Role')
> >   roleRights = "a, d, m"
> >   users = (Array #9)
> >   _remoteClass = "pojos.Role"
> >   userRights = "d"
> >   groupRights = "a, d, m"
> >   name = "Local Message Creator"
> >   id = "402881e500523eca0100523ffc040001"
> >   organization = (Ref #6)
> >   superuser = false
> > [1] = (Typed Object #10 'pojos.Role')
> >   roleRights = "adm"
> >   users = (Array #11)
> > [0] = (Typed Object #12 'pojos.User')
> >   password = "passger"
> >   organizationId = null
> >   _remoteClass = "pojos.User"
> >   username = "cazzaran"
> >   email = "[EMAIL PROTECTED]"
> >   role = (Ref #10)
> >   roleID = "1"
> >   firstName = "Josh"
> >   id = "1"
> >   organization = (Ref #6) the rest
> > truncated
> >
> >
> >
> >
> > *Yahoo! Groups Sponsor*
> > ADVERTISEMENT
> > click here 
> >


[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread cazzaran


WHat's interesting, is if you look at the below code, I have an array
of Groups, called subGroups. This is populated with objects of the
type Group, so that would seem to mean that Flex is typing them
correctly, at least when they come FROM the server if I create a
new object of this type and send it TO my server, it seems to not be
correct.

What's also weird, is if I inspect an object using debug, all the
Groups in the subGroups array have _remoteClass set, even though I
didn't specify it. This is due to the Object.registerClass I assume,
but when I instantiate a new Group(), that object lacks this variable.
It seems like it's being typed wrong from the client side. Am I
interpreting this correctly?

Here's what my Group.as code looks like:

class pojos.Group {
   public static var regClass = Object.registerClass("pojos.Group",
pojos.Group);
  public var id:String;
  public var name:String;
  public var organization:Organization;
  public var superGroup:Group;
  public var subGroups:Array;

function Group() {}

public function get data() {
return id;
}

  //... some getters and business methods
}

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:
> Have you posted the Object.registerClass line of code in this thread
> yet? I've not yet seen it, but it must not be registered correctly or
> the class not linked in at compile time to match the registration as the
> player would send an instance of Group.
> 
> All objects go over the wire as ASObjects, but they may include type
> information if they're registered.  The raw representation of an
> ASObject on the server side is a HashMap. It's the server side part of
> RemoteObject that knows how to map ASObject -> Group before invoking
> your method.
> 
> Since you're not having any luck with Flex Builder, did you try what I
> suggested using the NetConnectionDebugger.swf (which ships in the extras
> folder of the Flex 1.5 install) with remote-objects debug enabled (it
> doesn't have anything to do with Flex Builder)? If that's not suitable
> then you could use the gateway debug level logging approach on the
> server. I'd prefer you to try the server gateway logging approach anyway
> as we want to see whether an AMF Typed Object or untyped Object was
> deserialized from your Group param.
> 
> 
> -----Original Message-----
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 30, 2005 2:12 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> I turned on remote object debugging, but it seems to make my
> flexbuilder unresponsive. After a while, builder says that I should
> abort the script or it will make my machine lock up. If I set remote
> object debug to false and restart the server, this no longer happens.
> 
> But I think I found the issue anyway; it seems that for some reason,
> the Group isn't being sent over the wire as a Group, even though I
> have the Object.registerClass correct. Also, when I get an array of
> Groups from my server, they are correct. 
> 
> But it seems that in my client class, when I do:
> 
> var group:Group = new Group();
> group.name = "test";
> remoteDelegate.addGroup(group);
> 
> it gives me that "can't invoke method error", because it's not a Group
> POJO, it's just a hashmap. Why is this happening?
> 
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Have you managed to turn on debugging for remote-object in
> > /WEB-INF/flex/flex-config.xml and looked at the trace of the AMF error
> > in the NetConnection Debugger? There may be more information on the
> > fault object in the rootcause property.
> > 
> > If you have access to the server locally, you can also try turning on
> > Debug level logging for the AMF Gateway in
> > /WEB-INF/flex/gateway-config.xml and checking your Flex logs (or
> > possibly just watching the console output if you manually launch JRun
> > and have console logging enabled for Flex). This will show you what
> data
> > type was being deserialized for your input parameter and it will also
> > let you see the raw response going back with information similar to
> that
> > shown in the NetConnection Debugger (though the server side is more
> > accurate as the NCD is an old Flash Remoting tool that has a few
> issues
> > - mainly that it doesn't show objects typed with
> Object.registerClass).
> > 
> > 
> >  
> > 
> > -Or

[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread cazzaran


This is odd; all my POJOs have Object.registerClass (including the
ones that are used as types in others) but they also all have
_remoteClass specified when I debug (though I haven't set it). I
looked, and they all have regClass set to true, which I assume means
that the registerClass went through correctly. Somehow, from what it
sounds like you're saying, they aren't being mapped correctly to my
server side objects. This might explain why the Group I create on my
client side isnt serialized right...

I'm baffled. 

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:
> 
> The Object.registerClass looks correct - but, your Group object isn't as
> simple as I thought. I imagine the Organization class also needs to be
> registered and availabe on the Java side too. Is that class registered?
> Does it have a public no args constructor? ... and so forth.
> 
> 
> Note: While it is used to try and achieve a similar result, _remoteClass
> isn't from the Object.registerClass (it's likely the server has added
> this for the case where users have forgotten Object.registerClass and
> the RemoteObject responder tries to create its own instance of the type
> for you... this is much slower than if you had used Object.registerClass
> as the player can do this natively for you much faster). _remoteClass
> was introduced to support RemoteObject via SOAP in Flex 1.0. The SOAP
> transport protocol was removed for RemoteObject in Flex 1.5. I'd like to
> see all Flex users move away from _remoteClass and rely on
> Object.registerClass.
>  
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 30, 2005 3:31 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> WHat's interesting, is if you look at the below code, I have an array
> of Groups, called subGroups. This is populated with objects of the
> type Group, so that would seem to mean that Flex is typing them
> correctly, at least when they come FROM the server if I create a
> new object of this type and send it TO my server, it seems to not be
> correct.
> 
> What's also weird, is if I inspect an object using debug, all the
> Groups in the subGroups array have _remoteClass set, even though I
> didn't specify it. This is due to the Object.registerClass I assume,
> but when I instantiate a new Group(), that object lacks this variable.
> It seems like it's being typed wrong from the client side. Am I
> interpreting this correctly?
> 
> Here's what my Group.as code looks like:
> 
> class pojos.Group {
>public static var regClass = Object.registerClass("pojos.Group",
> pojos.Group);
>   public var id:String;
>   public var name:String;
>   public var organization:Organization;
>   public var superGroup:Group;
>   public var subGroups:Array;
> 
>   function Group() {}
> 
>   public function get data() {
>   return id;
>   }
>   
>   //... some getters and business methods
> }
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Have you posted the Object.registerClass line of code in this thread
> > yet? I've not yet seen it, but it must not be registered correctly or
> > the class not linked in at compile time to match the registration as
> the
> > player would send an instance of Group.
> > 
> > All objects go over the wire as ASObjects, but they may include type
> > information if they're registered.  The raw representation of an
> > ASObject on the server side is a HashMap. It's the server side part of
> > RemoteObject that knows how to map ASObject -> Group before invoking
> > your method.
> > 
> > Since you're not having any luck with Flex Builder, did you try what I
> > suggested using the NetConnectionDebugger.swf (which ships in the
> extras
> > folder of the Flex 1.5 install) with remote-objects debug enabled (it
> > doesn't have anything to do with Flex Builder)? If that's not suitable
> > then you could use the gateway debug level logging approach on the
> > server. I'd prefer you to try the server gateway logging approach
> anyway
> > as we want to see whether an AMF Typed Object or untyped Object was
> > deserialized from your Group param.
> > 
> > 
> > -Original Message-
> > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, March 30, 2005 2:12 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Error: Cannot invoke method when u

[flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread cazzaran


I've set my flex logs to debug, but I don't get much in the way of
logging from flex.

I've also set every trace option to true, but still don't get much
from it.

I'm curious, do my server and client sided classes have to have
identical sets of members (or matching getters and setters)? I ask
this because my server side POJOs have getters that are simply subsets
of internal variables, like getSubGroups which returns a subset of
what getGroups() would. On my client class side, i created a variable
called subGroups:Array so that this information is immediately
available, and is populated with getSubGroups() on the server side.

My question is, does that mean that my server sided class will need a
setSubGroups() since Flex sees this variable on the client side? Or if
it doesn't will the classes still match up with Object.registerClass?

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:
> Without seeing the AMF trace on the server side, all I can do is suggest
> simplifying the case step by step and then work up to the problem at
> hand. Try a Group type that only has flash intrinsic types as
> properties... then go down another level... etc.





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-28 Thread Peter Farland

Ah, what does the unnamed whitelist in the remote-object section look
like? Does it include your Group class? I apologize for not double
checking whether it was still a requirement in Flex 1.5, but I know it
was in Flex 1.0.

-Original Message-
From: cazzaran [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 4:19 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO



Peter,

It does... 

-Josh

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
wrote:
> Does the Java version of Group have a public no args constructor?
> 
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 28, 2005 3:50 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Error: Cannot invoke method when using a VO
> 
> 
> 
> I have a delegate class on my server called GroupDelegate, and it has
> a method addGroup(Group group).
> 
> When I try and call this method on my remote object, I get the error:
> 
> Error: Cannot invoke method addGroup
> 
> However, if I switch my method's signature to addGroup(String
> groupName), the method executes, and the group is added to the DB.
> 
> Group is just a POJO, and obviously the second method wont work
> because there is a lot more information than just the groupName that
> needs to be recorded...
> 
> Interestingly, when I do a getGroups I get back an array of the
> correct objects, and in my client side model of my Group class I have
> correctly done the Object.registerClass. The only time I seem to have
> an issue is when I pass it BACK to my server as a Group.
> 
> Any ideas? -Josh
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links





 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-28 Thread Peter Farland

Have you managed to turn on debugging for remote-object in
/WEB-INF/flex/flex-config.xml and looked at the trace of the AMF error
in the NetConnection Debugger? There may be more information on the
fault object in the rootcause property.

If you have access to the server locally, you can also try turning on
Debug level logging for the AMF Gateway in
/WEB-INF/flex/gateway-config.xml and checking your Flex logs (or
possibly just watching the console output if you manually launch JRun
and have console logging enabled for Flex). This will show you what data
type was being deserialized for your input parameter and it will also
let you see the raw response going back with information similar to that
shown in the NetConnection Debugger (though the server side is more
accurate as the NCD is an old Flash Remoting tool that has a few issues
- mainly that it doesn't show objects typed with Object.registerClass).


 

-Original Message-
From: cazzaran [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 4:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO



Peter,

Here's my whitelist:



*



businessdelegates.UserDelegate
stateful-class
false


businessdelegates.GroupDelegate
stateful-class
false




-Josh

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
wrote:
> Ah, what does the unnamed whitelist in the remote-object section look
> like? Does it include your Group class? I apologize for not double
> checking whether it was still a requirement in Flex 1.5, but I know it
> was in Flex 1.0.
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 28, 2005 4:19 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> Peter,
> 
> It does... 
> 
> -Josh
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Does the Java version of Group have a public no args constructor?
> > 
> > 
> > -Original Message-
> > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, March 28, 2005 3:50 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Error: Cannot invoke method when using a VO
> > 
> > 
> > 
> > I have a delegate class on my server called GroupDelegate, and it
has
> > a method addGroup(Group group).
> > 
> > When I try and call this method on my remote object, I get the
error:
> > 
> > Error: Cannot invoke method addGroup
> > 
> > However, if I switch my method's signature to addGroup(String
> > groupName), the method executes, and the group is added to the DB.
> > 
> > Group is just a POJO, and obviously the second method wont work
> > because there is a lot more information than just the groupName that
> > needs to be recorded...
> > 
> > Interestingly, when I do a getGroups I get back an array of the
> > correct objects, and in my client side model of my Group class I
have
> > correctly done the Object.registerClass. The only time I seem to
have
> > an issue is when I pass it BACK to my server as a Group.
> > 
> > Any ideas? -Josh
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links





 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-28 Thread Igor Costa

I advice you to upgrade your java machine, that's happens with the
1.4.3 upgrade to 1.5.2
the problem stop



On Mon, 28 Mar 2005 20:05:19 -0500, Peter Farland
<[EMAIL PROTECTED]> wrote:
> 
> Have you managed to turn on debugging for remote-object in
> /WEB-INF/flex/flex-config.xml and looked at the trace of the AMF error
> in the NetConnection Debugger? There may be more information on the
> fault object in the rootcause property.
> 
> If you have access to the server locally, you can also try turning on
> Debug level logging for the AMF Gateway in
> /WEB-INF/flex/gateway-config.xml and checking your Flex logs (or
> possibly just watching the console output if you manually launch JRun
> and have console logging enabled for Flex). This will show you what data
> type was being deserialized for your input parameter and it will also
> let you see the raw response going back with information similar to that
> shown in the NetConnection Debugger (though the server side is more
> accurate as the NCD is an old Flash Remoting tool that has a few issues
> - mainly that it doesn't show objects typed with Object.registerClass).
> 
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 28, 2005 4:58 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> Peter,
> 
> Here's my whitelist:
> 
> 
> 
> *
> 
> 
> 
> businessdelegates.UserDelegate
> stateful-class
> false
> 
> 
> businessdelegates.GroupDelegate
> stateful-class
> false
> 
> 
> 
> 
> -Josh
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Ah, what does the unnamed whitelist in the remote-object section look
> > like? Does it include your Group class? I apologize for not double
> > checking whether it was still a requirement in Flex 1.5, but I know it
> > was in Flex 1.0.
> >
> > -Original Message-
> > From: cazzaran [mailto:[EMAIL PROTECTED]
> > Sent: Monday, March 28, 2005 4:19 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> >
> >
> >
> > Peter,
> >
> > It does...
> >
> > -Josh
> >
> > --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> > wrote:
> > > Does the Java version of Group have a public no args constructor?
> > >
> > >
> > > -Original Message-
> > > From: cazzaran [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, March 28, 2005 3:50 PM
> > > To: flexcoders@yahoogroups.com
> > > Subject: [flexcoders] Error: Cannot invoke method when using a VO
> > >
> > >
> > >
> > > I have a delegate class on my server called GroupDelegate, and it
> has
> > > a method addGroup(Group group).
> > >
> > > When I try and call this method on my remote object, I get the
> error:
> > >
> > > Error: Cannot invoke method addGroup
> > >
> > > However, if I switch my method's signature to addGroup(String
> > > groupName), the method executes, and the group is added to the DB.
> > >
> > > Group is just a POJO, and obviously the second method wont work
> > > because there is a lot more information than just the groupName that
> > > needs to be recorded...
> > >
> > > Interestingly, when I do a getGroups I get back an array of the
> > > correct objects, and in my client side model of my Group class I
> have
> > > correctly done the Object.registerClass. The only time I seem to
> have
> > > an issue is when I pass it BACK to my server as a Group.
> > >
> > > Any ideas? -Josh
> > >
> > >
> > >
> > >
> > >
> > >
> > > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> 
> Yahoo! Groups Links
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 


-- 
Igor Costa
www.igorcosta.com
www.macromedia.com/go/team


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-29 Thread Dimitrios Gianninas





Hi Josh,
 
Make sure the Group class in 
Java has:
 
- no args 
constructor
- getter/setter method for 
every field
- 
serializable
 
On the AS2 side, make sure you 
have specified within the class:
 
static var regClass = Object.registerClass("com.package.Group", 
com.package.Group);
 
Jimmy 
Gianninas
Software Developer - 
Optimal Payments 
Inc.
 


From: cazzaran [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 7:58 PMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] Re: Error: Cannot 
invoke method when using a VO
Peter,Here's my 
whitelist:    
    
*    
    
        
businessdelegates.UserDelegate    
stateful-class    
false    
        
businessdelegates.GroupDelegate    
stateful-class    
false    
    
-Josh--- In 
flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote:> 
Ah, what does the unnamed whitelist in the remote-object section look> 
like? Does it include your Group class? I apologize for not double> 
checking whether it was still a requirement in Flex 1.5, but I know it> 
was in Flex 1.0.> > -Original Message-> From: 
cazzaran [mailto:[EMAIL PROTECTED] > Sent: Monday, March 28, 2005 4:19 
PM> To: flexcoders@yahoogroups.com> Subject: [flexcoders] Re: 
Error: Cannot invoke method when using a VO> > > > 
Peter,> > It does... > > -Josh> > --- 
In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>> 
wrote:> > Does the Java version of Group have a public no args 
constructor?> > > > > > -Original 
Message-> > From: cazzaran [mailto:[EMAIL PROTECTED] > > Sent: 
Monday, March 28, 2005 3:50 PM> > To: 
flexcoders@yahoogroups.com> > Subject: [flexcoders] Error: Cannot 
invoke method when using a VO> > > > > > > 
> I have a delegate class on my server called GroupDelegate, and it 
has> > a method addGroup(Group group).> > > > When 
I try and call this method on my remote object, I get the error:> > 
> > Error: Cannot invoke method addGroup> > > > 
However, if I switch my method's signature to addGroup(String> > 
groupName), the method executes, and the group is added to the DB.> > 
> > Group is just a POJO, and obviously the second method wont 
work> > because there is a lot more information than just the 
groupName that> > needs to be recorded...> > > > 
Interestingly, when I do a getGroups I get back an array of the> > 
correct objects, and in my client side model of my Group class I have> 
> correctly done the Object.registerClass. The only time I seem to 
have> > an issue is when I pass it BACK to my server as a 
Group.> > > > Any ideas? -Josh> > > > 
> > > > > > > >  > > 
Yahoo! Groups Links> > > > > >  
> Yahoo! Groups Links







Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/ 
To unsubscribe from this group, send an email to:[EMAIL PROTECTED] 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread Peter Farland

Have you posted the Object.registerClass line of code in this thread
yet? I've not yet seen it, but it must not be registered correctly or
the class not linked in at compile time to match the registration as the
player would send an instance of Group.

All objects go over the wire as ASObjects, but they may include type
information if they're registered.  The raw representation of an
ASObject on the server side is a HashMap. It's the server side part of
RemoteObject that knows how to map ASObject -> Group before invoking
your method.

Since you're not having any luck with Flex Builder, did you try what I
suggested using the NetConnectionDebugger.swf (which ships in the extras
folder of the Flex 1.5 install) with remote-objects debug enabled (it
doesn't have anything to do with Flex Builder)? If that's not suitable
then you could use the gateway debug level logging approach on the
server. I'd prefer you to try the server gateway logging approach anyway
as we want to see whether an AMF Typed Object or untyped Object was
deserialized from your Group param.


-Original Message-
From: cazzaran [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 2:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO



I turned on remote object debugging, but it seems to make my
flexbuilder unresponsive. After a while, builder says that I should
abort the script or it will make my machine lock up. If I set remote
object debug to false and restart the server, this no longer happens.

But I think I found the issue anyway; it seems that for some reason,
the Group isn't being sent over the wire as a Group, even though I
have the Object.registerClass correct. Also, when I get an array of
Groups from my server, they are correct. 

But it seems that in my client class, when I do:

var group:Group = new Group();
group.name = "test";
remoteDelegate.addGroup(group);

it gives me that "can't invoke method error", because it's not a Group
POJO, it's just a hashmap. Why is this happening?


--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
wrote:
> Have you managed to turn on debugging for remote-object in
> /WEB-INF/flex/flex-config.xml and looked at the trace of the AMF error
> in the NetConnection Debugger? There may be more information on the
> fault object in the rootcause property.
> 
> If you have access to the server locally, you can also try turning on
> Debug level logging for the AMF Gateway in
> /WEB-INF/flex/gateway-config.xml and checking your Flex logs (or
> possibly just watching the console output if you manually launch JRun
> and have console logging enabled for Flex). This will show you what
data
> type was being deserialized for your input parameter and it will also
> let you see the raw response going back with information similar to
that
> shown in the NetConnection Debugger (though the server side is more
> accurate as the NCD is an old Flash Remoting tool that has a few
issues
> - mainly that it doesn't show objects typed with
Object.registerClass).
> 
> 
>  
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 28, 2005 4:58 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> Peter,
> 
> Here's my whitelist:
> 
> 
> 
> *
> 
> 
> 
> businessdelegates.UserDelegate
> stateful-class
> false
> 
> 
> businessdelegates.GroupDelegate
> stateful-class
> false
> 
> 
> 
> 
> -Josh
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Ah, what does the unnamed whitelist in the remote-object section
look
> > like? Does it include your Group class? I apologize for not double
> > checking whether it was still a requirement in Flex 1.5, but I know
it
> > was in Flex 1.0.
> > 
> > -Original Message-
> > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, March 28, 2005 4:19 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: Error: Cannot invoke method when using a
VO
> > 
> > 
> > 
> > Peter,
> > 
> > It does... 
> > 
> > -Josh
> > 
> > --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> > wrote:
> > > Does the Java version of Group have a public no args constructor?
> > > 
> > > 
> > > -Original Message-
> > > From: cazzaran [mailto:[EMAIL PROTECTED] 
>

RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread Peter Farland

You can tweak the gateway to give more info by modifying its
configuration file directly. Go to:

/WEB-INF/flex/gateway-config.xml  (not flex-config.xml)

Set Debug level logging for the gateway:

flex.services.logging.FlexGatewayLogger

Check the /WEB-INF/flex/logs/flex.log or simply watch the server console
window if you've enabled console logging for Flex and have launched flex
from the command line rather than as a service. You should see what the
ActionScript Message Format (AMF) deserialized as...

The server side representation of your class has to loosely match the
client types based on what is serialized. While it's true that the Flash
Player might not serialize all of the properties on a client object if
they're undefined, this shouldn't concern the server type as only the
properties sent will be used to initialize your server type.

If your client Group type has a property:

var subGroups:Array;

Then the server type should have:

public void setSubGroups(Group[] gs);

If you still can't get it to work, zip everything up and email it to me
off list.


 

-Original Message-
From: cazzaran [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 5:38 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO



I've set my flex logs to debug, but I don't get much in the way of
logging from flex.

I've also set every trace option to true, but still don't get much
from it.

I'm curious, do my server and client sided classes have to have
identical sets of members (or matching getters and setters)? I ask
this because my server side POJOs have getters that are simply subsets
of internal variables, like getSubGroups which returns a subset of
what getGroups() would. On my client class side, i created a variable
called subGroups:Array so that this information is immediately
available, and is populated with getSubGroups() on the server side.

My question is, does that mean that my server sided class will need a
setSubGroups() since Flex sees this variable on the client side? Or if
it doesn't will the classes still match up with Object.registerClass?

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
wrote:
> Without seeing the AMF trace on the server side, all I can do is
suggest
> simplifying the case step by step and then work up to the problem at
> hand. Try a Group type that only has flash intrinsic types as
> properties... then go down another level... etc.





 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-11 Thread Christoph Guse

Hi cazzaran,

how did you solve your problem? I'm interested in a solution, because I 
have a very similar problem. In my case I have an object (OgoJobVO) in 
which is another object (OgoAccountVO) in which is another object 
(OgoPersonVO).
When I get the Job-Object from the Server, everything works fine. When I 
try to call a function in a POJO where a Job-Object as an argument, I 
get the following error in the NetConnectionDebugger:

Status (object #2)
.code: "Server.Processing"
.description: "Cannot invoke method 'insertJob'."
.details: "The expected argument types are (ogo.OgoJobVO, 
java.lang.String, java.lang.String) but the supplied types were 
(flashgateway.io.ASObject, java.lang.String, java.lang.String) and 
converted to (null, null, null)."
.level: "error"
.type: ""
.rootcause (object #3)
..code: (undefined)
..description: "Type ogo.vo.OgoJobVO not found"
..details: ""
..level: "error"
..type: ""

The call looks like this:
var call = service.insertJob(jobarg,login,password);

I tested the argument jobarg with

if(jobarg instanceof OgoJobVO){
text="type of OgoJobVO";
}
else{
text="is not type of OgoJobVO";
  }
  mx.core.Application.application.debugtext = text;

This returns "type of OgoJobVO".

I really would like to use nested Objects.

I appreciate for any suggestions.

Christoph

cazzaran wrote:

>
> Found it... but it doesn't make total sense...
>
> here's the response trace:
>
> Info: Serializing response
>   (Message #0 targetURI=/1/onStatus, responseURI=null)
> (Object #0)
>   level = "error"
>   code = "Server.Processing"
>   type = ""
>   rootcause = (Object #1)
> level = "error"
> code = null
> type = ""
> details = ""
> description = "Could not set object null on class
> pojos.Group's method setOrganization"
>   details = "The expected argument types are (pojos.Group) but the
> supplied types were (flashgateway.io.ASObject) and converted to (null)."
>   description = "Cannot invoke method 'addGroup'."
>
>
> Below's the serialized request. You can see that the organization IS
> being serialized... I'm not sure why it thinks that the expected
> argument types are Group. The addGroup requires a Group, but the
> Group.setOrganization method takes an Organization. They all have
> _remoteClass assigned, too. Weird...
>
> Info: Deserializing request
>   (Message #0 targetURI=groupDelegate.addGroup, responseURI=/1)
> (Array #0)
>   [0] = (Object #1)
> _flag = "Envelope"
> headers = (Array #2)
>   [0] = (Array #3)
> [0] = "ServiceType"
> [1] = false
> [2] = "stateful-class"
> data = (Array #4)
>   [0] = (Typed Object #5 'pojos.Group')
> organization = (Typed Object #6 'pojos.Organization')
>   _remoteClass = "pojos.Organization"
>   contactNumber = null
>   address1 = null
>   roles = (Array #7)
> [0] = (Typed Object #8 'pojos.Role')
>   roleRights = "a, d, m"
>   users = (Array #9)
>   _remoteClass = "pojos.Role"
>   userRights = "d"
>   groupRights = "a, d, m"
>   name = "Local Message Creator"
>   id = "402881e500523eca0100523ffc040001"
>   organization = (Ref #6)
>   superuser = false
> [1] = (Typed Object #10 'pojos.Role')
>   roleRights = "adm"
>   users = (Array #11)
> [0] = (Typed Object #12 'pojos.User')
>   password = "passger"
>   organizationId = null
>   _remoteClass = "pojos.User"
>   username = "cazzaran"
>   email = "[EMAIL PROTECTED]"
>   role = (Ref #10)
>   roleID = "1"
>   firstName = "Josh"
>   id = "1"
>   organization = (Ref #6) the rest
> truncated
>
>
>
>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> click here 
> 
>  
>
>
>
> 
> *Yahoo! Groups Links*
>
> * To visit your group on the web, go to:
>   http://groups.yahoo.com/group/flexcoders/
>
> * To unsubscribe from this group, send an email to:
>   [EMAIL PROTECTED]
>   
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>   Service .
>
>

-- 
***

Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-11 Thread Dan Tropp









class vo.ApplicantVO implements ValueObject
{
    public static var registered:Boolean = 
        Object.registerClass( "vo.ApplicantVO", ApplicantVO );    
          Do you have a
line like this in your AS class?  
...
}

If you don't register the Java/AS class mapping it defaults to ASObject.

cheers

Dan

Christoph Guse wrote:

Hi cazzaran,
  
how did you solve your problem? I'm interested in a solution, because I
  
have a very similar problem. In my case I have an object (OgoJobVO) in 
which is another object (OgoAccountVO) in which is another object 
(OgoPersonVO).
When I get the Job-Object from the Server, everything works fine. When
I 
try to call a function in a POJO where a Job-Object as an argument, I 
get the following error in the NetConnectionDebugger:
  
Status (object #2)
.code: "Server.Processing"
.description: "Cannot invoke method 'insertJob'."
.details: "The expected argument types are (ogo.OgoJobVO, 
java.lang.String, java.lang.String) but the supplied types were 
(flashgateway.io.ASObject, java.lang.String, java.lang.String) and 
converted to (null, null, null)."
.level: "error"
.type: ""
.rootcause (object #3)
..code: (undefined)
..description: "Type ogo.vo.OgoJobVO not found"
..details: ""
..level: "error"
..type: ""
  
The call looks like this:
    var call = service.insertJob(jobarg,login,password);
  
I tested the argument jobarg with
  
    if(jobarg instanceof OgoJobVO){
    text="type of OgoJobVO";
    }
    else{
    text="is not type of OgoJobVO";
  }
  mx.core.Application.application.debugtext = text;
  
This returns "type of OgoJobVO".
  
I really would like to use nested Objects.
  
I appreciate for any suggestions.
  
Christoph
  
cazzaran wrote:
  
>
> Found it... but it doesn't make total sense...
>
> here's the response trace:
>
> Info: Serializing response
>   (Message #0 targetURI=/1/onStatus, responseURI=null)
> (Object #0)
>   level = "error"
>   code = "Server.Processing"
>   type = ""
>   rootcause = (Object #1)
> level = "error"
> code = null
> type = ""
> details = ""
> description = "Could not set object null on class
> pojos.Group's method setOrganization"
>   details = "The expected argument types are (pojos.Group) but
the
> supplied types were (flashgateway.io.ASObject) and converted to
(null)."
>   description = "Cannot invoke method 'addGroup'."
>
>
> Below's the serialized request. You can see that the organization
IS
> being serialized... I'm not sure why it thinks that the expected
> argument types are Group. The addGroup requires a Group, but the
> Group.setOrganization method takes an Organization. They all have
> _remoteClass assigned, too. Weird...
>
> Info: Deserializing request
>   (Message #0 targetURI=groupDelegate.addGroup, responseURI=/1)
> (Array #0)
>   [0] = (Object #1)
> _flag = "Envelope"
> headers = (Array #2)
>   [0] = (Array #3)
> [0] = "ServiceType"
> [1] = false
> [2] = "stateful-class"
> data = "" #4)
>   [0] = (Typed Object #5 'pojos.Group')
> organization = (Typed Object #6 'pojos.Organization')
>   _remoteClass = "pojos.Organization"
>   contactNumber = null
>   address1 = null
>   roles = (Array #7)
> [0] = (Typed Object #8 'pojos.Role')
>   roleRights = "a, d, m"
>   users = (Array #9)
>   _remoteClass = "pojos.Role"
>   userRights = "d"
>   groupRights = "a, d, m"
>   name = "Local Message Creator"
>   id = "402881e500523eca0100523ffc040001"
>   organization = (Ref #6)
>   superuser = false
> [1] = (Typed Object #10 'pojos.Role')
>   roleRights = "adm"
>   users = (Array #11)
> [0] = (Typed Object #12 'pojos.User')
>   password = "passger"
>   organizationId = null
>   _remoteClass = "pojos.User"
>   username = "cazzaran"
>   email = "[EMAIL PROTECTED]"
>   role = (Ref #10)
>   roleID = "1"
>   firstName = "Josh"
>   id = "1"
>   organization = (Ref #6) the rest
> truncated
>
>
>
>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> click here 
> 
  
>
>
>
>

> *Yahoo! Groups Links*

Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-12 Thread Christoph Guse

Hi Dan, hi cazzaran,

yes, I have such a line in every of my ValueObjects.

But I had errors in the POJO and in the Object.registerClass line. I 
didn't use the fully qualified name of the Java class as first and the 
fully qualified name of the ActionScript class as second argument.
Without these errors everything works, I can send complex VO's to the 
server and they are mapped correctly.

But now the NetConnectionDebugger is less useful becaus it can't show 
the values of my VO's sent to the server and sent from the server. The 
Debugger shows things like this:

Debug-ID: 0
Ereignistyp: "Result"
Film-URL: "http://localhost:8080/ogo-cairn/Index.mxml.swf?debug=true";
Protokoll: "http"
Quelle: "Client"
Zeit: 1113295068216.74
Datum (object #1)
."Tue Apr 12 10:37:48 GMT+0200 2005"
Result (object #2)
.[0]: (undefined)
.[1]: (undefined)
.[10]: (undefined)
.[11]: (undefined)
.[12]: (undefined)
.[13]: (undefined)
.[14]: (undefined)
.[15]: (undefined)
.[16]: (undefined)
.[17]: (undefined)
.[18]: (undefined)
.[19]: (undefined)
.[2]: (undefined)
.[20]: (undefined)
.[21]: (undefined)
.[22]: (undefined)
.[23]: (undefined)
.[24]: (undefined)
.[3]: (undefined)
.[4]: (undefined)
.[5]: (undefined)
.[6]: (undefined)
.[7]: (undefined)
.[8]: (undefined)
.[9]: (undefined)

The results works, but is there a way to make the Debugger show the 
values of my VO's?

Greets
Christoph

Dan Tropp wrote:

>
>
> class vo.ApplicantVO implements ValueObject
> {
> public static var registered:Boolean =
> Object.registerClass( "vo.ApplicantVO", ApplicantVO );   
>   Do you have a 
> line like this in your AS class? 
> ...
> }
>
> If you don't register the Java/AS class mapping it defaults to ASObject.
>
> cheers
>
> Dan
>
> Christoph Guse wrote:
>
>> Hi cazzaran,
>>
>> how did you solve your problem? I'm interested in a solution, because I
>> have a very similar problem. In my case I have an object (OgoJobVO) in
>> which is another object (OgoAccountVO) in which is another object
>> (OgoPersonVO).
>> When I get the Job-Object from the Server, everything works fine. When I
>> try to call a function in a POJO where a Job-Object as an argument, I
>> get the following error in the NetConnectionDebugger:
>>
>> Status (object #2)
>> .code: "Server.Processing"
>> .description: "Cannot invoke method 'insertJob'."
>> .details: "The expected argument types are (ogo.OgoJobVO,
>> java.lang.String, java.lang.String) but the supplied types were
>> (flashgateway.io.ASObject, java.lang.String, java.lang.String) and
>> converted to (null, null, null)."
>> .level: "error"
>> .type: ""
>> .rootcause (object #3)
>> ..code: (undefined)
>> ..description: "Type ogo.vo.OgoJobVO not found"
>> ..details: ""
>> ..level: "error"
>> ..type: ""
>>
>> The call looks like this:
>> var call = service.insertJob(jobarg,login,password);
>>
>> I tested the argument jobarg with
>>
>> if(jobarg instanceof OgoJobVO){
>> text="type of OgoJobVO";
>> }
>> else{
>> text="is not type of OgoJobVO";
>>   }
>>   mx.core.Application.application.debugtext = text;
>>
>> This returns "type of OgoJobVO".
>>
>> I really would like to use nested Objects.
>>
>> I appreciate for any suggestions.
>>
>> Christoph
>>
>> cazzaran wrote:
>>
>> >
>> > Found it... but it doesn't make total sense...
>> >
>> > here's the response trace:
>> >
>> > Info: Serializing response
>> >   (Message #0 targetURI=/1/onStatus, responseURI=null)
>> > (Object #0)
>> >   level = "error"
>> >   code = "Server.Processing"
>> >   type = ""
>> >   rootcause = (Object #1)
>> > level = "error"
>> > code = null
>> > type = ""
>> > details = ""
>> > description = "Could not set object null on class
>> > pojos.Group's method setOrganization"
>> >   details = "The expected argument types are (pojos.Group) but the
>> > supplied types were (flashgateway.io.ASObject) and converted to 
>> (null)."
>> >   description = "Cannot invoke method 'addGroup'."
>> >
>> >
>> > Below's the serialized request. You can see that the organization IS
>> > being serialized... I'm not sure why it thinks that the expected
>> > argument types are Group. The addGroup requires a Group, but the
>> > Group.setOrganization method takes an Organization. They all have
>> > _remoteClass assigned, too. Weird...
>> >
>> > Info: Deserializing request
>> >   (Message #0 targetURI=groupDelegate.addGroup, responseURI=/1)
>> > (Array #0)
>> >   [0] = (Object #1)
>> > _flag = "Envelope"
>> > headers = (Array #2)
>> >   [0] = (Array #3)
>> > [0] = "ServiceType"
>> > [1] = false
>> > [2] = "stateful-class"
>> > data = (Array #4)
>> > 

RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-12 Thread Peter Farland

The NetConnection Debugger is an old FP6 movie that's provided as an extra to 
Flex as old Flash Remoting customers are used to it, but it was not built by or 
for Flex.

I suggest you rely on the RemoteObject AMF Gateway's own trace/debug level 
logging as it will show you the AMF traffic passing through it. To turn this 
on, simply set the logging level to "Debug" in the 
/WEB-INF/flex/gateway-config.xml file and restart your J2EE app. If you start 
your app server from a console window, and have console logging enabled for 
flex, you should see the traffic on screen... alternatively, the traffic will 
appear in the flex log files (obviously only if they're enabled) though 
admittedly this is less useful than seeing it update on the console.

I'm guessing the NCD is struggling to show instances of registered types due to 
a bug in the Flash Player as those instances answer the test "obj == null" as 
true, but not the test "obj === null" as the strict equality operator does not 
attempt to cast operands before comparison.
 

-Original Message-
From: Christoph Guse [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 12, 2005 4:44 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO


Hi Dan, hi cazzaran,

yes, I have such a line in every of my ValueObjects.

But I had errors in the POJO and in the Object.registerClass line. I 
didn't use the fully qualified name of the Java class as first and the 
fully qualified name of the ActionScript class as second argument.
Without these errors everything works, I can send complex VO's to the 
server and they are mapped correctly.

But now the NetConnectionDebugger is less useful becaus it can't show 
the values of my VO's sent to the server and sent from the server. The 
Debugger shows things like this:

Debug-ID: 0
Ereignistyp: "Result"
Film-URL: "http://localhost:8080/ogo-cairn/Index.mxml.swf?debug=true";
Protokoll: "http"
Quelle: "Client"
Zeit: 1113295068216.74
Datum (object #1)
."Tue Apr 12 10:37:48 GMT+0200 2005"
Result (object #2)
.[0]: (undefined)
.[1]: (undefined)
.[10]: (undefined)
.[11]: (undefined)
.[12]: (undefined)
.[13]: (undefined)
.[14]: (undefined)
.[15]: (undefined)
.[16]: (undefined)
.[17]: (undefined)
.[18]: (undefined)
.[19]: (undefined)
.[2]: (undefined)
.[20]: (undefined)
.[21]: (undefined)
.[22]: (undefined)
.[23]: (undefined)
.[24]: (undefined)
.[3]: (undefined)
.[4]: (undefined)
.[5]: (undefined)
.[6]: (undefined)
.[7]: (undefined)
.[8]: (undefined)
.[9]: (undefined)

The results works, but is there a way to make the Debugger show the 
values of my VO's?

Greets
Christoph

Dan Tropp wrote:

>
>
> class vo.ApplicantVO implements ValueObject
> {
> public static var registered:Boolean =
> Object.registerClass( "vo.ApplicantVO", ApplicantVO );   
>   Do you have a 
> line like this in your AS class? 
> ...
> }
>
> If you don't register the Java/AS class mapping it defaults to ASObject.
>
> cheers
>
> Dan
>
> Christoph Guse wrote:
>
>> Hi cazzaran,
>>
>> how did you solve your problem? I'm interested in a solution, because I
>> have a very similar problem. In my case I have an object (OgoJobVO) in
>> which is another object (OgoAccountVO) in which is another object
>> (OgoPersonVO).
>> When I get the Job-Object from the Server, everything works fine. When I
>> try to call a function in a POJO where a Job-Object as an argument, I
>> get the following error in the NetConnectionDebugger:
>>
>> Status (object #2)
>> .code: "Server.Processing"
>> .description: "Cannot invoke method 'insertJob'."
>> .details: "The expected argument types are (ogo.OgoJobVO,
>> java.lang.String, java.lang.String) but the supplied types were
>> (flashgateway.io.ASObject, java.lang.String, java.lang.String) and
>> converted to (null, null, null)."
>> .level: "error"
>> .type: ""
>> .rootcause (object #3)
>> ..code: (undefined)
>> ..description: "Type ogo.vo.OgoJobVO not found"
>> ..details: ""
>> ..level: "error"
>> ..type: ""
>>
>> The call looks like this:
>> var call = service.insertJob(jobarg,login,password);
>>
>> I tested the argument jobarg with
>>
>> if(jobarg instanceof OgoJobVO){
>> text="type of OgoJobVO";
>> }
>> else{

Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-12 Thread Christoph Guse

Hi Peter,

thanks for your answer. I'm using Flex on Linux, how is the approach to 
get a console output?

Christoph

Peter Farland wrote:

> The NetConnection Debugger is an old FP6 movie that's provided as an 
> extra to Flex as old Flash Remoting customers are used to it, but it 
> was not built by or for Flex.
>
> I suggest you rely on the RemoteObject AMF Gateway's own trace/debug 
> level logging as it will show you the AMF traffic passing through it. 
> To turn this on, simply set the logging level to "Debug" in the 
> /WEB-INF/flex/gateway-config.xml file and restart your J2EE app. If 
> you start your app server from a console window, and have console 
> logging enabled for flex, you should see the traffic on screen... 
> alternatively, the traffic will appear in the flex log files 
> (obviously only if they're enabled) though admittedly this is less 
> useful than seeing it update on the console.
>
> I'm guessing the NCD is struggling to show instances of registered 
> types due to a bug in the Flash Player as those instances answer the 
> test "obj == null" as true, but not the test "obj === null" as the 
> strict equality operator does not attempt to cast operands before 
> comparison.
>
>
> -Original Message-
> From: Christoph Guse [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 12, 2005 4:44 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO
>
>
> Hi Dan, hi cazzaran,
>
> yes, I have such a line in every of my ValueObjects.
>
> But I had errors in the POJO and in the Object.registerClass line. I
> didn't use the fully qualified name of the Java class as first and the
> fully qualified name of the ActionScript class as second argument.
> Without these errors everything works, I can send complex VO's to the
> server and they are mapped correctly.
>
> But now the NetConnectionDebugger is less useful becaus it can't show
> the values of my VO's sent to the server and sent from the server. The
> Debugger shows things like this:
>
> Debug-ID: 0
> Ereignistyp: "Result"
> Film-URL: "http://localhost:8080/ogo-cairn/Index.mxml.swf?debug=true";
> Protokoll: "http"
> Quelle: "Client"
> Zeit: 1113295068216.74
> Datum (object #1)
> ."Tue Apr 12 10:37:48 GMT+0200 2005"
> Result (object #2)
> .[0]: (undefined)
> .[1]: (undefined)
> .[10]: (undefined)
> .[11]: (undefined)
> .[12]: (undefined)
> .[13]: (undefined)
> .[14]: (undefined)
> .[15]: (undefined)
> .[16]: (undefined)
> .[17]: (undefined)
> .[18]: (undefined)
> .[19]: (undefined)
> .[2]: (undefined)
> .[20]: (undefined)
> .[21]: (undefined)
> .[22]: (undefined)
> .[23]: (undefined)
> .[24]: (undefined)
> .[3]: (undefined)
> .[4]: (undefined)
> .[5]: (undefined)
> .[6]: (undefined)
> .[7]: (undefined)
> .[8]: (undefined)
> .[9]: (undefined)
>
> The results works, but is there a way to make the Debugger show the
> values of my VO's?
>
> Greets
> Christoph
>
> Dan Tropp wrote:
>
> >
> >
> > class vo.ApplicantVO implements ValueObject
> > {
> > public static var registered:Boolean =
> > Object.registerClass( "vo.ApplicantVO", ApplicantVO );  
> >   Do you have a
> > line like this in your AS class?
> > ...
> > }
> >
> > If you don't register the Java/AS class mapping it defaults to ASObject.
> >
> > cheers
> >
> > Dan
> >
> > Christoph Guse wrote:
> >
> >> Hi cazzaran,
> >>
> >> how did you solve your problem? I'm interested in a solution, because I
> >> have a very similar problem. In my case I have an object (OgoJobVO) in
> >> which is another object (OgoAccountVO) in which is another object
> >> (OgoPersonVO).
> >> When I get the Job-Object from the Server, everything works fine. 
> When I
> >> try to call a function in a POJO where a Job-Object as an argument, I
> >> get the following error in the NetConnectionDebugger:
> >>
> >> Status (object #2)
> >> .code: "Server.Processing"
> >> .description: "Cannot invoke method 'insertJob'."
> >> .details: "The expected argument types are (ogo.OgoJobVO,
> >> java.lang.String, java.lang.String) but the supplied types were
> >> (flashgateway.io.ASObject, java.lang.String, j

RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-12 Thread Peter Farland


1. Stop web application server (which one are you using?)

2. In /WEB-INF/flex/flex-config.xml, set:

logging level to "debug"
enable console logging

3. In /WEB-INF/flex/gateway-config.xml, set:

logging level to "debug"

4. Start web application server on the command line/in a shell

The console logging of the Flex Log (to which the default logger implementation 
of the AMF Gateway redirects) should write out to JAVA's System.out.


 

-Original Message-
From: Christoph Guse [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 12, 2005 12:57 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO


Hi Peter,

thanks for your answer. I'm using Flex on Linux, how is the approach to 
get a console output?

Christoph

Peter Farland wrote:

> The NetConnection Debugger is an old FP6 movie that's provided as an 
> extra to Flex as old Flash Remoting customers are used to it, but it 
> was not built by or for Flex.
>
> I suggest you rely on the RemoteObject AMF Gateway's own trace/debug 
> level logging as it will show you the AMF traffic passing through it. 
> To turn this on, simply set the logging level to "Debug" in the 
> /WEB-INF/flex/gateway-config.xml file and restart your J2EE app. If 
> you start your app server from a console window, and have console 
> logging enabled for flex, you should see the traffic on screen... 
> alternatively, the traffic will appear in the flex log files 
> (obviously only if they're enabled) though admittedly this is less 
> useful than seeing it update on the console.
>
> I'm guessing the NCD is struggling to show instances of registered 
> types due to a bug in the Flash Player as those instances answer the 
> test "obj == null" as true, but not the test "obj === null" as the 
> strict equality operator does not attempt to cast operands before 
> comparison.
>
>
> -Original Message-
> From: Christoph Guse [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 12, 2005 4:44 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO
>
>
> Hi Dan, hi cazzaran,
>
> yes, I have such a line in every of my ValueObjects.
>
> But I had errors in the POJO and in the Object.registerClass line. I
> didn't use the fully qualified name of the Java class as first and the
> fully qualified name of the ActionScript class as second argument.
> Without these errors everything works, I can send complex VO's to the
> server and they are mapped correctly.
>
> But now the NetConnectionDebugger is less useful becaus it can't show
> the values of my VO's sent to the server and sent from the server. The
> Debugger shows things like this:
>
> Debug-ID: 0
> Ereignistyp: "Result"
> Film-URL: "http://localhost:8080/ogo-cairn/Index.mxml.swf?debug=true";
> Protokoll: "http"
> Quelle: "Client"
> Zeit: 1113295068216.74
> Datum (object #1)
> ."Tue Apr 12 10:37:48 GMT+0200 2005"
> Result (object #2)
> .[0]: (undefined)
> .[1]: (undefined)
> .[10]: (undefined)
> .[11]: (undefined)
> .[12]: (undefined)
> .[13]: (undefined)
> .[14]: (undefined)
> .[15]: (undefined)
> .[16]: (undefined)
> .[17]: (undefined)
> .[18]: (undefined)
> .[19]: (undefined)
> .[2]: (undefined)
> .[20]: (undefined)
> .[21]: (undefined)
> .[22]: (undefined)
> .[23]: (undefined)
> .[24]: (undefined)
> .[3]: (undefined)
> .[4]: (undefined)
> .[5]: (undefined)
> .[6]: (undefined)
> .[7]: (undefined)
> .[8]: (undefined)
> .[9]: (undefined)
>
> The results works, but is there a way to make the Debugger show the
> values of my VO's?
>
> Greets
> Christoph
>
> Dan Tropp wrote:
>
> >
> >
> > class vo.ApplicantVO implements ValueObject
> > {
> > public static var registered:Boolean =
> > Object.registerClass( "vo.ApplicantVO", ApplicantVO );  
> >   Do you have a
> > line like this in your AS class?
> > ...
> > }
> >
> > If you don't register the Java/AS class mapping it defaults to ASObject.
> >
> > cheers
> >
> > Dan
> >
> > Christoph Guse wrote:
> >
> >> Hi cazzaran,
> >>
> >> how did you solve your problem? I'm interested in a solution, because I
> >> have a very similar problem. In my case I have an object (OgoJobVO) in
> >> which is another object (OgoAccountVO) in which is another ob

Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-12 Thread Christoph Guse

Hi Peter,

my web application server is Tomcat 5.5.7, Java Version 1.5.0_02. My 
Linux is SuSE 9.2.

I did everything you described. Here the snippet of my flex-config.xml:



debug


  

true


snippet of my gateway-config.xml
flex.services.logging.FlexGatewayLogger

I started Tomcat in /etc/init.d with "sh tomcat5 start". No console output.
I started Tomcat in /srv/tomcat-5.5.7/bin with "sh startup.sh". This is 
the directory where Tomcat is installed. No console output.

Any Ideas?
Christoph

Peter Farland wrote:

>
> 1. Stop web application server (which one are you using?)
>
> 2. In /WEB-INF/flex/flex-config.xml, set:
>
> logging level to "debug"
> enable console logging
>
> 3. In /WEB-INF/flex/gateway-config.xml, set:
>
> logging level to "debug"
>
> 4. Start web application server on the command line/in a shell
>
> The console logging of the Flex Log (to which the default logger 
> implementation of the AMF Gateway redirects) should write out to 
> JAVA's System.out.
>
>
>
>
> -Original Message-
> From: Christoph Guse [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 12, 2005 12:57 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO
>
>
> Hi Peter,
>
> thanks for your answer. I'm using Flex on Linux, how is the approach to
> get a console output?
>
> Christoph
>
> Peter Farland wrote:
>
> > The NetConnection Debugger is an old FP6 movie that's provided as an
> > extra to Flex as old Flash Remoting customers are used to it, but it
> > was not built by or for Flex.
> >
> > I suggest you rely on the RemoteObject AMF Gateway's own trace/debug
> > level logging as it will show you the AMF traffic passing through it.
> > To turn this on, simply set the logging level to "Debug" in the
> > /WEB-INF/flex/gateway-config.xml file and restart your J2EE app. If
> > you start your app server from a console window, and have console
> > logging enabled for flex, you should see the traffic on screen...
> > alternatively, the traffic will appear in the flex log files
> > (obviously only if they're enabled) though admittedly this is less
> > useful than seeing it update on the console.
> >
> > I'm guessing the NCD is struggling to show instances of registered
> > types due to a bug in the Flash Player as those instances answer the
> > test "obj == null" as true, but not the test "obj === null" as the
> > strict equality operator does not attempt to cast operands before
> > comparison.
> >
> >
> > -Original Message-
> > From: Christoph Guse [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 12, 2005 4:44 AM
> > To: flexcoders@yahoogroups.com
> > Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using 
> a VO
> >
> >
> > Hi Dan, hi cazzaran,
> >
> > yes, I have such a line in every of my ValueObjects.
> >
> > But I had errors in the POJO and in the Object.registerClass line. I
> > didn't use the fully qualified name of the Java class as first and the
> > fully qualified name of the ActionScript class as second argument.
> > Without these errors everything works, I can send complex VO's to the
> > server and they are mapped correctly.
> >
> > But now the NetConnectionDebugger is less useful becaus it can't show
> > the values of my VO's sent to the server and sent from the server. The
> > Debugger shows things like this:
> >
> > Debug-ID: 0
> > Ereignistyp: "Result"
> > Film-URL: "http://localhost:8080/ogo-cairn/Index.mxml.swf?debug=true";
> > Protokoll: "http"
> > Quelle: "Client"
> > Zeit: 1113295068216.74
> > Datum (object #1)
> > ."Tue Apr 12 10:37:48 GMT+0200 2005"
> > Result (object #2)
> > .[0]: (undefined)
> > .[1]: (undefined)
> > .[10]: (undefined)
> > .[11]: (undefined)
> > .[12]: (undefined)
> > .[13]: (undefined)
> > .[14]: (undefined)
> > .[15]: (undefined)
> > .[16]: (undefined)
> > .[17]: (undefined)
> > .[18]: (undefined)
> > .[19]: (undefined)
> > .[2]: (undefined)
> > .[20]: (undefined)
> > .[21]: (undefined)
> > .[22]: (undefined)
> > .[23]: (undefined)
> > .[24]: (undefined)
> > .[3]: (undefined)
> > .

RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-12 Thread Peter Farland

Unfortunately it seems Tomcat decided it would be best to redirect System.out 
to catalina.out

http://jakarta.apache.org/tomcat/faq/logging.html#catalina.out
 
I suggest you tail -f the Flex log, which should be in 
/WEB-INF/flex/logs/flex.log by default (and turn off console logging as there's 
no need to duplicate output), to watch as entries are written to the file... it 
should get you effectively the same experience as console logging.



-Original Message-
From: Christoph Guse [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 12, 2005 2:34 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO


Hi Peter,

my web application server is Tomcat 5.5.7, Java Version 1.5.0_02. My 
Linux is SuSE 9.2.

I did everything you described. Here the snippet of my flex-config.xml:



debug


  

true


snippet of my gateway-config.xml
flex.services.logging.FlexGatewayLogger

I started Tomcat in /etc/init.d with "sh tomcat5 start". No console output.
I started Tomcat in /srv/tomcat-5.5.7/bin with "sh startup.sh". This is 
the directory where Tomcat is installed. No console output.

Any Ideas?
Christoph

Peter Farland wrote:

>
> 1. Stop web application server (which one are you using?)
>
> 2. In /WEB-INF/flex/flex-config.xml, set:
>
> logging level to "debug"
> enable console logging
>
> 3. In /WEB-INF/flex/gateway-config.xml, set:
>
> logging level to "debug"
>
> 4. Start web application server on the command line/in a shell
>
> The console logging of the Flex Log (to which the default logger 
> implementation of the AMF Gateway redirects) should write out to 
> JAVA's System.out.
>
>
>
>
> -Original Message-
> From: Christoph Guse [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 12, 2005 12:57 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO
>
>
> Hi Peter,
>
> thanks for your answer. I'm using Flex on Linux, how is the approach to
> get a console output?
>
> Christoph
>
> Peter Farland wrote:
>
> > The NetConnection Debugger is an old FP6 movie that's provided as an
> > extra to Flex as old Flash Remoting customers are used to it, but it
> > was not built by or for Flex.
> >
> > I suggest you rely on the RemoteObject AMF Gateway's own trace/debug
> > level logging as it will show you the AMF traffic passing through it.
> > To turn this on, simply set the logging level to "Debug" in the
> > /WEB-INF/flex/gateway-config.xml file and restart your J2EE app. If
> > you start your app server from a console window, and have console
> > logging enabled for flex, you should see the traffic on screen...
> > alternatively, the traffic will appear in the flex log files
> > (obviously only if they're enabled) though admittedly this is less
> > useful than seeing it update on the console.
> >
> > I'm guessing the NCD is struggling to show instances of registered
> > types due to a bug in the Flash Player as those instances answer the
> > test "obj == null" as true, but not the test "obj === null" as the
> > strict equality operator does not attempt to cast operands before
> > comparison.
> >
> >
> > -Original Message-
> > From: Christoph Guse [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 12, 2005 4:44 AM
> > To: flexcoders@yahoogroups.com
> > Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using 
> a VO
> >
> >
> > Hi Dan, hi cazzaran,
> >
> > yes, I have such a line in every of my ValueObjects.
> >
> > But I had errors in the POJO and in the Object.registerClass line. I
> > didn't use the fully qualified name of the Java class as first and the
> > fully qualified name of the ActionScript class as second argument.
> > Without these errors everything works, I can send complex VO's to the
> > server and they are mapped correctly.
> >
> > But now the NetConnectionDebugger is less useful becaus it can't show
> > the values of my VO's sent to the server and sent from the server. The
> > Debugger shows things like this:
> >
> > Debug-ID: 0
> > Ereignistyp: "Result"
> > Film-URL: "http://localhost:8080/ogo-cairn/Index.mxml.swf?debug=true";
> > Protokoll: "http"
> > Quelle: "Client"
> > Zeit: 1113295068216.74
> > Datum (object #1)
> > ."Tue Apr 12 10:37:48 GMT+0200 2005"
> &

Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-13 Thread Christoph Guse

Hi Peter,

I decided to use tail -f catalina.out, which works fine for me. tail -f 
flex.log didn't work, I forgot to mention this in the last mail.
The NCD is nicer to use than cosole logging. Perhaps there is an 
appropriate tool in the next Flex version.

Greets
Christoph

Peter Farland wrote:

> Unfortunately it seems Tomcat decided it would be best to redirect 
> System.out to catalina.out
>
> http://jakarta.apache.org/tomcat/faq/logging.html#catalina.out
>
> I suggest you tail -f the Flex log, which should be in 
> /WEB-INF/flex/logs/flex.log by default (and turn off console logging 
> as there's no need to duplicate output), to watch as entries are 
> written to the file... it should get you effectively the same 
> experience as console logging.
>
>
>
> -Original Message-
> From: Christoph Guse [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 12, 2005 2:34 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using a VO
>
>
> Hi Peter,
>
> my web application server is Tomcat 5.5.7, Java Version 1.5.0_02. My
> Linux is SuSE 9.2.
>
> I did everything you described. Here the snippet of my flex-config.xml:
> 
> 
> 
> debug
>
> 
>  
> 
> true
> 
>
> snippet of my gateway-config.xml
> flex.services.logging.FlexGatewayLogger
>
> I started Tomcat in /etc/init.d with "sh tomcat5 start". No console 
> output.
> I started Tomcat in /srv/tomcat-5.5.7/bin with "sh startup.sh". This is
> the directory where Tomcat is installed. No console output.
>
> Any Ideas?
> Christoph
>
> Peter Farland wrote:
>
> >
> > 1. Stop web application server (which one are you using?)
> >
> > 2. In /WEB-INF/flex/flex-config.xml, set:
> >
> > logging level to "debug"
> > enable console logging
> >
> > 3. In /WEB-INF/flex/gateway-config.xml, set:
> >
> > logging level to "debug"
> >
> > 4. Start web application server on the command line/in a shell
> >
> > The console logging of the Flex Log (to which the default logger
> > implementation of the AMF Gateway redirects) should write out to
> > JAVA's System.out.
> >
> >
> >
> >
> > -Original Message-
> > From: Christoph Guse [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 12, 2005 12:57 PM
> > To: flexcoders@yahoogroups.com
> > Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using 
> a VO
> >
> >
> > Hi Peter,
> >
> > thanks for your answer. I'm using Flex on Linux, how is the approach to
> > get a console output?
> >
> > Christoph
> >
> > Peter Farland wrote:
> >
> > > The NetConnection Debugger is an old FP6 movie that's provided as an
> > > extra to Flex as old Flash Remoting customers are used to it, but it
> > > was not built by or for Flex.
> > >
> > > I suggest you rely on the RemoteObject AMF Gateway's own trace/debug
> > > level logging as it will show you the AMF traffic passing through it.
> > > To turn this on, simply set the logging level to "Debug" in the
> > > /WEB-INF/flex/gateway-config.xml file and restart your J2EE app. If
> > > you start your app server from a console window, and have console
> > > logging enabled for flex, you should see the traffic on screen...
> > > alternatively, the traffic will appear in the flex log files
> > > (obviously only if they're enabled) though admittedly this is less
> > > useful than seeing it update on the console.
> > >
> > > I'm guessing the NCD is struggling to show instances of registered
> > > types due to a bug in the Flash Player as those instances answer the
> > > test "obj == null" as true, but not the test "obj === null" as the
> > > strict equality operator does not attempt to cast operands before
> > > comparison.
> > >
> > >
> > > -Original Message-
> > > From: Christoph Guse [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, April 12, 2005 4:44 AM
> > > To: flexcoders@yahoogroups.com
> > > Subject: Re: [flexcoders] Re: Error: Cannot invoke method when using
> > a VO
> > >
> > >
> > > Hi Dan, hi cazzaran,
> > >
> > > yes, I have such a line in every of my ValueObjects.
> > >
> > > But I had errors in the POJO and in the Object.registerClass li

RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread Peter Farland


The Object.registerClass looks correct - but, your Group object isn't as
simple as I thought. I imagine the Organization class also needs to be
registered and availabe on the Java side too. Is that class registered?
Does it have a public no args constructor? ... and so forth.


Note: While it is used to try and achieve a similar result, _remoteClass
isn't from the Object.registerClass (it's likely the server has added
this for the case where users have forgotten Object.registerClass and
the RemoteObject responder tries to create its own instance of the type
for you... this is much slower than if you had used Object.registerClass
as the player can do this natively for you much faster). _remoteClass
was introduced to support RemoteObject via SOAP in Flex 1.0. The SOAP
transport protocol was removed for RemoteObject in Flex 1.5. I'd like to
see all Flex users move away from _remoteClass and rely on
Object.registerClass.
 

-Original Message-
From: cazzaran [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 3:31 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO



WHat's interesting, is if you look at the below code, I have an array
of Groups, called subGroups. This is populated with objects of the
type Group, so that would seem to mean that Flex is typing them
correctly, at least when they come FROM the server if I create a
new object of this type and send it TO my server, it seems to not be
correct.

What's also weird, is if I inspect an object using debug, all the
Groups in the subGroups array have _remoteClass set, even though I
didn't specify it. This is due to the Object.registerClass I assume,
but when I instantiate a new Group(), that object lacks this variable.
It seems like it's being typed wrong from the client side. Am I
interpreting this correctly?

Here's what my Group.as code looks like:

class pojos.Group {
   public static var regClass = Object.registerClass("pojos.Group",
pojos.Group);
  public var id:String;
  public var name:String;
  public var organization:Organization;
  public var superGroup:Group;
  public var subGroups:Array;

function Group() {}

public function get data() {
return id;
}

  //... some getters and business methods
}

--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
wrote:
> Have you posted the Object.registerClass line of code in this thread
> yet? I've not yet seen it, but it must not be registered correctly or
> the class not linked in at compile time to match the registration as
the
> player would send an instance of Group.
> 
> All objects go over the wire as ASObjects, but they may include type
> information if they're registered.  The raw representation of an
> ASObject on the server side is a HashMap. It's the server side part of
> RemoteObject that knows how to map ASObject -> Group before invoking
> your method.
> 
> Since you're not having any luck with Flex Builder, did you try what I
> suggested using the NetConnectionDebugger.swf (which ships in the
extras
> folder of the Flex 1.5 install) with remote-objects debug enabled (it
> doesn't have anything to do with Flex Builder)? If that's not suitable
> then you could use the gateway debug level logging approach on the
> server. I'd prefer you to try the server gateway logging approach
anyway
> as we want to see whether an AMF Typed Object or untyped Object was
> deserialized from your Group param.
> 
> 
> -Original Message-
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 30, 2005 2:12 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> I turned on remote object debugging, but it seems to make my
> flexbuilder unresponsive. After a while, builder says that I should
> abort the script or it will make my machine lock up. If I set remote
> object debug to false and restart the server, this no longer happens.
> 
> But I think I found the issue anyway; it seems that for some reason,
> the Group isn't being sent over the wire as a Group, even though I
> have the Object.registerClass correct. Also, when I get an array of
> Groups from my server, they are correct. 
> 
> But it seems that in my client class, when I do:
> 
> var group:Group = new Group();
> group.name = "test";
> remoteDelegate.addGroup(group);
> 
> it gives me that "can't invoke method error", because it's not a Group
> POJO, it's just a hashmap. Why is this happening?
> 
> 
> --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Have you managed to turn on debu

RE: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-03-30 Thread Peter Farland

Without seeing the AMF trace on the server side, all I can do is suggest
simplifying the case step by step and then work up to the problem at
hand. Try a Group type that only has flash intrinsic types as
properties... then go down another level... etc.


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/