Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

간단한 게시판 만드는중..

238 views
Skip to first unread message

BeraD

unread,
Jan 6, 2012, 3:21:45 AM1/6/12
to 한국 Groovy & Grails 사용자 그룹
안녕하세요~

현재 sts + grails + ibatis + mysql 사용하여 초 간단한 게시판 만드는 중에

막히는 부분이 많아 질문 드리게 되었습니다;


아에 생 초짜.. 라고 생각하시면 될 정도의 실력이라 막연하게 구글신께 굽신거리는 중인데요;


아무래도 환경설정중에 무언가 놓친 부분이 있던가.. 짜집기를 잘못한 부분이 있는것 같습니다;

resource.groovy 파일 설정은
일단 이렇게 해 놨습니다.

import org.codehaus.groovy.grails.commons.ApplicationHolder
import org.springframework.orm.ibatis.SqlMapClientTemplate
import org.springframework.orm.ibatis.SqlMapClientFactoryBean

beans = {
def grailsApplication = ApplicationHolder.application

sqlMapClientTemplate(SqlMapClientTemplate) {
sqlMapClient = ref("SqlMapClient")
}
sqlMapClient(SqlMapClientFactoryBean) {
configLocation = "classpath:ibatis/SqlMapConfig.xml"
dataSource = ref("dataSource")
mappingLocations = ["classpath:sqlmap/**/*.xml"]
}
}

import 는 이게 맞는지 틀리는지;; 잘 모르지만 일단 저리 해 놨구요
문제는 sqlMapClientTemplate 와 sqlMapClient 이 두부분에서 에러가 나는듯 합니다..
error 메세지는

ERROR context.GrailsContextLoader - Error executing bootstraps: Error
creating bean with name 'sqlMapClientTemplate': Cannot resolve
reference to bean 'SqlMapClient' while setting bean property
'sqlMapClient'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named 'SqlMapClient' is defined
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sqlMapClientTemplate': Cannot resolve
reference to bean 'SqlMapClient' while setting bean property
'sqlMapClient'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named 'SqlMapClient' is defined

이렇게 나오드라구요, 흠....

어찌해야 하는지 감이 안옵니다; 도와주실분 계시나요??ㅠ

lepffm

unread,
Jan 8, 2012, 8:57:28 PM1/8/12
to 한국 Groovy & Grails 사용자 그룹
에러의 실제 발생위치를 먼저 확인해보세요.
>grails console --stacktrace

제가 테스트할때는 ibatis 버전의 문제였는데요,
(trace 내려가다 보면 NoSuchMethodError .. 가 나온 경우입니다. ) 2.0x 대라면
ibatis-2.3.4 library로 교체해보세요.

그리고 ClassNotFoundException 이라면 sqlmap-config.xml 에 등록한 resouce xml 들 중에
서 클래스의 패키지를 잘못 지정한건 아닌가 싶습니다.

grails에 ibatis 를 적용하는 절차는 다음 사이트들을 참고해보았습니다.

http://jglatre.blogspot.com/2009/03/using-ibatis-in-grails.html
http://www.grails66.com/blog/?p=801

이호연

unread,
Jan 9, 2012, 1:21:38 AM1/9/12
to kg...@googlegroups.com
3일이나 지난 문제라 벌써 해결하셨을지도 모르겠네요.
에러메세지로 봐선 sqlMapClient properties 설정이 잘못 된 것 같은데요. SqlMapClient라는 이름을 가진 bean 이 없다는 메세지네요.

sqlMapClient = ref("SqlMapClient")
 => 
sqlMapClient = ref("sqlMapClient")

이렇게 바꿔보세요.

2012년 1월 9일 오전 10:57, lepffm <lep...@gmail.com>님의 말:

--
"한국 Groovy & Grails 사용자 그룹" 에 가입하셨기에 이 메시지를 보내드립니다
이 그룹에 게시하려면 다음 주소로 이메일을 보내주십시오.
KG...@googlegroups.com
이 그룹에서 탈퇴하시려면 다음으로 이메일을 보내주십시오.
KGGUG+un...@googlegroups.com
추가 옵션을 보려면 http://groups.google.com/group/KGGUG?hl=ko의 그룹을
방문하세요.

BeraD

unread,
Jan 9, 2012, 4:12:49 AM1/9/12
to 한국 Groovy & Grails 사용자 그룹
답글 감사합니다.~

아직 미해결인데요;

[main] ERROR application.WebApplicationImpl - The ResourceConfig
instance does not contain any root resource classes.
[main] ERROR servlet.SpringServlet - Exception occurred when
intialization

일단 첫 error가 이러하네요..

뭔가가 연결하는 부분을 설정 안한건지 경로설정이 틀린건지 계속 확인하고 오타도 확인하고 있는데..;

연동하는게 이리 안될줄은 몰랐습니다;;;

BeraD

unread,
Jan 9, 2012, 4:16:22 AM1/9/12
to 한국 Groovy & Grails 사용자 그룹
현재 상태가 저런 에러 포함 수많은 에러와 함께

서버로 접속은 되나 화면 출력이 안되는 상태입니다;

HTTP Status 404-

type Status report
message
description The requested resource () is not available.

http://localhost:8080/Testtt 로 접속하면 위와같이 화면이 출력되네요;;

BeraD

unread,
Jan 10, 2012, 1:21:54 AM1/10/12
to 한국 Groovy & Grails 사용자 그룹
아.. 해결 되었네요;;

잘 모르다보니 이거저거 짜집기하고 붙이고 수정하고 하면서 만들다가..;;

플러그인 몇개 빼고 오타 수정하고 불필요한 파일 하나하나 찾아서 지워보니 완성이 되었습니다.ㅠ


답변 주신 분들 정말 감사드려요~^^

Reply all
Reply to author
Forward
0 new messages