Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
AOP 설정에서요...
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
  7 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
 
가마우치  
View profile  
 More options Mar 24 2011, 10:08 pm
From: 가마우치 <yabgar...@gmail.com>
Date: Thu, 24 Mar 2011 19:08:49 -0700 (PDT)
Local: Thurs, Mar 24 2011 10:08 pm
Subject: AOP 설정에서요...
context:component-scan 으로 설정잡구 작업하는데 ..
AOP 포인트컷 표현식이 잘안되서 낑낑대다가 전체를 한번 걸어 봤는데요...
즉 execution(* *(..)) 이런식으로요...그랬더니 페이지 마다 에러가 빵빵 뜨던데...잘쓰던 DAO 쪽
sqlMapClientTemplate 찾을수 없다고...걍 막막
사실 설정을 이렇게 잡진 않을테니 문제는 없는데요..왜그런지 궁금하네욤....@_@ 혹 아시는분..ㅎㅎ

error creating bean with name
'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMap ping#0'
defined in file [D:\Web\eclipse\workspace\.metadata\.plugins
\org.eclipse.wst.server.core\tmp2\wtpwebapps\p3Sample\WEB-INF\classes
\conf\dispatcher-servlet.xml]:
 Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'mainController': Injection of resource
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'UserServiceImpl': Injection of
autowired dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Could not autowire field: p3.sample.web.dao.UserDao
p3.sample.web.service.impl.UserServiceImpl.userDao; nested exception
is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'UserDaoImpl': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire field: org.springframework.orm.ibatis.SqlMapClientTemplate
p3.sample.web.dao.UserDaoImpl.sqlMapClientTemplate; nested exception
is org.springframework.beans.factory.NoSuchBeanDefinitionException: No
matching bean of type
[org.springframework.orm.ibatis.SqlMapClientTemplate] found for
dependency: expected at least 1 bean which qualifies as autowire
candidate for this dependency. Dependency annotations:
{...@org.springframework.beans.factory.annotation.Autowired(required=true)}


 
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.
Sanghyuk Jung  
View profile   Translate to Translated (View Original)
 More options Mar 24 2011, 10:12 pm
From: Sanghyuk Jung <bene...@gmail.com>
Date: Fri, 25 Mar 2011 11:12:53 +0900
Local: Thurs, Mar 24 2011 10:12 pm
Subject: Re: [KSUG] AOP 설정에서요...

jdk proxy로 적용되고 있었다면 AOP 적용한후로는 sqlMapClientTemplate 가 더이상
sqlMapClientTemplate가 아니고 SqlMapClientOperations형인 proxy가 생성되어서 그럴지도 모르겠네요

proxy-target-class='true' 하면 될지도 몰라요

2011년 3월 25일 오전 11:08, 가마우치 <yabgar...@gmail.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.
가마우치  
View profile   Translate to Translated (View Original)
 More options Mar 24 2011, 10:28 pm
From: 가마우치 <yabgar...@gmail.com>
Date: Thu, 24 Mar 2011 19:28:25 -0700 (PDT)
Local: Thurs, Mar 24 2011 10:28 pm
Subject: Re: AOP 설정에서요...
ㅎ 추가해봤더니 새로운 에러가 뜨네요... 아예 컨테이너 올릴때 발생하네요...><

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sqlMapClientTemplate' defined in class path
resource [conf/applicationContext.xml]: Cannot resolve reference to
bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested
exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sqlMapClient': Post-processing of the
FactoryBean's object failed; nested exception is
org.springframework.aop.framework.AopConfigException: Could not
generate CGLIB subclass of class [class
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl]: Common causes of this
problem include using a final class or a non-visible class; nested
exception is java.lang.IllegalArgumentException: Superclass has no
null constructors but no arguments were given

On 3월25일, 오전11시12분, Sanghyuk Jung <bene...@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.
Sungchul Park  
View profile   Translate to Translated (View Original)
 More options Mar 24 2011, 10:39 pm
From: Sungchul Park <gyu...@gmail.com>
Date: Fri, 25 Mar 2011 11:39:18 +0900
Local: Thurs, Mar 24 2011 10:39 pm
Subject: Re: [KSUG] Re: AOP 설정에서요...
CGLIB로 프락싱하려면 클래스에 인자가 없는 생성자가 있어야 하는 걸로 압니다.
SqlMapClient에 그런 생성자가 없어서 난 오류 같네요.


 
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.
Sanghyuk Jung  
View profile   Translate to Translated (View Original)
 More options Mar 24 2011, 10:41 pm
From: Sanghyuk Jung <bene...@gmail.com>
Date: Fri, 25 Mar 2011 11:41:18 +0900
Local: Thurs, Mar 24 2011 10:41 pm
Subject: Re: [KSUG] Re: AOP 설정에서요...

final이라서 CGLIB로 생성해서 덮어쓸 수 없는 부분이 있나보네요.
AOP선언에서 범위를 좁히시는 것이 좋을듯합니다.
아니면 정말 전체 모든 메소드를 AOP로 쓰시고 싶으시다면 아까처럼 jdk-proxy로 돌려놓으시고, 'UserDaoImpl'에서
sqlMapClientTemplate가 아닌 SqlMapClientOperations로 참조하시는 방법도 있습니다. 대부분 AOP선언을
고치는 방법을 쓸 것 같네요

2011년 3월 25일 오전 11:28, 가마우치 <yabgar...@gmail.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.
arawn  
View profile   Translate to Translated (View Original)
 More options Mar 24 2011, 10:43 pm
From: arawn <arawn...@gmail.com>
Date: Fri, 25 Mar 2011 11:43:01 +0900
Local: Thurs, Mar 24 2011 10:43 pm
Subject: Re: [KSUG] Re: AOP 설정에서요...
예외를 잘 보시면 아시겠지만..

proxy-target-class='true' 설정으로 CGLIB 을 통해 proxy 를 생성 중
FactoryBean 을 통해 sqlMapClient bean 을 생성할때 proxy 적용이 안되는거 같네요..

AOP 의 제약사항에 대해서 한번 찾아보시구요.

포인터컷은 최소한의 것만 적용하셔야합니다.
한번에 여러개의 조건이 걸리도록 설정하는건 그닥 권장되지 않습니다.

11. 3. 25. 오전 11:28, 가마우치 쓴 글:


 
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.
가마우치  
View profile   Translate to Translated (View Original)
 More options Mar 24 2011, 11:21 pm
From: 가마우치 <yabgar...@gmail.com>
Date: Thu, 24 Mar 2011 20:21:00 -0700 (PDT)
Subject: Re: AOP 설정에서요...
휴 역시 쉽지 않네요...오늘 또 많이 알아가네요..답변주신분드 모두 감사요..

On 3월25일, 오전11시43분, arawn <arawn...@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 »