You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/03/05 15:23:38 UTC

[jira] [Commented] (TAP5-2002) Advising service interface mismatch

    [ https://issues.apache.org/jira/browse/TAP5-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14348769#comment-14348769 ] 

Jochen Kemnade commented on TAP5-2002:
--------------------------------------

Is this still an issue with more recent Tapestry versions (i.e. 5.3.8 or a recent 5.4 beta)?

> Advising service interface mismatch
> -----------------------------------
>
>                 Key: TAP5-2002
>                 URL: https://issues.apache.org/jira/browse/TAP5-2002
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-ioc
>    Affects Versions: 5.3.5
>            Reporter: Matías Blasi
>            Priority: Minor
>              Labels: advise, session
>
> I tried to advise org.apache.tapestry.services.Session with @Advise(serviceInterface=org.apache.tapestry5.services.Session.class), I know that it is wrong because Thiago explained to me that it is not a Service :).
> Anywat, I'm getting the following confusing error:
> Caused by: java.lang.RuntimeException: Error invoking method public static void com.app.services.AppModule.adviseUserActivity(com.app.core.services.UserService,org.apache.tapestry5.ioc.MethodAdviceReceiver) throws java.lang.SecurityException,java.lang.NoSuchMethodException: org.hibernate.Session.invalidate()
>         at org.apache.tapestry5.ioc.internal.util.MethodInvoker.invoke(MethodInvoker.java:61)
>         at org.apache.tapestry5.ioc.internal.util.LoggingInvokableWrapper.invoke(LoggingInvokableWrapper.java:42)
>         at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>         ... 79 more
> Caused by: java.lang.NoSuchMethodException: org.hibernate.Session.invalidate()
>         at java.lang.Class.getMethod(Class.java:1622)
>         at com.app.services.AppModule.adviseUserActivity(AppModule.java:198)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.apache.tapestry5.ioc.internal.util.MethodInvoker.invoke(MethodInvoker.java:50)
>         ... 81 more
> 2012-09-23 10:50:11.134::INFO:  Started SelectChannelConnector@0.0.0.0:8080
> [INFO] Started Jetty Server
> It seams to be trying to advise the hibernate-session service, although I'm explicitliy specifying the org.apache.tapestry.services.Session interface.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)