I use spring's MVC. I choose MVC because I understood that it is
seamlessly integrated into spring's framework.

Qin

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt
Raible
Sent: Monday, March 12, 2007 9:53 AM
To: users@appfuse.dev.java.net
Subject: Re: [appfuse-user] ASM, CIGLIB

Which web framework are you using? The reason you're probably not
seeing log messages from your web framework is because those classes
are not managed by Spring. Using AspectJ's compile-time-weaving should
get you the behavior you desire.

Matt

On 3/12/07, Ding, Qin <[EMAIL PROTECTED]> wrote:
> Matt:  thank you for replying my question.
>
> Actually, three jars asm-1.5.3.jar and asm-attrs-1.5.3.jar and
> asm-all-2.2.3.jar must all be in the classpath. I changed my pointcut
> definition to
>
> <aop:pointcut id="publicMethod" expression="execution(public *
> com.appfuse..*())"/>
>
> I thought that way I can see logging from all public methods within
> appfuse.  However, now I can only see logging from dao/hibernate and
> service/impl.  Nothing comes out of webapp/action, webapp/listerner...
> or model/
>
> I changed log4j.properties to make all packages DEBUG.  Still, not all
> packages have logging information generated.
>
> Don't know why.
>
> Qin
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt
> Raible
> Sent: Sunday, March 11, 2007 11:38 PM
> To: users@appfuse.dev.java.net
> Subject: Re: [appfuse-user] ASM, CIGLIB
>
> Have you tried using a debugger to see if your LoggingAspect is
> getting called?  If it is, it may be your log4j.properties settings.
>
> Matt
>
> On 2/21/07, Ding, Qin <[EMAIL PROTECTED]> wrote:
> > 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: users@appfuse.dev.java.net
> > 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]
> >
> >
>
>
> --
> 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]
>
>


-- 
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