반응형

Spring + ibatis jboss로 연동하여 DB select문, insert문, update문, delete문 등을

JAVA로 DB연결부터 시작하여 DB SQL문까지 구구절절 쓸 필요없이 XML로 SELECT문 등을 따로 적어넣고

사용할수가 있다.

 

그래서 필자는 구현중에 There is no statement named xxxx in this SqlMap 이러한 에러가 나와, 첫대면을 하게되었는데...?

영어 실력이 부족하지만;; 대충 맞춰보면...

SqlMap 안에 기재된 이름인 xxx가 없어서 존재하지않아 나는에러이다...

 

자세한 소스 내용은 제쳐두고, 간단하게만 소스 공개하도록 하겠다. 한줄..

스프링 관련책이나, jboss 5 책을보면서 이소스를 보면 무슨의미인지 알것이다.

 

java dao 부분에 구현된 소스 일부 (빨간색 소스 한줄이 xml에있는 sql를 실행시켜주는 부분이다.)

getSqlMapClientTemplate().queryForObject("com.sec.test.mo.selectList");

 

selectList.xml 구현부분

<sqlMap namespace="com.sec.test.mo">

    <select id="selectList" resultClass="java.lang.Integer" parameterClass="String">
        Select COUNT(*)
        FROM TCST_WEB_LOG
    </select>

 

sqlMap-config.xml 구현부분

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig      
    PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"            
    "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>

     <sqlMap resource="com.sec.test.mo/selectList.xml"/>
</sqlMapConfig>

 

// sqlMap resource 부분에 xml 파일 패키지부터 이름까지 지정이 안되어있으면

   There is no statement named xxxx in this SqlMap  에러가 발생하게된다.

   에러의 의미와도 맞게 sqlMap이 정의되어있지않아, 나는에러이다.

 

이게 아니면 dao 구현부분에서 queryForObject("com.sec.test.mo.selectList");

() 안에 내용이 잘못되어 문제를 일으킬수 있다.



출처: http://zanywitch.tistory.com/76 [엉뚱한 마녀의 상상!?]

반응형
반응형

SimpleMagic  example 입니다

SimpleMagic - Simple Magic Content and Mime Type Detection Java Package

Here's a quick "magic" number package that I whipped up which allows content-type (mime-type) determination from files and byte arrays. It makes use of the magic(5) Unix content-type files to implement the same functionality as the Unix file(1) command in Java which detects the contents of a file. It uses either internal config files or can read /etc/magic/usr/share/file/magic, or other magic(5) files and determine file content from FileInputStream, or byte[].

Simple Code Sample

The following is a quick code sample to help you get started using the library for mime-type detection.

// create a magic utility using the internal magic file
ContentInfoUtil util = new ContentInfoUtil();
// if you want to use a different config file(s), you can load them by hand:
// ContentInfoUtil util = new ContentInfoUtil("/etc/magic");
...
ContentInfo info = util.findMatch("/tmp/upload.tmp");
// or
ContentInfo info = util.findMatch(inputStream);
// or
ContentInfo info = util.findMatch(contentByteArray);
// display content type information
if (info == null) {
   System.out.println("Unknown content-type");
} else {
   // other information in ContentInfo type
   System.out.println("Content-type is: " + info.getName());
}

Free Spam Protection   Eggnog Recipe   Android ORM   Simple Java Magic   JMX using HTTP   OAuth 2.0 Simple Example   Great Eggnog Recipe   Christopher Randolph  


다운

링크 : https://github.com/j256/simplemagic

반응형
반응형

안녕하세요 첫 포스팅인데요 허접해도 
잘 봐주세요 ㅎ
일본 나고시에는 선술집을 찾기 힘든데요
숙소 근처에  이자카야 있는 걸 발견하고 가보았습니다!!
술 좋아하는 편이라서요 ㅋㅋ

이레 사진은 ! 정문 사진입니다!


아래 메뉴판 입니다!!
가격이  저렴합니다~ 놀랬습니다

하지만 푸드메뉴2에 맨아래 자리세 사람당 250엔 받는것이 보이실것입니다 
그래도 250엔 가만해도 가격이  싼편이네요 ㅋㅋ

저희는

roasts beaf salad 580엔짜리 시켜보았습니다 아래 ㅋㅋㅋ 고기가 부드럽고 맛있엇습니다

오리온 맥주도 빠질수가 없지요 ㅋㅋㅋ 생맥으로 한 두명이서 6잔 먹었네요

추가로 오리지날 샐러드 480엔 짜리 샐러드 시켜 보았는데요 참치도 들어있어 좋앗습니다!!

이자카야 아래 발빠지는 룸식입니다

일본 메뉴판이라 보기만하였습니다 ㅎ

중요한 
맵코드는 206 656 154*55 입니다!!

많이 부족한 첫포스팅이었습니다

감사합니다


반응형

'여행 & 맛집' 카테고리의 다른 글

송리단길 맛집  (1) 2025.01.17

+ Recent posts