Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 81669 invoked from network); 30 Dec 2005 09:13:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Dec 2005 09:13:39 -0000 Received: (qmail 28035 invoked by uid 500); 30 Dec 2005 09:13:37 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 28019 invoked by uid 500); 30 Dec 2005 09:13:36 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 28003 invoked by uid 99); 30 Dec 2005 09:13:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2005 01:13:36 -0800 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_MESSAGE,X_PRIORITY_HIGH X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [202.69.19.105] (HELO mx3.paic.com.cn) (202.69.19.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2005 01:13:33 -0800 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C60D21.3F21CAE2" Subject: About reuse SQL-fragments ?? X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Fri, 30 Dec 2005 17:13:06 +0800 Message-ID: <28DF93747C6F574CA2F76D7CDAA81B9F01124795@PAMAIL2.paicdom.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: About reuse SQL-fragments ?? Thread-Index: AcYNIT6H0mBSl/sRQ3efiNbaLTiHhg== X-Priority: 1 Priority: Urgent Importance: high From: =?GB2312?B?1cX2ztPu?= To: X-OriginalArrivalTime: 30 Dec 2005 09:13:07.0688 (UTC) FILETIME=[3F7D0E80:01C60D21] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C60D21.3F21CAE2 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: quoted-printable Hi: The url below said: The -tag is namespace-aware so you can refer to fragments even w= hen they are located in another map. http://opensource2.atlassian.com/confluence/oss/pages/viewpage.action= ?pageId=3D707 =20 so we write the two sqlMap file like below: =20 sqlMap-Test.xml: =20 =20 =20 sqlMap-Global.xml =20 =A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD =20 =A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD =20 but when i used it i get the error: =20 com.paic.pafa.app.lwc.core.beans.factory.BeanCreationException: Error occ= urred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.= Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsin= g XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletExce= ption: Error parsing XML. Cause: com.ibatis.common.exception.NestedRunti= meException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.com= mon.exception.NestedRuntimeException: Could not find SQL statement to inc= lude with refid 'global.prefixSql' Caused by: com.ibatis.common.exception.NestedRuntimeException: Could not = find SQL statement to include with refid 'global.prefixSql' Caused by: com.ibatis.common.exception.NestedRuntimeException: Error pars= ing XPath '/sqlMap/select'. Cause: com.ibatis.common.exception.NestedRun= timeException: Could not find SQL statement to include with refid 'global= =2EprefixSql' Caused by: com.ibatis.common.exception.NestedRuntimeException: Could not = find SQL statement to include with refid 'global.prefixSql' Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Ca= use: com.ibatis.common.exception.NestedRuntimeException: Error parsing XP= ath '/sqlMap/select'. Cause: com.ibatis.common.exception.NestedRuntimeEx= ception: Could not find SQL statement to include with refid 'global.prefi= xSql' Caused by: com.ibatis.common.exception.NestedRuntimeException: Could not = find SQL statement to include with refid 'global.prefixSql' Caused by: com.ibatis.common.exception.NestedRuntimeException: Error pars= ing XPath '/sqlMap/select'. Cause: com.ibatis.common.exception.NestedRun= timeException: Could not find SQL statement to include with refid 'global= =2EprefixSql' =A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD =20 help me please! =20 Thanks, xinyu =20 *************************************************************************= ******************************************************* The information in this email is confidential and may be legally privileg= ed. If you have received this email in error or are not the intended recipient, please immediately notify the sender and dele= te this message from your computer. Any use, distribution, or copying of this email other than by the intended recipient is strictly= prohibited. All messages sent to and from us may be=20 monitored to ensure compliance with internal policies and to protect our = business.=20 Emails are not secure and cannot be guaranteed to be error free as they c= an be intercepted, amended, lost or destroyed,=20 or contain viruses. Anyone who communicates with us by email is taken to = accept these risks.=20 =CA=D5=B7=A2=D3=CA=BC=FE=D5=DF=C7=EB=D7=A2=D2=E2=A3=BA =B1=BE=D3=CA=BC=FE=BA=AC=B1=A3=C3=DC=D0=C5=CF=A2=A3=AC=C8=F4=CE=F3=CA=D5=B1= =BE=D3=CA=BC=FE=A3=AC=C7=EB=CE=F1=B1=D8=CD=A8=D6=AA=B7=A2=CB=CD=C8=CB=B2=A2= =D6=B1=BD=D3=C9=BE=C8=A5=A3=AC=B2=BB=B5=C3=CA=B9=D3=C3=A1=A2=B4=AB=B2=A5=BB= =F2=B8=B4=D6=C6=B1=BE=D3=CA=BC=FE=A1=A3 =BD=F8=B3=F6=D3=CA=BC=FE=BE=F9=CA=DC=B5=BD=B1=BE=B9=AB=CB=BE=BA=CF=B9=E6=BC= =E0=BF=D8=A1=A3=D3=CA=BC=FE=BF=C9=C4=DC=B7=A2=C9=FA=B1=BB=BD=D8=C1=F4=A1=A2= =B1=BB=D0=DE=B8=C4=A1=A2=B6=AA=CA=A7=A1=A2=B1=BB=C6=C6=BB=B5=BB=F2=B0=FC=BA= =AC=BC=C6=CB=E3=BB=FA=B2=A1=B6=BE=B5=C8=B2=BB=B0=B2=C8=AB=C7=E9=BF=F6=A1=A3= =20 *************************************************************************= ******************************************************* ------_=_NextPart_001_01C60D21.3F21CAE2 Content-Type: text/html; charset="GB2312" Content-Transfer-Encoding: quoted-printable
Hi:
    = The url below said:
The <include>-tag is namespace-aware so you can refer to = fragments=20 even when they are located in another map.
    http://opensource2.atlassian.com/confluence/oss/pages/= viewpage.action?pageId=3D707
 
so we write the two = sqlMap file=20 like below:
 
sqlMap-Test.xml:
<sqlMap=20 namespace=3D"test">
 
<select id=3D"query_id"=20 parameterClass=3D"CountableQueryCriteria" = resultClass=3D"java.util.HashMap"=20 remapResults=3D"true">
 <include=20 refid=3D"global.prefixSql"/>  
 select * from=20 account_main
 <include=20 refid=3D"global.suffixSql"/>
</select> 
</sqlMap&g= t;
 
sqlMap-Global.xml
 
<sqlMap=20 namespace=3D"global">
 <sql=20 id=3D"prefixSql">
    =A1=AD=A1=AD=A1=AD=A1=AD=A1= =AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD
 </sql>=20
 <sql id=3D"suffixSql">
   =20 =A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD
 </sql>
</sqlMap>
 
but when i used it = i get the=20 error:
 
com.paic.pafa.app.lwc.core.beans.factory.BeanCreationException: = Error=20 occurred.  Cause: com.ibatis.common.xml.NodeletException: Error = parsing=20 XML.  Cause: com.ibatis.common.exception.NestedRuntimeException: = Error=20 parsing XPath '/sqlMapConfig/sqlMap'.  Cause:=20 com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:=20 com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath=20 '/sqlMap/select'.  Cause:=20 com.ibatis.common.exception.NestedRuntimeException: Could not find SQL = statement=20 to include with refid 'global.prefixSql'
Caused by:=20 com.ibatis.common.exception.NestedRuntimeException: Could not find SQL = statement=20 to include with refid 'global.prefixSql'
Caused by:=20 com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath=20 '/sqlMap/select'.  Cause:=20 com.ibatis.common.exception.NestedRuntimeException: Could not find SQL = statement=20 to include with refid 'global.prefixSql'
Caused by:=20 com.ibatis.common.exception.NestedRuntimeException: Could not find SQL = statement=20 to include with refid 'global.prefixSql'
Caused by:=20 com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:=20 com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath=20 '/sqlMap/select'.  Cause:=20 com.ibatis.common.exception.NestedRuntimeException: Could not find SQL = statement=20 to include with refid 'global.prefixSql'
Caused by:=20 com.ibatis.common.exception.NestedRuntimeException: Could not find SQL = statement=20 to include with refid 'global.prefixSql'
Caused by:=20 com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath=20 '/sqlMap/select'.  Cause:=20 com.ibatis.common.exception.NestedRuntimeException: Could not find SQL = statement=20 to include with refid 'global.prefixSql'
=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD=A1=AD
 
help me please!
 
Thanks,
xinyu
 
------_=_NextPart_001_01C60D21.3F21CAE2--