'자바 > J2EE' 카테고리의 다른 글
| Charset, Encoding 이해하기 (링크) (0) | 2011/11/09 |
|---|---|
| 톰캣 6에서 컨텍스트 간 세션공유 (Cross context session sharing in Tomcat) (0) | 2011/07/23 |
| Sitemesh 2.4.1 + Weblogic 9.2 삽질기 (0) | 2010/02/05 |
| Tomcat -> Weblogic 전환 시 고려사항 (0) | 2009/01/19 |
| 브라우져 쿠키 제한(Browser cookie restrictions) (0) | 2008/07/17 |
| request.getRealPath() deprecated (1) | 2008/01/24 |
로컬 윈도우 환경에서는 잘 돌아가는 녀석이, 서버(리눅스) 에만 올리면 "There is no result map named" 에러가 발생한다.
구글신에게 물어봐도 답을 찾지 못했다. 결국 금요일 퇴근도 못하고 삽질 3시간 후 해결 .... ㅠㅠ
AAAA-sqlmap.xml
<sqlMap namespace="_AAAA">
....
<resultMap id="myMapId" class="XXXX">
....
</resultMap>
....
</sqlMap>
BBBB-sqlmap.xml
<sqlMap namespace="_BBBB">
....
<select id="list" resultMap="_AAAA.myMapId" parameterClass="XXXX">
....
</select>
....
</sqlMap>
이렇게 사용해야 될 경우에는 sqlmap 파일의 로딩순서에 유의해야 한다.
sqlmap-config.xml 파일에 수동으로 기능별 sqlmap 파일을 선언해 줄 경우에는 아래와 같이 AAAA-sqlmap.xml을 먼저 선언해줘야 한다.
<sqlMapConfig>
....
<settings enhancementEnabled="true" useStatementNamespaces="true"/>
<sqlMap resource="com/foo/AAAA-sqlmap.xml" />
<sqlMap resource="com/foo/BBBB-sqlmap.xml" />
....
</sqlMapConfig>
만약 스프링과 연동하여 sqlmap 파일을 자동으로 로딩해서 사용하고 있을 경우에는 아래와 같이 해주도록 한다.
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
....
<property name="mappingLocations">
<list>
<value>classpath*:/com/foo/AAAA-sqlmap.xml</value>
<value>classpath*:/com/foo/BBBB-sqlmap.xml</value>
<value>classpath*:/com/others/**/*-sqlmap.xml</value></list>
</property>
....
</bean>
'자바 > iBatis' 카테고리의 다른 글
| ibatis에서 서로 다른 sqlmap.xml 파일 간 참조 ID로 접근해야 될 경우 고려사항 (0) | 2011/11/04 |
|---|---|
| Oracle9i에서 iBatis, Spring + iBatis CLOB 삽질기 (0) | 2009/12/13 |
| iBatis 사용시 ORA-01013 사용자가 요청을 취소했습니다 - 에러 해결 (0) | 2009/04/23 |
| 부적합한 열 유형 관련 에러 (0) | 2009/04/18 |
| iBATIS BulkBeanException 예외에 대해서 .... (0) | 2008/06/11 |
| iBatis 프로시져 호출 시 주의사항 (0) | 2008/03/31 |
- JDBC 9.0.1 drivers can talk to RDBMS
- 11.1.0
- 10.2.0
- 10.1.0
- 9.2.0
- 9.0.1
- 8.1.7
- 8.1.6
- 8.1.5
- 8.0.6
- 8.0.5
- 8.0.4
- 7.3.4
- JDBC 9.2.0 drivers can talk to RDBMS
- 11.2.0
- 11.1.0
- 10.2.0
- 10.1.0
- 9.2.0
- 9.0.1
- 8.1.7
- JDBC 10.1.0 drivers can talk to RDBMS
- 11.2.0
- 11.1.0
- 10.2.0
- 10.1.0
- 9.2.0
- 9.0.1
- 8.1.7
- JDBC 10.2.0 drivers can talk to RDBMS
- 11.2.0
- 11.1.0
- 10.2.0
- 10.1.0
- 9.2.0
- 9.0.1
- 8.1.7
- JDBC 11.1.0 drivers can talk to RDBMS
- 11.2.0
- 11.1.0
- 10.2.0
- 10.1.0
- 9.2.0
- 9.0.1
- JDBC 11.2.0 drivers can talk to RDBMS
- 11.2.0
- 11.1.0
- 10.2.0
- 10.1.0
- 9.2.0
- 9.0.1
- 출처 : http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#02_02
'데이타베이스 > 오라클' 카테고리의 다른 글
| 오라클 JDBC 드라이버 버전별 호환성 정보 (0) | 2011/10/25 |
|---|---|
| 10g XE 캐릭터셋 UTF-8 설정 (0) | 2010/03/18 |
| 토드(Toad)에서 ORA 12154, 06413 에러 (0) | 2010/03/17 |
| ORA-12519, TNS:no appropriate service handler found (1) | 2010/03/02 |
| 오라클에서 특정 컬럼의 인코딩만 변경해서 넣거나 가져오기 (0) | 2008/11/24 |
| ORA-12519 에러 대처방법 (0) | 2008/09/02 |
아래의 코드에 따라 ....
@RequestMapping(value="/club/{seq}")
public String clubFrame(@PathVariable("seq") Integer seq) {
return "/club/ER_index";
}
주소창에 /club/3 을 입력하면 NoSuchRequestHandlingMethodException 예외가 발생하는 경우가 있다.
참고로 web.xml에는
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/club/*</url-pattern>
</servlet-mapping>
해결책은 아래와 같다.
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="alwaysUseFullPath" value="true" />
....
</bean>
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
<property name="alwaysUseFullPath" value="true" />
....
</bean>
'자바 > Spring' 카테고리의 다른 글
| SpringMVC @PathVariable 주의사항 (0) | 2011/09/08 |
|---|---|
| 톰캣에서 Spring & Log4j 리스너 사용 시 발생가능한 문제 (0) | 2008/05/06 |
| 임의의 Dao에 Connection 전달 후 트랜잭션 처리 (0) | 2008/02/13 |
톰캣 6에서 컨텍스트 간 세션공유 (Cross context session sharing in Tomcat)

context-1.xml
<Context crossContext="true" .... 생략
context-2.xml
<Context crossContext="true" .... 생략
테스트
context-1.jsp
<%
ServletContext ctx = application.getContext("/context-1");
Integer counter = (Integer)ctx.getAttribute("counter");
if (counter == null) {
counter = 0;
}
counter++;
request.setAttribute("counter", counter);
ctx.setAttribute("counter", counter);
%>
<h1>Context-1</h1>
<h1>현재 카운터는 ${counter}입니다.</h1>
context-2.jsp
<%
ServletContext ctx = application.getContext("/context-1");
Integer counter = (Integer)ctx.getAttribute("counter");
if (counter == null) {
counter = 0;
}
counter++;
request.setAttribute("counter", counter);
ctx.setAttribute("counter", counter);
%>
<h1>Context-1</h1>
<h1>현재 카운터는 ${counter}입니다.</h1>
출처 : http://jee-bpel-soa.blogspot.com/2009/06/session-sharing-in-apache-tomcat.html
'자바 > J2EE' 카테고리의 다른 글
| Charset, Encoding 이해하기 (링크) (0) | 2011/11/09 |
|---|---|
| 톰캣 6에서 컨텍스트 간 세션공유 (Cross context session sharing in Tomcat) (0) | 2011/07/23 |
| Sitemesh 2.4.1 + Weblogic 9.2 삽질기 (0) | 2010/02/05 |
| Tomcat -> Weblogic 전환 시 고려사항 (0) | 2009/01/19 |
| 브라우져 쿠키 제한(Browser cookie restrictions) (0) | 2008/07/17 |
| request.getRealPath() deprecated (1) | 2008/01/24 |
Prev
Rss Feed