Matt:
I copied both asm-1.5.3.jar and asm-attrs-1.5.3.jar to hibernate/lib
directory and removed the asm.jar.  I still got the same error that the
EmptyVisitor is not found. And then I copied asm-all-2.2.3.jar, too, to
hibernate/lib directory. With both asm-1.5.3 and asm-all-2.2.3.jar, the
error is gone, but my aop declaration still not working. Here is my aop
config:

<aop:config>
          <aop:pointcut id="logService" expression="execution(* com.
mycompany.service..*.*(..))"/>
          <aop:pointcut id="logDao" expression="execution(* com.
mycompany.dao..*.*(..))"/>
          <aop:pointcut id="logWeb" expression="execution(* com.
mycompany.web..*.*(..))"/>
                        
          <aop:aspect id="logAspect" ref="loggingAspect">
            <aop:before pointcut-ref="logService" method="logStart"/>
            <aop:after-returning pointcut-ref="logService"
method="logEnd" returning="result"/>
          </aop:aspect>
  </aop:config>
        
        <bean id="loggingAspect"
class="com.mycompany.util.LoggingAspect"/>

I do not see any logging information coming out of my "LoggingAspect".
Does anyone integrate the AOP logging to Appfuse?  I see in appfuse
1.9.4, we have used aop for transaction and security.  How about the
logging?

Thanks.

Qin

-----Original Message-----
From: Matt Raible [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 19, 2007 10:34 PM
To: [email protected]
Subject: Re: [appfuse-user] ASM, CIGLIB

We use asm 1.5.3 in 2.x.  You might try adding asm-attrs-1.5.3.jar and
see if that helps?

matt

On 2/16/07, Ding, Qin <[EMAIL PROTECTED]> wrote:
> I use appfuse 1.9.4. I tried to use Spring AOP to do logging and email
> exception.
>
> The aplicationContext-logging.xml is like this:
> ---------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:aop="http://www.springframework.org/schema/aop";
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd";>
>
> <aop:config>
>     <aop:pointcut id="serviceMethod" expression="execution(* com.
> mycompany.service.impl.*.*(..))" />
>     <aop:aspect ref="exceptionEmailer">
>       <aop:after-throwing throwing="exception"
> pointcut-ref="serviceMethod" method="emailException" />
>     </aop:aspect>
>   </aop:config>
>
>   <bean id="exceptionEmailer" class="com.vhcnet.util.ExceptionEmailer"
> />
>   <bean id="dummy" class="com.mycompany.service.impl.DummyManager" />
> </beans>
> ------------------------------------
>
> After I start tomcat, I got the error:
>
> Caused by:
> org.springframework.beans.factory.BeanCreationException: Error
creating
> bean with name '(inner bean)': Invocation of init method failed;
nested
> exception is java.lang.NoClassDefFoundError:
> org/objectweb/asm/commons/EmptyVisitor
> Caused by:
> java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
>
>
> Someone suggested I remove asm.jar from hibernate; instead, use
> asm-all-2.2.3.jar. I did that but got this error:
> --------------------------------------
> Caused by:
> org.springframework.beans.factory.BeanCreationException: Error
creating
> bean with name 'sessionFactory' defined in ServletContext resource
> [/WEB-INF/applicationContext-hibernate.xml]: Invocation of init method
> failed; nested exception is java.lang.NoClassDefFoundError:
> org/objectweb/asm/CodeVisitor
> Caused by:
> java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
> --------------------------------------
>
> What's the correct version of asm jar should I use?
>
> I'd like to hear if anyone has come across this issue and how you have
> resolved it.  Thanks.
>
> Qin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to