Exception Type: Expression | Message: Element oPropertyThatIsAnObject
is undefined in a Java object of type class [Ljava.lang.String;. |
Detail: | (error code: ) |
The method in the ORM object that is causing the exception is doing
something like this:
public SomeNewObject function toLTO(){
//create the appropiate bundled object
local.oSomeNewObject =
createObject("component","SomeNewObject").init();
//get the properties out of the ORM object
local.oSomeNewObject.prop1 = getProp1();
local.oSomeNewObject.prop2 = getProp3();
local.oSomeNewObject.prop3 = getProp4();
//prop5 is an another ORM object
local.oPropertyThatIsAnObject = getProp5();
//writeDump(local.oPropertyThatIsAnObject);abort; - good here...have
the right object
//commenting out the next 3 lines will stop the
exception when running the mxunit test
local.oSomeNewObject.prop5 =
local.oPropertyThatIsAnObject.getProp5();
local.oSomeNewObject.prop6 =
local.oPropertyThatIsAnObject.getProp6();
local.oSomeNewObject.prop7 =
local.oPropertyThatIsAnObject.getProp7();
local.oSomeNewObject
}
The only other thing to note is that the mxunit directory is not in
the application's directory but is available through a Apache
mapping....not sure if that would be causing the exception.
let me know if that solves your problems.
Marc
> --
> You received this message because you are subscribed to the Google Groups "mxunit" group.
> To post to this group, send email to mxu...@googlegroups.com.
> To unsubscribe from this group, send email to mxunit+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mxunit?hl=en.
>
>
On Apr 15, 12:28 pm, Marc Esher <marc.es...@gmail.com> wrote:
> Do you have a custom RemoteFacade for your project in Eclipse? If not,
> you'll need one. IT's in the Help documentation, which you can access
> by clicking the green help icon on the MXUnit view.
>
> let me know if that solves your problems.
>
> Marc
>
I'm no ORM expert, but it looks to me like your ORM
object-that-is-a-property simply isn't being loaded.
what happens if you write a scratch CFM page under your app, and try
to do what you're doing?
I wonder if adding an MXUnit CFML mapping would solve it.
Mappings can be strange beasts.
May The Force be with you!
:den
--
Eddie Valiant: You mean you could've taken your hand out of that cuff
at any time?
Roger Rabbit: No, not at any time, only when it was funny
ugggg, sorry... I see you already tried that. my bad
On Apr 15, 1:20 pm, Marc Esher <marc.es...@gmail.com> wrote:
OK, One more debugging thing. Sorry, I can't reproduce this myself
while I'm at work, otherwise I would. So I kind of have to think about
what are the ways I debug this stuff.
Can you go into mxunit and find RemoteFacadeTester.cfm
Open it and replace "mycomponent", "myfunction", and "remoteurl" with
the values for your test component, the test function, and your
remotefacade URL, respectively. The point here isn't to test the
remote url stuff; rather, the point is to see if there's a difference
between running the test component in three different ways. Because
I'm thinking to myself, "what would cause the implicit getters to not
work if the object is indeed loaded?" and the answers I'm honing in on
have to do with the method in which the component is run, i.e. as a
webservice vs. a normal old request/response.
thanks.
marc
Are you using your custom remoteFacade when you're hitting the URL, or
the old MXUnit one you were probably using to begin with?
It seems like an Application.cfc type deal going on, neh?
:Den
--
Jessica Rabbit: Roger, darling. I want you to know I love you. I've
loved you more than any woman's ever loved a rabbit.
Doesn't sound like it to me, Denny. If that were the case, his
original ORM object wouldn't load at all. The problem is in the
composed ORM object
>
> :Den
>
> --
> Jessica Rabbit: Roger, darling. I want you to know I love you. I've
> loved you more than any woman's ever loved a rabbit.
>
If the original object was loaded, wouldn't it NOT be a string? :
Exception Type: Expression | Message: Element oPropertyThatIsAnObject
is undefined in a Java object of type class [Ljava.lang.String;. |
Detail: | (error code: ) |
Seems like a classic deal of when you /think/ you are getting back
something, but really it's empty.
Or perhaps a scoping deal. The "local" scope is sorta funky now, neh?
Or maybe the ORM session is funky?
I'm playing with Railo's ORM stuff now, and I've got CF9 in my CI
deal, so if Peter wants to write up a test case, I can take it for a
spin and see...
:denny
--
Eddie Valiant: Freeway? What the hell's a freeway?
Judge Doom: Eight lanes of shimmering cement running from here to
Pasadena. Smooth, safe, fast. Traffic jams will be a thing of the past
running test directly - ORM is not enabled for the current application
running test through test suite - ORM is not enabled for the current
application
running test through remote facade - the original error I have been
receiving
On Apr 15, 2:12 pm, Marc Esher <marc.es...@gmail.com> wrote:
ah, sorry, missed a step: copy that file and run it under your
application... that's why you're getting the first two errors.
component persistent="true" table="Item" {
property name="id" column="id" fieldtype="id" generator="native"
setter="false";
property name="description" column="description";
property name="sortOrder" column="sortOrder";
property name="item2" fieldtype="many-to-one" inverse="true"
cfc="Item2" fkcolumn="item2Id";
public CompItem function toLTO(){
local.oCompItem = createObject("component","CompItem").init();
local.oCompItem.itemId = getId();
local.oCompItem.description = getDescription();
local.oCompItem.sortOrder = getSortOrder();
local.oItem2 = getItem2();
//writeDump(local.oItem2);abort;
local.oCompItem.item2Id = local.oItem2.getId();
local.oCompItem.item2Description = local.oItem2.getDescription();
local.oCompItem.item2SortOrder =local.oItem2.getSortOrder();
return local.oCompItem;
On Apr 15, 3:05 pm, Marc Esher <marc.es...@gmail.com> wrote:
What happens when you do the dump further down?
local.oPropertyThatIsAnObject = getProp5();
//writeDump(local.oPropertyThatIsAnObject);abort; - good
here...havethe right object
//commenting out the next 3 lines will stop the exception when running
the mxunit test
local.oSomeNewObject.prop5 = local.oPropertyThatIsAnObject.getProp5();
writeDump(local.oPropertyThatIsAnObject.getProp5());
writeDump(local.oSomeNewObject);abort;
A step debugger would be handy here, I reckon. :)
> I'll provide a sample ORM component...not sure if that will be
> helpful.
I was hoping for a ready-made example zip. :)
It's enough tho. I'll work this into what I'm doing with the ORM
stuff and see what happens. Prolly won't have any results for a
whiles tho.
:denny
--
Angelo: Hey, I seen a rabbit.
[Roger gasps]
Eddie Valiant: Ya see?
Judge Doom: Where?
Angelo: He's right here in the bar.
[puts his arm around Harvey the Invisible Rabbit]
Angelo: Say hello... Harvey.
[the whole bar erupts in laughter]
Roger Rabbit: I told you so.
But how is it possible that it worked in the simple cfm file but not
mxunit? that's what I don't understand.
Marc
On Apr 15, 4:10 pm, Marc Esher <marc.es...@gmail.com> wrote:
Woohoo!
No need to apologize, BTW, that's what the list is here for.
There's just going to be more ORM related stuff in the future, so us
getting hip to troubleshooting it is probably not time wasted. :)
:Den
--
Eddie Valiant: One too many refrigerators dropped on his head?
R.K. Maroon: Nah, he's a toon. You can drop anything you want on his
head, he'll shake it off. But break his heart, goes to pieces just
like you and me.