에러를 찾았다~!
심각: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/sqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'. Cause: com.ibatis.sqlmap.client.SqlMapException: Error. Could not initialize class. Cause: java.lang.ClassNotFoundException: RespondentModel
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
이 에러는 xml파일에서 나는 것이다.
Alias를 추가해주니 에러가 없어졌다.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="survey">
<typeAlias alias="SurveyModel" type="com.zon.cs.survey.model.SurveyModel"/>
<typeAlias alias="DoSurveyModel" type="com.zon.cs.survey.model.DoSurveyModel"/>
<typeAlias alias="PageModel" type="com.zon.cs.survey.model.PageModel"/>
<typeAlias alias="QuestionModel" type="com.zon.cs.survey.model.QuestionModel"/>
<typeAlias alias="CompanyModel" type="com.zon.cs.survey.model.CompanyModel"/>
<typeAlias alias="RespondentModel" type="com.zon.cs.survey.model.RespondentModel"/>
<select id="getSurveyList" parameterClass="java.util.HashMap" resultClass="SurveyModel">
select qtid, qtname, detail, result, start_date, end_date, email_date, registed_date, madeby
from question_template
</select>
<select id="getLastSurveyByMember" parameterClass="String" resultClass="SurveyModel">
SELECT
qtid, qtname, detail, result, to_char(start_date,'yyyy-mm-dd') as start_date, to_char(end_date,'yyyy-mm-dd') as end_date, email_date, registed_date, madeby
FROM ( SELECT *
FROM question_template
WHERE madeby = #madeby# order by qtid desc) WHERE rownum = 1
</select>
<select id="getQuestionTemplate" parameterClass="int" resultClass="SurveyModel">
SELECT
QTID, QTNAME, DETAIL, RESULT, TO_CHAR(START_DATE,'YYYY-MM-DD') AS START_DATE,
TO_CHAR(END_DATE,'YYYY-MM-DD') AS END_DATE, TO_CHAR(EMAIL_DATE,'YYYY-MM-DD') AS EMAIL_DATE,
TO_CHAR(REGISTED_DATE,'YYYY-MM-DD') AS REGISTED_DATE, MADEBY
FROM QUESTION_TEMPLATE
WHERE qtid = #qtid#
</select>
<select id="getQuestion" parameterClass="int" resultClass="QuestionModel">
SELECT QID, QUESTION_TYPE, QUESTION_TITLE, MAXNUM, COLUMN_TITLE, ROW_TITLE, QTID, PID
FROM QUESTION
WHERE QTID = #qtid# order by qid asc
</select>
<select id="getPage" parameterClass="int" resultClass="PageModel">
SELECT PID, NUM_QUESTIONS, PAGE_TITLE, RESPONSE_DEPT, QUESTION_ORDER, QUESTION_TYPE, QTID, PAGE_NUM, CATEGORY
FROM PAGE
WHERE QTID = #qtid#
</select>
<select id="getCompany" resultClass="CompanyModel">
SELECT CID, COMPANY, COMPHONE, ITEM, START_DATE, END_DATE, DESCRIPTION ,DIVISION
FROM CUSTOMER
ORDER BY cid
</select>
<insert id="writeSurvey" parameterClass="SurveyModel">
INSERT INTO Question_template
(qtid, qtname, detail, result, start_date, end_date, email_date, registed_date, madeby)
VALUES
(qtid.nextval, #qtname#, #detail#, #result#, #start_date#, #end_date#, #start_date#, sysdate, #madeby#)
</insert>
<insert id="contextSurvey1" parameterClass="SurveyModel">
INSERT INTO Question_template
(pid, num_question, page_title, response_dept, question_order, question_type)
VALUES
(pid.nextval, mid.nextval, #qtname#, #detail#, #result#, #start_date#, #end_date#, #start_date#, sysdate, #madeby#)
</insert>
<insert id="writeRespondent" parameterClass="RespondentModel">
INSERT INTO RESPONDENT
(rid, company, period, items, division, rname, task, department, phone, address)
VALUES
(#RID#, #COMPANY#, #PERIOD#, #ITEMS#, #DIVISION#, #RNAME#, #TASK#, #DEPARTMENT#, #PHONE#, #ADDRESS#)
</insert>
</sqlMap>
'Web > JSP' 카테고리의 다른 글
Spring framework 시작하는 곳 (0) | 2013.04.19 |
---|---|
Cannot create a server using the selected type (0) | 2012.09.27 |
[JSP]IBatis 세팅하기 (0) | 2012.06.11 |
[JSP]Spring 세팅하기 (0) | 2012.06.07 |
Fiddler2를 이용한 HTTPS(SSL) 페이지 추적 (0) | 2012.02.13 |