Error in latest from Github?

24 views
Skip to first unread message

jax

unread,
Aug 24, 2012, 9:57:00 AM8/24/12
to coldspri...@googlegroups.com
Hi,

ran into this:

You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members.

 
The error occurred in coldspring/core/reflect/Class.cfc: line 443

This code:

for(key in meta.implements)
        {
and indeed, some debugging showed meta.implements returned a string (with the name of the interface) on 1 of my beans..

I wrapped the above for loop in a condition (isstruct), to fix it but nout sure what the consequences are :)  

(Running ACF 9.01  

Cheers.




Mark Mandel

unread,
Aug 24, 2012, 10:07:22 AM8/24/12
to coldspri...@googlegroups.com

Can you provide a test case?

Sent from my mobile doohickey.

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/HHKG7-Bkx_QJ.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.

jax

unread,
Aug 24, 2012, 10:10:40 AM8/24/12
to coldspri...@googlegroups.com
To be clear, changed things into this :

if (isStruct(meta.implements)){
for(key in meta.implements)
{
//this is because CF can't work this stuff out 100% all the time.
name = key;
if(Len(name) < Len(meta.implements[key].name))
{
name = meta.implements[key].name;
}

arrayAppend(interfaces, getReflectionService().loadClass(name));
}
}else is(isSimpleValue(meta.implements)){ {
arrayAppend(interfaces, getReflectionService().loadClass(meta.implements));
}

cheers.

Mark Mandel

unread,
Aug 24, 2012, 10:13:31 AM8/24/12
to coldspri...@googlegroups.com
Yes - but can you provide a test that highlights the issue please.

I'm not seeing the problem in my unit tests, and there are plenty of beans that only inherit from a single bean - so I'm curious what is causing the error.

Also without a test, I can't say definitively if it there are other issues lurking.

Mark

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/6YIREuPxVQQJ.

To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.

Mark Mandel

unread,
Aug 24, 2012, 10:14:11 AM8/24/12
to coldspri...@googlegroups.com
Should have read:
there are plenty of beans that only implement from a single interfeace

(late night, tired)

Thanks!

Mark


On Sat, Aug 25, 2012 at 12:13 AM, Mark Mandel <mark....@gmail.com> wrote:
there are plenty of beans that only inherit from a single bean



jax

unread,
Aug 24, 2012, 10:19:26 AM8/24/12
to coldspri...@googlegroups.com
:) No worries,

Can I email you a zip of my project?  

Mark Mandel

unread,
Aug 24, 2012, 10:22:48 AM8/24/12
to coldspri...@googlegroups.com

If at ask possible, please provide me with just the bare minimum of what causes the error.

If it's a unit test, even better. (Our even a unit test, plus fix with a pull request on GitHub)

Thanks!

Mark

Sent from my mobile doohickey.

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/lz3FJIQb6GwJ.

jax

unread,
Aug 24, 2012, 10:29:41 AM8/24/12
to coldspri...@googlegroups.com

All right,  I'll run the unit tests here first, will get back later.  (might be Monday :-)

Have a good night and weekend.

Cheers

Mark Mandel

unread,
Aug 24, 2012, 6:44:47 PM8/24/12
to coldspri...@googlegroups.com
Oh - another dumb question. This from the develop branch or master?

Mark

jax

unread,
Aug 28, 2012, 5:18:35 AM8/28/12
to ColdSpring-Users
Ok, here's an update:

First of all: I can suddenly no longer reproduce the error. I saw it
flashing by once more this morning but after that all of a sudden
things seems peachy. This is of course because of *something* I did/
change but I have retraced all of my steps and can not single out what
caused it..
I will test things again on a different system later this week so will
report back then..

I also ran all unit tests (bitch to get it to work..) , and they all
passed accept for one.
The testSortEmptyArray test in unittests.util.CollectionTest faulted
with the error: Cannot compare array references in ColdFusion::Arrays
in ColdFusion are passed by value. To compare instances, you may wrap
the array in a struct and compare those.

And finally, It was the master, not a branch.

Cheers.


On Aug 25, 12:44 am, Mark Mandel <mark.man...@gmail.com> wrote:
> Oh - another dumb question. This from the develop branch or master?
>
> Mark
>
>
>
>
>
>
>
>
>
> On Sat, Aug 25, 2012 at 12:29 AM, jax <real...@gmail.com> wrote:
> > All right,  I'll run the unit tests here first, will get back later.
> > (might be Monday :-)
>
> > Have a good night and weekend.
>
> > Cheers
> > On Aug 24, 2012 4:22 PM, "Mark Mandel" <mark.man...@gmail.com> wrote:
>
> >> If at ask possible, please provide me with just the bare minimum of what
> >> causes the error.
>
> >> If it's a unit test, even better. (Our even a unit test, plus fix with a
> >> pull request on GitHub)
>
> >> Thanks!
>
> >> Mark
>
> >> Sent from my mobile doohickey.
> >> On Aug 25, 2012 12:19 AM, "jax" <real...@gmail.com> wrote:
>
> >>> :) No worries,
>
> >>> Can I email you a zip of my project?
>
> >>> On Friday, August 24, 2012 4:14:11 PM UTC+2, Mark Mandel wrote:
>
> >>>> Should have read:
> >>>> there are plenty of beans that only *implement* from a single *
> >>>> interfeace*
> >>>> *
> >>>> *
> >>>> (late night, tired)
>
> >>>> Thanks!
>
> >>>> Mark
>
> >>>> On Sat, Aug 25, 2012 at 12:13 AM, Mark Mandel <mark....@gmail.com>wrote:
>
> >>>>> there are plenty of beans that only inherit from a single bean
>
> >>>> --
> >>>> E: mark....@gmail.com
> >>>> T:http://www.twitter.com/**neurotic<http://www.twitter.com/neurotic>
> E: mark.man...@gmail.com

Mark Mandel

unread,
Aug 28, 2012, 5:37:11 AM8/28/12
to coldspri...@googlegroups.com
On Tue, Aug 28, 2012 at 7:18 PM, jax <rea...@gmail.com> wrote:
Ok, here's an update:

First of all: I can suddenly no longer reproduce the error. I saw it
flashing by once more this morning but after that all of a sudden
things seems peachy. This is of course because of *something* I did/
change but I have retraced all of my steps and can not single out what
caused it..
I will test things again on a different system later this week so will
report back then..

Sounds weird. But okay. Wonder if it was CF doing weird stuff to metadata. It can definitely do that.
 

I also ran all unit tests (bitch to get it to work..) , and they all
passed accept for one.

Stupid question, there is this guide:

Can it be improved?
 
The testSortEmptyArray test in unittests.util.CollectionTest  faulted
with the error: Cannot compare array references in ColdFusion::Arrays
in ColdFusion are passed by value. To compare instances, you may wrap
the array in a struct and compare those.

Make sure you have the latest mxunit.. I think it has my fix in that for it. I should go double check.
 

And finally, It was the master, not a branch.

Develop has the latest code, although I don't think there are any changes around the Class objects and/or metadata parsing.
 
Thanks!

Now I need to get the new feature documentation into the trac wiki, and CS2 can be released.

Mark

--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic

jax

unread,
Aug 28, 2012, 7:51:23 AM8/28/12
to ColdSpring-Users

> > I also ran all unit tests (bitch to get it to work..) , and they all
> > passed accept for one.
>
> Stupid question, there is this guide:http://sourceforge.net/apps/trac/coldspring/wiki/Collaboration#Settin...
>
> Can it be improved?

Ah, of course I never read that part o the wiki. :)
And no, what is said there is exactly what needs to be done to set it
up,
I initially kept on strugling with the mxunit plugin in CFbuilder. And
it still doesn't work through that plugin.


> > The testSortEmptyArray test in unittests.util.CollectionTest  faulted
> > with the error: Cannot compare array references in ColdFusion::Arrays
> > in ColdFusion are passed by value. To compare instances, you may wrap
> > the array in a struct and compare those.
>
> Make sure you have the latest mxunit.. I think it has my fix in that for
> it. I should go double check.

I'm running MXunit 2.0.3

Thanks for all your help!

Mark Mandel

unread,
Aug 28, 2012, 8:00:12 AM8/28/12
to coldspri...@googlegroups.com
I initially kept on strugling with the mxunit plugin in CFbuilder. And
it still doesn't work through that plugin.

Not shocked. I live in IntelliJ, so I've never really tested it the Eclipse plugin.
 

> Make sure you have the latest mxunit.. I think it has my fix in that for
> it. I should go double check.

I'm running MXunit  2.0.3

Ah - current version is 2.1.2. Time for an update! :)

Thanks!

Mark

jax

unread,
Aug 28, 2012, 8:05:47 AM8/28/12
to ColdSpring-Users

> Ah - current version is 2.1.2. Time for an update! :)

Right.. turns out I *am* running 2.1.2 ..
MXunits README.txt erroneously still reports 2.0.3. Sorry about
that.

Mark Mandel

unread,
Aug 28, 2012, 8:07:03 AM8/28/12
to coldspri...@googlegroups.com
Strange. I swear I put in that fix...

I should look into that.

Mark

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.

Mark Mandel

unread,
Aug 28, 2012, 8:08:30 AM8/28/12
to coldspri...@googlegroups.com
Looks like I did..

I guess I should grab the latest and make sure it works too! :)

Mark
Reply all
Reply to author
Forward
0 new messages