[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    Re: [groovy-user] weird groovy java reference interaction
From:       Jochen Theodorou <blackdrag () gmx ! org>
Date:       2014-01-30 12:04:26
Message-ID: 52EA3FCA.4000002 () gmx ! org
[Download RAW message or body]

Can you please show the exception message and maybe the first 10 lines 
of the exception trace?

Am 30.01.2014 00:40, schrieb Mike Jackson:
> I've got some code executed in a spring based java application which is
> acting rather strangely.  It looks something like this:
>
> Fubar f  = webService.findFubar(...)
> if (f) {
>    DtoObject result = service.get(f, "a string based id")
>    // do some other stuff
> }
>
> The Fubar class is a pojo written in java.  The the web services is a
> CXF based client, dynamically generated at runtime using the spring/cxf
> integration.  The service is a normal java class following the typical
> spring pattern of an interface and an implementation.  The code being
> executed is in a groovy class instantiated by spring's factory and the
> java service is injected.  There's nothing  out of the ordinary that I
> can think of being done in here.
>
> The service.get class in the interface is pretty straight forward, namely:
>
> DtoObject get(Fubar f, String id)
>
> What I'm getting, instead of the DtoObject I'd expect, is a exception
> stating that groovy appears to be unable to find the appropriate method
> to call based in the input parameters.  Instead of passing an object of
> the class Fubar it appears to be passing a Groovy Reference instead.
>   The "f" object appear in my IDE debugger is shown as a groovy
> reference wrapping the appropriate object type  for the second web
> service's method call, yet I still get the exception.  I do have other
> places where I do the same kind of thing and the wrapped references
> appear to be being passed correctly, but not here for some reason.
>
> --mike
> -=-----
> mike jackson
> This message encrypted in Double-ROT-13 for your safety and security.
>


-- 
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic