Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Interface coldspring.aop.MethodIntercept or cannot extend the component coldspring.aop.Advice.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
marc  
View profile   Translate to Translated (View Original)
 More options Jul 9 2012, 5:03 pm
From: marc <marc.at.comp...@gmail.com>
Date: Mon, 9 Jul 2012 14:03:17 -0700 (PDT)
Local: Mon, Jul 9 2012 5:03 pm
Subject: Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.
Hi,

I use CS 2.0 and a modified MG version based on 3.2.439 by Chris
Blackwell.

When I try out AOP I get an error (see subject). I switched the
frameworks - from CS 2.0 back to CS1.2 and also to a stock MG and it
worked fine (at least I didn't get an error as soon as I made a
request to my app). Back to CS 2.0 and the modified MG. I even
restarted the CF 9.0.1 server but that made no difference, still got
the error

This is my Coldspring.xml

        <bean id="remotePageService"
class="coldspring.aop.framework.RemoteFactoryBean" lazy-init="false">
                <property name="target">
                        <ref bean="pageService" />
                </property>
                <property name="serviceName">
                        <value>remotePageService</value>
                </property>
                <property name="relativePath">
                        <value>/ws</value>
                </property>
                <property name="remoteMethodNames">
                        <value>list</value>
                </property>
                <property name="beanFactoryName">
                        <value>beanfactory</value>
                </property>
                <property name="interceptorNames">
                        <list>
                                <value>listAdvisor</value>
                        </list>
                </property>
        </bean>

        <!-- AOP -->
        <bean id="listAroundAdvice"
class="Application.Model.AOP.listAroundAdvice" />
        <bean id="listAdvisor"
class="coldspring.aop.support.NamedMethodPointcutAdvisor">
                <property name="advice">
                        <ref bean="listAroundAdvice" />
                </property>
                <property name="mappedNames"><value>list</value></property>
        </bean>

This is the advice Application.Model.AOP.listAroundAdvice:

<cfcomponent output="false" name="listAroundAdvice"
extends="coldspring.aop.MethodInterceptor">
[...]
<cfcomponent >

This is the error plus stack trace:

Interface coldspring.aop.MethodInterceptor cannot extend the component
coldspring.aop.Advice.
ColdFusion interface cannot extend ColdFusion component.

The error occurred in H:\www\CMS\Frameworks\Coldspring\core\reflect
\Class.cfc: line 43
Called from H:\www\CMS\Frameworks\Coldspring\core\reflect
\ReflectionService.cfc: line 46
Called from H:\www\CMS\Frameworks\Coldspring\beans\support
\CFCBeanDefinition.cfc: line 71
Called from H:\www\CMS\Frameworks\Coldspring\beans
\BeanDefinitionRegistry.cfc: line 78
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 198
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 93
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 61
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 52
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 33
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 184
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 51
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 195
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 206
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\ModelGlue.cfm:
line 81
Called from H:\www\CMS\wwwroot\index.cfm: line 41

41 :            var builder = 0;
42 :            var reflectionService =
getComponentMetaData("coldspring.core.reflect.ReflectionService").singleton .instance;
43 :            var meta = getComponentMetadata(arguments.className);
44 :
45 :            //builder.setLength(builder.lastIndexOf(".")); << CF8 fails on
this because it can't resolve Java Methods. Grrr.

Hope somebody can shed some light on this...

Marc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile   Translate to Translated (View Original)
 More options Jul 9 2012, 5:07 pm
From: Mark Mandel <mark.man...@gmail.com>
Date: Tue, 10 Jul 2012 07:07:22 +1000
Local: Mon, Jul 9 2012 5:07 pm
Subject: Re: [coldspring-users] Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.

It looks a lot like your server doesn't know which ColdSpring it is using.
How are your mappings / directory structure look like?

What does your listAroundAdvice look like?

Mark

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

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marc  
View profile   Translate to Translated (View Original)
 More options Jul 9 2012, 6:14 pm
From: marc <marc.at.comp...@gmail.com>
Date: Mon, 9 Jul 2012 15:14:38 -0700 (PDT)
Local: Mon, Jul 9 2012 6:14 pm
Subject: Re: Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.

>>How are your mappings / directory structure look like?

        <cfset baseDirectory=ReReplaceNoCase(ExpandPath("/"),"[^\\^/.]+[\\/]
{1}$","","All")>
        <cfset THIS.mappings["/Coldspring"]="#baseDirectory#Frameworks
\Coldspring">
        <cfset THIS.mappings["/Config"]="#baseDirectory#Frameworks
\config_CMS">
        <cfset THIS.mappings["/ModelGlue"]="#baseDirectory#Frameworks
\ModelGlue">
CMS/
        Frameworks
                Coldspring
                coldspring1-2-final
                config_CMS
                ModelGlue
                ModelGlue_3.2.439
                Transfer
        MVC
                CMS
                        Application
                                Controllers
                                [...]
        Resources
        wwwroot

>>What does your listAroundAdvice look like?

<cfcomponent output="false" name="listAroundAdvice"
extends="coldspring.aop.MethodInterceptor">

        <cffunction name="init" access="public">
                <cfreturn this />
        </cffunction>

        <cffunction name="invokeMethod" access="public" returntype="any">
                <cfargument name="mi" type="coldspring.aop.MethodInvocation"
required="true" />

                <cfset local.result=arguments.mi.proceed()>
                <cfset local.result=local.result.getCollection()>
                <cfreturn local.result>
        </cffunction>

</cfcomponent>

/Coldspring contains the /orm/hibernate folder so it _is_ v2.0, from
your develop branch,
https://github.com/markmandel/coldspring.

I have the stock MG version ModelGlue(/ModelGlue) and the modified
version by Chris Blackwell (ModelGlue_3.2.439)
Coldspring contains version 2, coldspring1-2-final is the stable
release. All in one folder.
Maybe the folder names conflict with likewise named mappings and have
precedence? Worth a try tomorrow...

Marc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile   Translate to Translated (View Original)
 More options Jul 9 2012, 6:16 pm
From: Mark Mandel <mark.man...@gmail.com>
Date: Tue, 10 Jul 2012 08:16:45 +1000
Local: Mon, Jul 9 2012 6:16 pm
Subject: Re: [coldspring-users] Re: Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.

Yeah, that is what I'm thinking.

The error sounds like you're trying to implement the cs1.2 version of
MethodInterceptor.

Mark

On Tue, Jul 10, 2012 at 8:14 AM, marc <marc.at.comp...@gmail.com> wrote:
> Maybe the folder names conflict with likewise named mappings and have
> precedence? Worth a try tomorrow...

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

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marc  
View profile   Translate to Translated (View Original)
 More options Jul 10 2012, 5:44 pm
From: marc <marc.at.comp...@gmail.com>
Date: Tue, 10 Jul 2012 14:44:57 -0700 (PDT)
Local: Tues, Jul 10 2012 5:44 pm
Subject: Re: Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.
Ok, so I removed CS 1.2 and stock MG 3.2.439 so I only have your CS2.0
develop version and a modified MG by Chrisa Blackwell that knows how
to talk to CS2.0. AppMappings point to these files.I restart the
server, request a page from my app - I'm not doing any AOP here so I
expect the login screen after the initialisation is done - but I get
another error message:

invalid component or interface name.
The coldspring.aop.Advice ColdFusion component or interface name, used
to extend or implement the coldspring.aop.MethodInterceptor component
is invalid. Ensure that the file exists, that the name does not start
or end with a period (.), and the name is not an empty string.

The error occurred in H:\www\CMS\Frameworks\coldspring\core\reflect
\Class.cfc: line 49
Called from H:\www\CMS\Frameworks\Coldspring\core\reflect
\ReflectionService.cfc: line 46
Called from H:\www\CMS\Frameworks\Coldspring\beans\support
\CFCBeanDefinition.cfc: line 71
Called from H:\www\CMS\Frameworks\Coldspring\beans
\BeanDefinitionRegistry.cfc: line 78
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 198
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 93
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 61
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 52
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 33
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 184
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 51
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 195
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 206
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\ModelGlue.cfm:
line 81
Called from H:\www\CMS\wwwroot\index.cfm: line 41

47 :                    Writedump(arguments);abort;
48 :            }
49 :            var meta = getComponentMetadata(arguments.className);
50 :
51 :            //builder.setLength(builder.lastIndexOf(".")); << CF8 fails on
this because it can't resolve Java Methods. Grrr.

I do a dump of this invalid component or interface:

                try{
                        Writedump(arguments.className);
                }
                catch(Any e){
                        Writedump(arguments);abort;
                }

                var meta = getComponentMetadata(arguments.className);

when the error is thrown the Writedump(arguments) shows this :

CLASSNAME       Application.Model.AOP.listAroundAdvice

This is the advice I want to wrap around the target objects.

It looks like this:

<cfcomponent output="false" name="listAroundAdvice"
extends="coldspring.aop.MethodInterceptor">

        <cffunction name="init" access="public">
                <cfreturn this />
        </cffunction>

        <cffunction name="invokeMethod" access="public" returntype="any">
                <cfargument name="mi" type="coldspring.aop.MethodInvocation"
required="true" />

                <cfset local.result=arguments.mi.proceed()>
                <cfset local.result=local.result.getCollection()>
                <cfreturn local.result>
        </cffunction>

</cfcomponent>

I figured maybe the mapping

<cfset baseDirectory=ReReplaceNoCase(ExpandPath("/"),"[^\\^/.]+[\\/]
{1}$","","All")>
<cfset THIS.mappings["/Application"]="#baseDirectory#MVC\CMS
\Application">

is wrong but when I do this

<cfdump
var="#GetMetaData("Application.Model.AOP.listAroundAdvice")#"><cfabort>

in Application.cfc I get a dump of object of java.lang.Class

This is my Coldspring.xml part where I define the AOP:

        <bean id="remotePageService"
class="coldspring.aop.framework.RemoteFactoryBean" lazy-init="false">
                <property name="target">
                        <ref bean="pageService" />
                </property>
                <property name="serviceName">
                        <value>remotePageService</value>
                </property>
                <property name="relativePath">
                        <value>/ws</value>
                </property>
                <property name="remoteMethodNames">
                        <value>list</value>
                </property>
                <property name="beanFactoryName">
                        <value>beanfactory</value>
                </property>
                <property name="interceptorNames">
                        <list>
                                <value>listAdvisor</value>
                        </list>
                </property>
        </bean>

        <!-- AOP -->
        <bean id="listAroundAdvice"
class="Application.Model.AOP.listAroundAdvice" />
        <bean id="listAdvisor"
class="coldspring.aop.support.NamedMethodPointcutAdvisor">
                <property name="advice">
                        <ref bean="listAroundAdvice" />
                </property>
                <property name="mappedNames"><value>list</value></property>
        </bean>

What's wrong with this components name?

Marc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile   Translate to Translated (View Original)
 More options Jul 10 2012, 6:06 pm
From: Mark Mandel <mark.man...@gmail.com>
Date: Wed, 11 Jul 2012 08:06:04 +1000
Local: Tues, Jul 10 2012 6:06 pm
Subject: Re: [coldspring-users] Re: Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.

You're ListAroundAdvice needs to implement the interface, not extend it.

See:
http://sourceforge.net/apps/trac/coldspring/wiki/MigratingFrom1.xTo2....

Mark

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

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marc  
View profile   Translate to Translated (View Original)
 More options Jul 11 2012, 5:22 pm
From: marc <marc.at.comp...@gmail.com>
Date: Wed, 11 Jul 2012 14:22:00 -0700 (PDT)
Subject: Re: Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.
You're right, that's listed in the migrating wiki. So I changed the
listAroundAdvice so it's implementing coldspring.aop.MethodInterceptor
rather than extending it.

However, I got another error:

Interface Coldspring.aop.MethodInterceptor cannot extend the component
coldspring.aop.Advice.
ColdFusion interface cannot extend ColdFusion component.

The error occurred in H:\www\CMS\Frameworks\Coldspring\core\reflect
\Class.cfc: line 43
Called from H:\www\CMS\Frameworks\Coldspring\core\reflect
\ReflectionService.cfc: line 46
Called from H:\www\CMS\Frameworks\Coldspring\beans\support
\CFCBeanDefinition.cfc: line 71
Called from H:\www\CMS\Frameworks\Coldspring\beans
\BeanDefinitionRegistry.cfc: line 78
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 198
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 93
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml\XmlParser.cfc:
line 61
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 52
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 33
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 184
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 51
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 195
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 206
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\ModelGlue.cfm:
line 81
Called from H:\www\CMS\wwwroot\index.cfm: line 41

41 :            var builder = 0;
42 :            var reflectionService =
getComponentMetaData("coldspring.core.reflect.ReflectionService").singleton .instance;
43 :            var meta = getComponentMetadata(arguments.className);
44 :
45 :            //builder.setLength(builder.lastIndexOf(".")); << CF8 fails on
this because it can't resolve Java Methods. Grrr.

Figured it might be because of the version, I changed back from the
develop version to the CS2.0 Alpha1 tag from your Github, restarted
the CF server and requested the page. Got this error:

Invalid component or interface name.
The coldspring.aop.Advice ColdFusion component or interface name, used
to extend or implement the Coldspring.aop.MethodInterceptor component
is invalid. Ensure that the file exists, that the name does not start
or end with a period (.), and the name is not an empty string.

The error occurred in H:\www\CMS\Frameworks\coldspring\core\reflect
\Class.cfc: line 59
Called from H:\www\CMS\Frameworks\coldspring\core\reflect
\ReflectionService.cfc: line 46
Called from H:\www\CMS\Frameworks\coldspring\beans\support
\CFCBeanDefinition.cfc: line 71
Called from H:\www\CMS\Frameworks\coldspring\beans
\BeanDefinitionRegistry.cfc: line 78
Called from H:\www\CMS\Frameworks\coldspring\beans\xml\XmlParser.cfc:
line 169
Called from H:\www\CMS\Frameworks\coldspring\beans\xml\XmlParser.cfc:
line 79
Called from H:\www\CMS\Frameworks\coldspring\beans\xml\XmlParser.cfc:
line 61
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 52
Called from H:\www\CMS\Frameworks\Coldspring\beans\xml
\XmlBeanFactory.cfc: line 33
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 184
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 51
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 195
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\loading
\ColdSpringBootstrapper.cfc: line 206
Called from H:\www\CMS\Frameworks\ModelGlue\gesture\ModelGlue.cfm:
line 81
Called from H:\www\CMS\wwwroot\index.cfm: line 41

57 :            setAssignableCache(StructNew());
58 :
59 :            setMeta(getComponentMetadata(arguments.className));
60 :
61 :            //determine if we are an interface or not

Both errors hit me before. I've got the feeling I'm running in circles
here..

Marc


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jul 11 2012, 5:46 pm
From: Mark Mandel <mark.man...@gmail.com>
Date: Thu, 12 Jul 2012 07:46:47 +1000
Local: Wed, Jul 11 2012 5:46 pm
Subject: Re: [coldspring-users] Re: Interface coldspring.aop.MethodInterceptor cannot extend the component coldspring.aop.Advice.

This sounds a lot like you have both versions of coldspring accessible on
/coldspring and CF doesn't know which one to pick.

Mark

Sent from my mobile doohickey.
On Jul 12, 2012 7:22 AM, "marc" <marc.at.comp...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »