Announcement Announcement Module
Collapse
No announcement yet.
Cannot invoke method Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot invoke method

    I am using Flex 1.5 and spring 3.1 and hibernate 3
    I have UserService class implementing UserDetailsService, I have loadUserByUsername method overridden.
    Also there is other public method in this class but my flex client/message broker is unable to see this method.

    for testing purpose, if I have the same class with out implementing UserDetailsService( I have not configured security, during the testing), then flex can invoke that method.

    error I am getting is

    Code:
    Oct 6, 2012 1:00:36 AM org.springframework.flex.core.DefaultExceptionLogger log
    WARNING: The following exception occurred during request processing by the BlazeDS MessageBroker and will be serialized back to the client: 
    flex.messaging.MessageException: Cannot invoke method 'getMenu'. Method 'getMenu' not found.
    	at flex.messaging.util.MethodMatcher.methodNotFound(MethodMatcher.java:387)
    	at flex.messaging.util.MethodMatcher.getMethod(MethodMatcher.java:172)
    	at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:417)
    	at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
    	at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1400)
    	at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1005)
    	at flex.messaging.endpoints.AbstractEndpoint$$FastClassByCGLIB$$1a3ef066.invoke(<generated>)
    	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    	at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    	at org.springframework.flex.core.MessageInterceptionAdvice.invoke(MessageInterceptionAdvice.java:66)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    	at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:124)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    	at org.springframework.aop.framework.Cglib2AopProxy$FixedChainStaticTargetInterceptor.intercept(Cglib2AopProxy.java:573)
    	at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$122d4591.serviceMessage(<generated>)
    	at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)
    	at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
    	at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
    	at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
    	at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:166)
    	at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:291)
    	at flex.messaging.endpoints.AMFEndpoint$$EnhancerByCGLIB$$122d4591.service(<generated>)
    	at org.springframework.flex.servlet.MessageBrokerHandlerAdapter.handle(MessageBrokerHandlerAdapter.java:109)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:662)
    my application config

    Code:
    <flex:message-broker>
    		<flex:remoting-service default-channels="my-amf" />
    	</flex:message-broker>
    	<tx:annotation-driven />
    	<context:property-placeholder location="classpath:db.properties" />
    	<context:component-scan base-package="org.hmil.sam"></context:component-scan>
    	<bean id="samDataSource"
    		class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    		<property name="driverClassName" value="${sam.jdbc.driverClassName}" />
    		<property name="url" value="${sam.jdbc.url}" />
    		<property name="username" value="${sam.jdbc.username}" />
    		<property name="password" value="${sam.jdbc.password}" />
    	</bean>
    	<bean id="sessionFactory"
    		class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    		<property name="dataSource" ref="samDataSource" />
    		<property name="packagesToScan" value="org.hmil.sam" />
    		<property name="hibernateProperties">
    			<value>
    				hibernate.format_sql=${hibernate.format_sql}
    				hibernate.show_sql=${hibernate.show_sql}
    				hibernate.dialect=${hibernate.dialect}
    			</value>
    		</property>
    	</bean>
    
    	<!--Transaction manager for working with Hibernate SessionFactories -->
    	<bean id="transactionManager"
    		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    		<property name="sessionFactory" ref="sessionFactory" />
    	</bean>
    Any help is appreciated
Working...
X