You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Henry Lu <zh...@umich.edu> on 2006/01/23 15:59:11 UTC

junit test

I go the following error when I did JUnit test:

setUp()----------
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'sqlMapClient' defined in file 
[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean 
failed; nested exception is 
com.ibatis.common.exception.NestedRuntimeException: Error occurred.  
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing 
XPath '/sqlMapConfig/sqlMap'.  Cause: 
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
org.xml.sax.SAXParseException: Attribute "namespace" is not declared for 
element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".

However, it works when I run the application.

Here is code for JUNit test:

        org.springframework.context.ApplicationContext ctx = null;
        String[] paths = { "/WEB-INF/test/datasource_beans_test.xml",
            "/WEB-INF/authorize-spring.xml",
            "/WEB-INF/spring-auth.xml",
            "/WEB-INF/app_beans.xml"};
        ctx = new FileSystemXmlApplicationContext(paths);

How to make JUnit works?

-Henry

Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
xml-apis.jar
xercesImpl.jar

Remember, my application works just fine with all jar files.

-Henry

AHrakou@iba.by wrote:

>
> what about XML?
>
>  Cause:
> > org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> > element "sqlMap".
> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> > declared for element "sqlMap".
>
> !!!
> Attribute "namespace" is not declared for
> > element "sqlMap".
>
>  C  уважением,
>                Алексей.    
>
>   mobile: +375-029-708-2168                    
>   email:   horal@tut.by      
>
>
> *Henry Lu <zh...@umich.edu>*
>
> 23.01.2006 17:12
> Please respond to
> user-java@ibatis.apache.org
>
>
> 	
> To
> 	user-java@ibatis.apache.org
> cc
> 	
> Subject
> 	Re: junit test
>
>
>
> 	
>
>
>
>
>
> All correct version. Because it works for the application.
>
> ibatis-common-2.jar
> ibatis-dao-2.jar
> ibatis-sqlmap-2.jar
> and spring  1.2.6
>
> AHrakou@iba.by wrote:
>
> >
> > Check that you use the correct libraries for spring and ibatis.
> >
> >
> > Also check your XML:
> >
> > Cause:
> > org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> > element "sqlMap".
> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> > declared for element "sqlMap".
> >
> >  C  уважением,
> >                Алексей.    
> >
> >   mobile: +375-029-708-2168                    
> >   email:   horal@tut.by      
> >
> >
> > *Henry Lu <zh...@umich.edu>*
> >
> > 23.01.2006 16:59
> > Please respond to
> > user-java@ibatis.apache.org
> >
> >
> >                  
> > To
> >                  user-java@ibatis.apache.org
> > cc
> >                  
> > Subject
> >                  junit test
> >
> >
> >
> >                  
> >
> >
> >
> >
> >
> > I go the following error when I did JUnit test:
> >
> > setUp()----------
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'sqlMapClient' defined in file
> > [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
> > failed; nested exception is
> > com.ibatis.common.exception.NestedRuntimeException: Error occurred.  
> > Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  
> > Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
> > XPath '/sqlMapConfig/sqlMap'.  Cause:
> > com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> > org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> > element "sqlMap".
> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> > declared for element "sqlMap".
> >
> > However, it works when I run the application.
> >
> > Here is code for JUNit test:
> >
> >        org.springframework.context.ApplicationContext ctx = null;
> >        String[] paths = { "/WEB-INF/test/datasource_beans_test.xml",
> >            "/WEB-INF/authorize-spring.xml",
> >            "/WEB-INF/spring-auth.xml",
> >            "/WEB-INF/app_beans.xml"};
> >        ctx = new FileSystemXmlApplicationContext(paths);
> >
> > How to make JUnit works?
> >
> > -Henry
> >
>

Re: junit test

Posted by Larry Meadors <lm...@apache.org>.
Henry, your DTD is just plain wrong.

You have "http://www.ibatis.com/dtd/sql-map-config-2.dtd".

That is wrong, wrong, wrong. You are making a sql map, not a sql map CONFIG.

You need "http://ibatis.apache.org/dtd/sql-map-2.dtd" instead.

Fix your DTD, and there will be much rejoicing.

Larry


On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> Thanks Ben but that doesn't solve the problem.
> http://ibatis.apache.org/dtd/sql-map-2.dtd is still there. See the
> problem is that EVERY thing work just fine with 2.1.5 but not 2.1.6 and
> 2.1.7 for JUnit. All versions work just fine for web applications.
>
> -Henry
>
> Ben Munat wrote:
>
> > Henry,
> >
> > Try switching to the new DTD:
> >
> > <!DOCTYPE sqlMap
> >     PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
> >     "http://ibatis.apache.org/dtd/sql-map-2.dtd">
> >
> > The DTD is no longer available at ibatis.com. Maybe that's screwing up
> > junit.
> >
> > b
> >
> >
> >
> > Henry Lu wrote:
> >
> >> Here is my ibatis configuration file:
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <!DOCTYPE sqlMapConfig
> >> PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
> >> "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> >>
> >> <sqlMapConfig>
> >> <sqlMap resource=
> >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
> >> <sqlMap resource=
> >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
> >> <sqlMap resource=
> >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
> >> </sqlMapConfig>
> >>
> >> It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7. What is
> >> wrong with my file?
> >>
> >> -Henry
> >>
> >> Nathan Maves wrote:
> >>
> >>> Becaureful what you claim :)
> >>>
> >>> ibatis works perfectly fine with ibatis.  If you need proof
> >>> download  the source of ibatis and run the unit testing for it.
> >>>
> >>> What you are trying to say is that your unit tests are failing.  I
> >>> can see this but the first line of your error message.  This is not
> >>> an ibatis class throwing this exception.  The problem appears to be
> >>> that you have not specified your namespace in the app_beans.xml.
> >>> Either specify that  or set the namespaces attribute to false in
> >>> your  sqlmapconfig.
> >>>
> >>> Nathan
> >>>
> >>> On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
> >>>
> >>>> iBatis2.1.7 DOES NOT work with JUnit!!!
> >>>>
> >>>> org.springframework.beans.factory.BeanCreationException: Error
> >>>> creating bean with name 'sqlMapClient' defined in file [C:\devel
> >>>> \webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
> >>>> failed; nested exception is
> >>>> com.ibatis.common.exception.NestedRuntimeException: Error
> >>>> occurred.  Cause: com.ibatis.common.xml.NodeletException: Error
> >>>> parsing XML.  Cause:
> >>>> com.ibatis.common.exception.NestedRuntimeException: Error parsing
> >>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>> declared for element "sqlMap".
> >>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>> not declared for element "sqlMap".
> >>>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing
> >>>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"
> >>>> is not declared for element "sqlMap".
> >>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>> not declared for element "sqlMap".
> >>>> Caused by: com.ibatis.common.exception.NestedRuntimeException:
> >>>> Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>> declared for element "sqlMap".
> >>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>> not declared for element "sqlMap".
> >>>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing
> >>>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"
> >>>> is not declared for element "sqlMap".
> >>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>> not declared for element "sqlMap".
> >>>>
> >>>>
> >>>> -Henry
> >>>>
> >>>>
> >>>> Nathan Maves wrote:
> >>>>
> >>>>> Not sure what the issue it since you have not included any error
> >>>>> messages but you should upgrade your 2.1.6 to 2.1.7.
> >>>>>
> >>>>>
> >>>>> Nathan
> >>>>>
> >>>>> On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
> >>>>>
> >>>>>> Bad news! iBatis 2.1.6 doesn't work for Junit test with java
> >>>>>> 1.5.  When I switched iBatis back to 1.5, it works. Any idea
> >>>>>> why?  in  Fixing? new Version coming out with fixing?
> >>>>>>
> >>>>>> -Henry
> >>>>>>
> >>>>>> Larry Meadors wrote:
> >>>>>>
> >>>>>>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
> >>>>>>>
> >>>>>>> IIRC, it was pissed about the lack of a xalan impl but once I
> >>>>>>> put  that
> >>>>>>> in devlib it was happy.
> >>>>>>>
> >>>>>>> Larry
> >>>>>>>
> >>>>>>>
> >>>>>>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> >>>>>>>
> >>>>>>>> I am using Junit test within the eClipse.
> >>>>>>>>
> >>>>>>>> -Henry
> >>>>>>>>
> >>>>>>>> Nathan Maves wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>> Your application work because java is backwards compatible.  The
> >>>>>>>>> build script, which includes the unit tests will not run with
> >>>>>>>>> java
> >>>>>>>>> 1.5.  I think there are classloader issues that require you
> >>>>>>>>> to  mess
> >>>>>>>>> with the dependancies.
> >>>>>>>>>
> >>>>>>>>> Just to reiterate there are no know issues with using ibatis
> >>>>>>>>> on  Java
> >>>>>>>>> 1.5.  We have been using it for a while now.
> >>>>>>>>>
> >>>>>>>>> Nathan
> >>>>>>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> Thanks for your info! Why my application works with jdk 1.5 and
> >>>>>>>>>> JUnit doesn't with with jdk1.5?
> >>>>>>>>>>
> >>>>>>>>>> -Henry
> >>>>>>>>>>
> >>>>>>>>>> Nathan Maves wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>> If you are asking about the JUnit tests for the ibatis code
> >>>>>>>>>>> then
> >>>>>>>>>>> yes  and no :)
> >>>>>>>>>>>
> >>>>>>>>>>> I have tried it and it will not work.  You need to run the unit
> >>>>>>>>>>> tests  with 1.4.  For now the plans looks like we might try to
> >>>>>>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this
> >>>>>>>>>>> but I
> >>>>>>>>>>> would be a good  thing for ibatis.
> >>>>>>>>>>>
> >>>>>>>>>>> Nathan
> >>>>>>>>>>>
> >>>>>>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for
> >>>>>>>>>>>> ibatis?
> >>>>>>>>>>>>
> >>>>>>>>>>>> -Henry
> >>>>>>>>>>>>
> >>>>>>>>>>>> AHrakou@iba.by wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>> what about XML?
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Cause:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> "namespace"  is not
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> declared for element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> !!!
> >>>>>>>>>>>>> Attribute "namespace" is not declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> C  уважением,
> >>>>>>>>>>>>>               Алексей.
> >>>>>>>>>>>>>  mobile: +375-029-708-2168                      email:
> >>>>>>>>>>>>> horal@tut.by
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> 23.01.2006 17:12
> >>>>>>>>>>>>> Please respond to
> >>>>>>>>>>>>> user-java@ibatis.apache.org
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>    To
> >>>>>>>>>>>>>    user-java@ibatis.apache.org
> >>>>>>>>>>>>> cc
> >>>>>>>>>>>>>    Subject
> >>>>>>>>>>>>>    Re: junit test
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> All correct version. Because it works for the application.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> ibatis-common-2.jar
> >>>>>>>>>>>>> ibatis-dao-2.jar
> >>>>>>>>>>>>> ibatis-sqlmap-2.jar
> >>>>>>>>>>>>> and spring  1.2.6
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> AHrakou@iba.by wrote:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> Check that you use the correct libraries for spring and
> >>>>>>>>>>>>>> ibatis.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> Also check your XML:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> Cause:
> >>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> "namespace"  is not
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> declared for element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> C  уважением,
> >>>>>>>>>>>>>>               Алексей.    >
> >>>>>>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> horal@tut.by      >
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> 23.01.2006 16:59
> >>>>>>>>>>>>>> Please respond to
> >>>>>>>>>>>>>> user-java@ibatis.apache.org
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>                 > To
> >>>>>>>>>>>>>>                 user-java@ibatis.apache.org
> >>>>>>>>>>>>>> cc
> >>>>>>>>>>>>>>                 > Subject
> >>>>>>>>>>>>>>                 junit test
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>                 >
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I go the following error when I did JUnit test:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> setUp()----------
> >>>>>>>>>>>>>> org.springframework.beans.factory.BeanCreationException:
> >>>>>>>>>>>>>> E rror
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> creating
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> bean with name 'sqlMapClient' defined in file
> >>>>>>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> Initialization  of bean
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> failed; nested exception is
> >>>>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> >>>>>>>>>>>>> Error  parsing XML.  > Cause:
> >>>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException:
> >>>>>>>>>>>>> Error   parsing
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>>>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing
> >>>>>>>>>>>>>> XML.   Cause:
> >>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> "namespace"  is not
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> declared for element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> However, it works when I run the application.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> Here is code for JUNit test:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>       org.springframework.context.ApplicationContext ctx
> >>>>>>>>>>>>>> =  null;
> >>>>>>>>>>>>>>       String[] paths = { "/WEB-INF/test/
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> datasource_beans_test.xml",
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
> >>>>>>>>>>>>>>           "/WEB-INF/spring-auth.xml",
> >>>>>>>>>>>>>>           "/WEB-INF/app_beans.xml"};
> >>>>>>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> How to make JUnit works?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> -Henry
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >>>
> >
> >
>

Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
Okay, finally everything is sorted out nicely.

the old dtd files don't work with with 2.1.6 and 2.1.7 for JUnit 
testing. I change all dtd locations and JUnit testing works now.

Thanks for all your help! Sorry for the confusion.

-Henry

Clinton Begin wrote:

>
> I think Larry does get the point and is absolutely right.  Your DTDs 
> are messed up, whether that's the problem or not, we don't know.  Your 
> DTDs should read:
>
><!DOCTYPE sqlMapConfig      
>    PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"      
>    "http://ibatis.apache.org/dtd/sql-map-config-2.dtd
> <http://ibatis.apache.org/dtd/sql-map-config-2.dtd>">
>
><!DOCTYPE sqlMap      
>    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"      
>    "http://ibatis.apache.org/dtd/sql-map-2.dtd">
>
>
><!DOCTYPE dao      
>    PUBLIC "-//ibatis.apache.org//DTD DAO Configuration 2.0//EN"      
>    "http://ibatis.apache.org/dtd/dao-2.dtd">
>  
>
> Change them and then try building with tests from the command line.
> Cheers,
> Clinton
>
>
> On 1/24/06, *Henry Lu* <zhlu@umich.edu <ma...@umich.edu>> wrote:
>
>     You don't get the point. All files, code are working just fine in
>     my web
>     application. When I started JUnit testing, I got this errors/issue.
>
>     -Henry
>
>     Larry Meadors wrote:
>
>     >I think your DTD is buggered up - should be ibatis.apache.org
>     <http://ibatis.apache.org>, not ibatis.com <http://ibatis.com>.
>     >
>     >On 1/24/06, Henry Lu <zhlu@umich.edu <ma...@umich.edu>> wrote:
>     >
>     >
>     >>Here is my ibatis configuration file:
>     >>
>     >><?xml version="1.0" encoding="UTF-8"?>
>     >><!DOCTYPE sqlMapConfig
>     >>PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>     >>"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>     >>
>     >><sqlMapConfig>
>     >> <sqlMap resource=
>     >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
>     >> <sqlMap resource=
>     >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
>     >> <sqlMap resource=
>     >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
>     >></sqlMapConfig>
>     >>
>     >>It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7.
>     What is
>     >>wrong with my file?
>     >>
>     >>-Henry
>     >>
>     >>Nathan Maves wrote:
>     >>
>     >>
>     >>
>     >>>Becaureful what you claim :)
>     >>>
>     >>>ibatis works perfectly fine with ibatis.  If you need proof
>     download
>     >>>the source of ibatis and run the unit testing for it.
>     >>>
>     >>>What you are trying to say is that your unit tests are failing.  I
>     >>>can see this but the first line of your error message.  This is
>     not
>     >>>an ibatis class throwing this exception.  The problem appears to be
>     >>>that you have not specified your namespace in the app_beans.xml.
>     >>>Either specify that  or set the namespaces attribute to false
>     in your
>     >>>sqlmapconfig.
>     >>>
>     >>>Nathan
>     >>>
>     >>>On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
>     >>>
>     >>>
>     >>>
>     >>>>iBatis2.1.7 DOES NOT work with JUnit!!!
>     >>>>
>     >>>>org.springframework.beans.factory.BeanCreationException: Error
>     >>>>creating bean with name 'sqlMapClient' defined in file [C:\devel
>     >>>>\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
>     >>>>failed; nested exception is
>     >>>>com.ibatis.common.exception.NestedRuntimeException:
>     Error  occurred.
>     >>>>Cause: com.ibatis.common.xml.NodeletException: Error  parsing
>     XML.
>     >>>>Cause:  com.ibatis.common.exception.NestedRuntimeException: Error
>     >>>>parsing  XPath '/sqlMapConfig/sqlMap'.  Cause:
>     >>>>com.ibatis.common.xml.NodeletException: Error parsing
>     XML.  Cause:
>     >>>>org.xml.sax.SAXParseException: Attribute "namespace" is
>     not  declared
>     >>>>for element "sqlMap".
>     >>>>Caused by: org.xml.sax.SAXParseException: Attribute
>     "namespace" is
>     >>>>not declared for element "sqlMap".
>     >>>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing
>     >>>>XML.  Cause: org.xml.sax.SAXParseException: Attribute
>     "namespace"  is
>     >>>>not declared for element "sqlMap".
>     >>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
>     >>>>not declared for element "sqlMap".
>     >>>>Caused by:
>     com.ibatis.common.exception.NestedRuntimeException:  Error
>     >>>>parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
>     >>>>com.ibatis.common.xml.NodeletException: Error parsing
>     XML.  Cause:
>     >>>>org.xml.sax.SAXParseException: Attribute "namespace" is
>     not  declared
>     >>>>for element "sqlMap".
>     >>>>Caused by: org.xml.sax.SAXParseException: Attribute
>     "namespace" is
>     >>>>not declared for element "sqlMap".
>     >>>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing
>     >>>>XML.  Cause: org.xml.sax.SAXParseException: Attribute
>     "namespace"  is
>     >>>>not declared for element "sqlMap".
>     >>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
>     >>>>not declared for element "sqlMap".
>     >>>>
>     >>>>
>     >>>>-Henry
>     >>>>
>     >>>>
>     >>>>Nathan Maves wrote:
>     >>>>
>     >>>>
>     >>>>
>     >>>>>Not sure what the issue it since you have not included any error
>     >>>>>messages but you should upgrade your 2.1.6 to 2.1.7.
>     >>>>>
>     >>>>>
>     >>>>>Nathan
>     >>>>>
>     >>>>>On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>>>Bad news! iBatis 2.1.6 doesn't work for Junit test with
>     java  1.5.
>     >>>>>>When I switched iBatis back to 1.5, it works. Any idea why?  in
>     >>>>>>Fixing? new Version coming out with fixing?
>     >>>>>>
>     >>>>>>-Henry
>     >>>>>>
>     >>>>>>Larry Meadors wrote:
>     >>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>>>I am using, and have built iBATIS with jdk1.5 - unit tests
>     and all.
>     >>>>>>>
>     >>>>>>>IIRC, it was pissed about the lack of a xalan impl but once I
>     >>>>>>>put  that
>     >>>>>>>in devlib it was happy.
>     >>>>>>>
>     >>>>>>>Larry
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>On 1/23/06, Henry Lu <zhlu@umich.edu
>     <ma...@umich.edu>> wrote:
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>>I am using Junit test within the eClipse.
>     >>>>>>>>
>     >>>>>>>>-Henry
>     >>>>>>>>
>     >>>>>>>>Nathan Maves wrote:
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>>Your application work because java is backwards
>     compatible.  The
>     >>>>>>>>>build script, which includes the unit tests will not run
>     with  java
>     >>>>>>>>>1.5.  I think there are classloader issues that require
>     you to
>     >>>>>>>>>mess
>     >>>>>>>>>with the dependancies.
>     >>>>>>>>>
>     >>>>>>>>>Just to reiterate there are no know issues with using ibatis
>     >>>>>>>>>on  Java
>     >>>>>>>>>1.5.  We have been using it for a while now.
>     >>>>>>>>>
>     >>>>>>>>>Nathan
>     >>>>>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>>Thanks for your info! Why my application works with jdk
>     1.5 and
>     >>>>>>>>>>JUnit doesn't with with jdk1.5?
>     >>>>>>>>>>
>     >>>>>>>>>>-Henry
>     >>>>>>>>>>
>     >>>>>>>>>>Nathan Maves wrote:
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>>If you are asking about the JUnit tests for the ibatis
>     code  then
>     >>>>>>>>>>>yes  and no :)
>     >>>>>>>>>>>
>     >>>>>>>>>>>I have tried it and it will not work.  You need to run
>     the unit
>     >>>>>>>>>>>tests  with 1.4.  For now the plans looks like we might
>     try to
>     >>>>>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this
>     >>>>>>>>>>>but I
>     >>>>>>>>>>>would be a good  thing for ibatis.
>     >>>>>>>>>>>
>     >>>>>>>>>>>Nathan
>     >>>>>>>>>>>
>     >>>>>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for
>     >>>>>>>>>>>>ibatis?
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>-Henry
>     >>>>>>>>>>>>
>     >>>>>>>>>>>> AHrakou@iba.by <ma...@iba.by> wrote:
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>>what about XML?
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>Cause:
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
>     is not
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>declared for
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>"namespace"  is not
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>declared for element "sqlMap".
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>!!!
>     >>>>>>>>>>>>>Attribute "namespace" is not declared for
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>C  уважением,
>     >>>>>>>>>>>>>              Алексей.
>     >>>>>>>>>>>>> mobile: +375-029-708-2168                      email:
>     >>>>>>>>>>>>>horal@tut.by <ma...@tut.by>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>*Henry Lu < zhlu@umich.edu <ma...@umich.edu>>*
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>23.01.2006 17:12
>     >>>>>>>>>>>>>Please respond to
>     >>>>>>>>>>>>>user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>   To
>     >>>>>>>>>>>>>   user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>>>cc
>     >>>>>>>>>>>>>   Subject
>     >>>>>>>>>>>>>   Re: junit test
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>All correct version. Because it works for the
>     application.
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>ibatis-common-2.jar
>     >>>>>>>>>>>>>ibatis-dao-2.jar
>     >>>>>>>>>>>>> ibatis-sqlmap-2.jar
>     >>>>>>>>>>>>>and spring  1.2.6
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>> AHrakou@iba.by <ma...@iba.by> wrote:
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>Check that you use the correct libraries for spring and
>     >>>>>>>>>>>>>>ibatis.
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>Also check your XML:
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>Cause:
>     >>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
>     is not
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>declared for
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException : Attribute
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>"namespace"  is not
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>declared for element "sqlMap".
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>C  уважением,
>     >>>>>>>>>>>>>>              Алексей.    >
>     >>>>>>>>>>>>>> mobile: +375-029-708-2168                    >   email:
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>> horal@tut.by <ma...@tut.by>      >
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>*Henry Lu <zhlu@umich.edu <ma...@umich.edu>>*
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>> 23.01.2006 16:59
>     >>>>>>>>>>>>>>Please respond to
>     >>>>>>>>>>>>>>user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>                > To
>     >>>>>>>>>>>>>>                user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>>>>cc
>     >>>>>>>>>>>>>>                > Subject
>     >>>>>>>>>>>>>>                junit test
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>                >
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>I go the following error when I did JUnit test:
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>setUp()----------
>     >>>>>>>>>>>>>>org.springframework.beans.factory.BeanCreationException:
>     >>>>>>>>>>>>>>E rror
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>creating
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>bean with name 'sqlMapClient' defined in file
>     >>>>>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>Initialization  of bean
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>failed; nested exception is
>     >>>>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException :
>     Error
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>occurred.  > Cause:
>     com.ibatis.common.xml.NodeletException:
>     >>>>>>>>>>>>>Error  parsing XML.  > Cause:
>     >>>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException :
>     Error
>     >>>>>>>>>>>>>parsing
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>     >>>>>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing
>     >>>>>>>>>>>>>>XML.   Cause:
>     >>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
>     is not
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>declared for
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException : Attribute
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>"namespace"  is not
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>declared for element "sqlMap".
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>However, it works when I run the application.
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>Here is code for JUNit test:
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>      org.springframework.context.ApplicationContext ctx
>     >>>>>>>>>>>>>>=  null;
>     >>>>>>>>>>>>>>      String[] paths = { "/WEB-INF/test/
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>datasource_beans_test.xml",
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>
>     >>>>>>>>>>>>>>          "/WEB-INF/authorize-spring.xml",
>     >>>>>>>>>>>>>>          "/WEB-INF/spring-auth.xml",
>     >>>>>>>>>>>>>>          "/WEB-INF/app_beans.xml"};
>     >>>>>>>>>>>>>>      ctx = new FileSystemXmlApplicationContext(paths);
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>How to make JUnit works?
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>-Henry
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>
>     >>>
>     >>>
>
>

Re: junit test

Posted by Clinton Begin <cl...@gmail.com>.
I think Larry does get the point and is absolutely right.  Your DTDs are
messed up, whether that's the problem or not, we don't know.  Your DTDs
should read:

<!DOCTYPE sqlMapConfig
    PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
    "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">

<!DOCTYPE sqlMap
    PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">

<!DOCTYPE dao
    PUBLIC "-//ibatis.apache.org//DTD DAO Configuration 2.0//EN"
    "http://ibatis.apache.org/dtd/dao-2.dtd">

Change them and then try building with tests from the command line.
Cheers,
Clinton


On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
>
> You don't get the point. All files, code are working just fine in my web
> application. When I started JUnit testing, I got this errors/issue.
>
> -Henry
>
> Larry Meadors wrote:
>
> >I think your DTD is buggered up - should be ibatis.apache.org, not
> ibatis.com.
> >
> >On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> >
> >
> >>Here is my ibatis configuration file:
> >>
> >><?xml version="1.0" encoding="UTF-8"?>
> >><!DOCTYPE sqlMapConfig
> >>PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
> >>"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> >>
> >><sqlMapConfig>
> >> <sqlMap resource=
> >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
> >> <sqlMap resource=
> >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
> >> <sqlMap resource=
> >>   "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
> >></sqlMapConfig>
> >>
> >>It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7. What is
> >>wrong with my file?
> >>
> >>-Henry
> >>
> >>Nathan Maves wrote:
> >>
> >>
> >>
> >>>Becaureful what you claim :)
> >>>
> >>>ibatis works perfectly fine with ibatis.  If you need proof download
> >>>the source of ibatis and run the unit testing for it.
> >>>
> >>>What you are trying to say is that your unit tests are failing.  I
> >>>can see this but the first line of your error message.  This is not
> >>>an ibatis class throwing this exception.  The problem appears to be
> >>>that you have not specified your namespace in the app_beans.xml.
> >>>Either specify that  or set the namespaces attribute to false in your
> >>>sqlmapconfig.
> >>>
> >>>Nathan
> >>>
> >>>On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
> >>>
> >>>
> >>>
> >>>>iBatis2.1.7 DOES NOT work with JUnit!!!
> >>>>
> >>>>org.springframework.beans.factory.BeanCreationException: Error
> >>>>creating bean with name 'sqlMapClient' defined in file [C:\devel
> >>>>\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
> >>>>failed; nested exception is
> >>>>com.ibatis.common.exception.NestedRuntimeException: Error  occurred.
> >>>>Cause: com.ibatis.common.xml.NodeletException: Error  parsing XML.
> >>>>Cause:  com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>parsing  XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >>>>org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
> >>>>for element "sqlMap".
> >>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>>not declared for element "sqlMap".
> >>>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing
> >>>>XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
> >>>>not declared for element "sqlMap".
> >>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>>not declared for element "sqlMap".
> >>>>Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error
> >>>>parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >>>>org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
> >>>>for element "sqlMap".
> >>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>>not declared for element "sqlMap".
> >>>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing
> >>>>XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
> >>>>not declared for element "sqlMap".
> >>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >>>>not declared for element "sqlMap".
> >>>>
> >>>>
> >>>>-Henry
> >>>>
> >>>>
> >>>>Nathan Maves wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Not sure what the issue it since you have not included any error
> >>>>>messages but you should upgrade your 2.1.6 to 2.1.7.
> >>>>>
> >>>>>
> >>>>>Nathan
> >>>>>
> >>>>>On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Bad news! iBatis 2.1.6 doesn't work for Junit test with java  1.5.
> >>>>>>When I switched iBatis back to 1.5, it works. Any idea why?  in
> >>>>>>Fixing? new Version coming out with fixing?
> >>>>>>
> >>>>>>-Henry
> >>>>>>
> >>>>>>Larry Meadors wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
> >>>>>>>
> >>>>>>>IIRC, it was pissed about the lack of a xalan impl but once I
> >>>>>>>put  that
> >>>>>>>in devlib it was happy.
> >>>>>>>
> >>>>>>>Larry
> >>>>>>>
> >>>>>>>
> >>>>>>>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>I am using Junit test within the eClipse.
> >>>>>>>>
> >>>>>>>>-Henry
> >>>>>>>>
> >>>>>>>>Nathan Maves wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>Your application work because java is backwards compatible.  The
> >>>>>>>>>build script, which includes the unit tests will not run
> with  java
> >>>>>>>>>1.5.  I think there are classloader issues that require you to
> >>>>>>>>>mess
> >>>>>>>>>with the dependancies.
> >>>>>>>>>
> >>>>>>>>>Just to reiterate there are no know issues with using ibatis
> >>>>>>>>>on  Java
> >>>>>>>>>1.5.  We have been using it for a while now.
> >>>>>>>>>
> >>>>>>>>>Nathan
> >>>>>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>Thanks for your info! Why my application works with jdk 1.5 and
> >>>>>>>>>>JUnit doesn't with with jdk1.5?
> >>>>>>>>>>
> >>>>>>>>>>-Henry
> >>>>>>>>>>
> >>>>>>>>>>Nathan Maves wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>>If you are asking about the JUnit tests for the ibatis
> code  then
> >>>>>>>>>>>yes  and no :)
> >>>>>>>>>>>
> >>>>>>>>>>>I have tried it and it will not work.  You need to run the unit
> >>>>>>>>>>>tests  with 1.4.  For now the plans looks like we might try to
> >>>>>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this
> >>>>>>>>>>>but I
> >>>>>>>>>>>would be a good  thing for ibatis.
> >>>>>>>>>>>
> >>>>>>>>>>>Nathan
> >>>>>>>>>>>
> >>>>>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for
> >>>>>>>>>>>>ibatis?
> >>>>>>>>>>>>
> >>>>>>>>>>>>-Henry
> >>>>>>>>>>>>
> >>>>>>>>>>>>AHrakou@iba.by wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>>what about XML?
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>Cause:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>"namespace"  is not
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>!!!
> >>>>>>>>>>>>>Attribute "namespace" is not declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>C  уважением,
> >>>>>>>>>>>>>              Алексей.
> >>>>>>>>>>>>> mobile: +375-029-708-2168                      email:
> >>>>>>>>>>>>>horal@tut.by
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>23.01.2006 17:12
> >>>>>>>>>>>>>Please respond to
> >>>>>>>>>>>>>user-java@ibatis.apache.org
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>   To
> >>>>>>>>>>>>>   user-java@ibatis.apache.org
> >>>>>>>>>>>>>cc
> >>>>>>>>>>>>>   Subject
> >>>>>>>>>>>>>   Re: junit test
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>All correct version. Because it works for the application.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>ibatis-common-2.jar
> >>>>>>>>>>>>>ibatis-dao-2.jar
> >>>>>>>>>>>>>ibatis-sqlmap-2.jar
> >>>>>>>>>>>>>and spring  1.2.6
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>AHrakou@iba.by wrote:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>Check that you use the correct libraries for spring and
> >>>>>>>>>>>>>>ibatis.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>Also check your XML:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>Cause:
> >>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>"namespace"  is not
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>C  уважением,
> >>>>>>>>>>>>>>              Алексей.    >
> >>>>>>>>>>>>>> mobile: +375-029-708-2168                    >   email:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>horal@tut.by      >
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>23.01.2006 16:59
> >>>>>>>>>>>>>>Please respond to
> >>>>>>>>>>>>>>user-java@ibatis.apache.org
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>                > To
> >>>>>>>>>>>>>>                user-java@ibatis.apache.org
> >>>>>>>>>>>>>>cc
> >>>>>>>>>>>>>>                > Subject
> >>>>>>>>>>>>>>                junit test
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>                >
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>I go the following error when I did JUnit test:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>setUp()----------
> >>>>>>>>>>>>>>org.springframework.beans.factory.BeanCreationException:
> >>>>>>>>>>>>>>E rror
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>creating
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>bean with name 'sqlMapClient' defined in file
> >>>>>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>Initialization  of bean
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>failed; nested exception is
> >>>>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> >>>>>>>>>>>>>Error  parsing XML.  > Cause:
> >>>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>>>>>>parsing
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing
> >>>>>>>>>>>>>>XML.   Cause:
> >>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>declared for
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>"namespace"  is not
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>However, it works when I run the application.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>Here is code for JUNit test:
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>      org.springframework.context.ApplicationContext ctx
> >>>>>>>>>>>>>>=  null;
> >>>>>>>>>>>>>>      String[] paths = { "/WEB-INF/test/
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>datasource_beans_test.xml",
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>          "/WEB-INF/authorize-spring.xml",
> >>>>>>>>>>>>>>          "/WEB-INF/spring-auth.xml",
> >>>>>>>>>>>>>>          "/WEB-INF/app_beans.xml"};
> >>>>>>>>>>>>>>      ctx = new FileSystemXmlApplicationContext(paths);
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>How to make JUnit works?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>-Henry
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >>>
>

Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
You don't get the point. All files, code are working just fine in my web 
application. When I started JUnit testing, I got this errors/issue.

-Henry

Larry Meadors wrote:

>I think your DTD is buggered up - should be ibatis.apache.org, not ibatis.com.
>
>On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
>  
>
>>Here is my ibatis configuration file:
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><!DOCTYPE sqlMapConfig
>>PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>>"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>>
>><sqlMapConfig>
>> <sqlMap resource=
>>   "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
>> <sqlMap resource=
>>   "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
>> <sqlMap resource=
>>   "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
>></sqlMapConfig>
>>
>>It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7. What is
>>wrong with my file?
>>
>>-Henry
>>
>>Nathan Maves wrote:
>>
>>    
>>
>>>Becaureful what you claim :)
>>>
>>>ibatis works perfectly fine with ibatis.  If you need proof download
>>>the source of ibatis and run the unit testing for it.
>>>
>>>What you are trying to say is that your unit tests are failing.  I
>>>can see this but the first line of your error message.  This is not
>>>an ibatis class throwing this exception.  The problem appears to be
>>>that you have not specified your namespace in the app_beans.xml.
>>>Either specify that  or set the namespaces attribute to false in your
>>>sqlmapconfig.
>>>
>>>Nathan
>>>
>>>On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
>>>
>>>      
>>>
>>>>iBatis2.1.7 DOES NOT work with JUnit!!!
>>>>
>>>>org.springframework.beans.factory.BeanCreationException: Error
>>>>creating bean with name 'sqlMapClient' defined in file [C:\devel
>>>>\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
>>>>failed; nested exception is
>>>>com.ibatis.common.exception.NestedRuntimeException: Error  occurred.
>>>>Cause: com.ibatis.common.xml.NodeletException: Error  parsing XML.
>>>>Cause:  com.ibatis.common.exception.NestedRuntimeException: Error
>>>>parsing  XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
>>>>for element "sqlMap".
>>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
>>>>not declared for element "sqlMap".
>>>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing
>>>>XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
>>>>not declared for element "sqlMap".
>>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
>>>>not declared for element "sqlMap".
>>>>Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error
>>>>parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
>>>>for element "sqlMap".
>>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
>>>>not declared for element "sqlMap".
>>>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing
>>>>XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
>>>>not declared for element "sqlMap".
>>>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
>>>>not declared for element "sqlMap".
>>>>
>>>>
>>>>-Henry
>>>>
>>>>
>>>>Nathan Maves wrote:
>>>>
>>>>        
>>>>
>>>>>Not sure what the issue it since you have not included any error
>>>>>messages but you should upgrade your 2.1.6 to 2.1.7.
>>>>>
>>>>>
>>>>>Nathan
>>>>>
>>>>>On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
>>>>>
>>>>>          
>>>>>
>>>>>>Bad news! iBatis 2.1.6 doesn't work for Junit test with java  1.5.
>>>>>>When I switched iBatis back to 1.5, it works. Any idea why?  in
>>>>>>Fixing? new Version coming out with fixing?
>>>>>>
>>>>>>-Henry
>>>>>>
>>>>>>Larry Meadors wrote:
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>>>>>
>>>>>>>IIRC, it was pissed about the lack of a xalan impl but once I
>>>>>>>put  that
>>>>>>>in devlib it was happy.
>>>>>>>
>>>>>>>Larry
>>>>>>>
>>>>>>>
>>>>>>>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>I am using Junit test within the eClipse.
>>>>>>>>
>>>>>>>>-Henry
>>>>>>>>
>>>>>>>>Nathan Maves wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>>>Your application work because java is backwards compatible.  The
>>>>>>>>>build script, which includes the unit tests will not run with  java
>>>>>>>>>1.5.  I think there are classloader issues that require you to
>>>>>>>>>mess
>>>>>>>>>with the dependancies.
>>>>>>>>>
>>>>>>>>>Just to reiterate there are no know issues with using ibatis
>>>>>>>>>on  Java
>>>>>>>>>1.5.  We have been using it for a while now.
>>>>>>>>>
>>>>>>>>>Nathan
>>>>>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>Thanks for your info! Why my application works with jdk 1.5 and
>>>>>>>>>>JUnit doesn't with with jdk1.5?
>>>>>>>>>>
>>>>>>>>>>-Henry
>>>>>>>>>>
>>>>>>>>>>Nathan Maves wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>>>If you are asking about the JUnit tests for the ibatis code  then
>>>>>>>>>>>yes  and no :)
>>>>>>>>>>>
>>>>>>>>>>>I have tried it and it will not work.  You need to run the unit
>>>>>>>>>>>tests  with 1.4.  For now the plans looks like we might try to
>>>>>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this
>>>>>>>>>>>but I
>>>>>>>>>>>would be a good  thing for ibatis.
>>>>>>>>>>>
>>>>>>>>>>>Nathan
>>>>>>>>>>>
>>>>>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for
>>>>>>>>>>>>ibatis?
>>>>>>>>>>>>
>>>>>>>>>>>>-Henry
>>>>>>>>>>>>
>>>>>>>>>>>>AHrakou@iba.by wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>>>what about XML?
>>>>>>>>>>>>>
>>>>>>>>>>>>>Cause:
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>"namespace"  is not
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>!!!
>>>>>>>>>>>>>Attribute "namespace" is not declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>C  уважением,
>>>>>>>>>>>>>              Алексей.
>>>>>>>>>>>>> mobile: +375-029-708-2168                      email:
>>>>>>>>>>>>>horal@tut.by
>>>>>>>>>>>>>
>>>>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>>
>>>>>>>>>>>>>23.01.2006 17:12
>>>>>>>>>>>>>Please respond to
>>>>>>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>   To
>>>>>>>>>>>>>   user-java@ibatis.apache.org
>>>>>>>>>>>>>cc
>>>>>>>>>>>>>   Subject
>>>>>>>>>>>>>   Re: junit test
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>All correct version. Because it works for the application.
>>>>>>>>>>>>>
>>>>>>>>>>>>>ibatis-common-2.jar
>>>>>>>>>>>>>ibatis-dao-2.jar
>>>>>>>>>>>>>ibatis-sqlmap-2.jar
>>>>>>>>>>>>>and spring  1.2.6
>>>>>>>>>>>>>
>>>>>>>>>>>>>AHrakou@iba.by wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>Check that you use the correct libraries for spring and
>>>>>>>>>>>>>>ibatis.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Also check your XML:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Cause:
>>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>"namespace"  is not
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>C  уважением,
>>>>>>>>>>>>>>              Алексей.    >
>>>>>>>>>>>>>> mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>horal@tut.by      >
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>23.01.2006 16:59
>>>>>>>>>>>>>>Please respond to
>>>>>>>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                > To
>>>>>>>>>>>>>>                user-java@ibatis.apache.org
>>>>>>>>>>>>>>cc
>>>>>>>>>>>>>>                > Subject
>>>>>>>>>>>>>>                junit test
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                >
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>I go the following error when I did JUnit test:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>setUp()----------
>>>>>>>>>>>>>>org.springframework.beans.factory.BeanCreationException:
>>>>>>>>>>>>>>E rror
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>creating
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>bean with name 'sqlMapClient' defined in file
>>>>>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>Initialization  of bean
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>failed; nested exception is
>>>>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>>>>>>Error  parsing XML.  > Cause:
>>>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>>>>parsing
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing
>>>>>>>>>>>>>>XML.   Cause:
>>>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>"namespace"  is not
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>However, it works when I run the application.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>Here is code for JUNit test:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>      org.springframework.context.ApplicationContext ctx
>>>>>>>>>>>>>>=  null;
>>>>>>>>>>>>>>      String[] paths = { "/WEB-INF/test/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>>>datasource_beans_test.xml",
>>>>>>>>>>>>>
>>>>>>>>>>>>>                          
>>>>>>>>>>>>>
>>>>>>>>>>>>>>          "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>>>>>          "/WEB-INF/spring-auth.xml",
>>>>>>>>>>>>>>          "/WEB-INF/app_beans.xml"};
>>>>>>>>>>>>>>      ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>How to make JUnit works?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>-Henry
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                            
>>>>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>
>>>>>          
>>>>>
>>>
>>>      
>>>

Re: junit test

Posted by Larry Meadors <lm...@apache.org>.
I think your DTD is buggered up - should be ibatis.apache.org, not ibatis.com.

On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> Here is my ibatis configuration file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE sqlMapConfig
> PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
> "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>
> <sqlMapConfig>
>  <sqlMap resource=
>    "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
>  <sqlMap resource=
>    "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
>  <sqlMap resource=
>    "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
> </sqlMapConfig>
>
> It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7. What is
> wrong with my file?
>
> -Henry
>
> Nathan Maves wrote:
>
> > Becaureful what you claim :)
> >
> > ibatis works perfectly fine with ibatis.  If you need proof download
> > the source of ibatis and run the unit testing for it.
> >
> > What you are trying to say is that your unit tests are failing.  I
> > can see this but the first line of your error message.  This is not
> > an ibatis class throwing this exception.  The problem appears to be
> > that you have not specified your namespace in the app_beans.xml.
> > Either specify that  or set the namespaces attribute to false in your
> > sqlmapconfig.
> >
> > Nathan
> >
> > On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
> >
> >> iBatis2.1.7 DOES NOT work with JUnit!!!
> >>
> >> org.springframework.beans.factory.BeanCreationException: Error
> >> creating bean with name 'sqlMapClient' defined in file [C:\devel
> >> \webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
> >> failed; nested exception is
> >> com.ibatis.common.exception.NestedRuntimeException: Error  occurred.
> >> Cause: com.ibatis.common.xml.NodeletException: Error  parsing XML.
> >> Cause:  com.ibatis.common.exception.NestedRuntimeException: Error
> >> parsing  XPath '/sqlMapConfig/sqlMap'.  Cause:
> >> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >> org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
> >> for element "sqlMap".
> >> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >> not declared for element "sqlMap".
> >> Caused by: com.ibatis.common.xml.NodeletException: Error parsing
> >> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
> >> not declared for element "sqlMap".
> >> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >> not declared for element "sqlMap".
> >> Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error
> >> parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> >> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >> org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
> >> for element "sqlMap".
> >> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >> not declared for element "sqlMap".
> >> Caused by: com.ibatis.common.xml.NodeletException: Error parsing
> >> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
> >> not declared for element "sqlMap".
> >> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is
> >> not declared for element "sqlMap".
> >>
> >>
> >> -Henry
> >>
> >>
> >> Nathan Maves wrote:
> >>
> >>> Not sure what the issue it since you have not included any error
> >>> messages but you should upgrade your 2.1.6 to 2.1.7.
> >>>
> >>>
> >>> Nathan
> >>>
> >>> On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
> >>>
> >>>> Bad news! iBatis 2.1.6 doesn't work for Junit test with java  1.5.
> >>>> When I switched iBatis back to 1.5, it works. Any idea why?  in
> >>>> Fixing? new Version coming out with fixing?
> >>>>
> >>>> -Henry
> >>>>
> >>>> Larry Meadors wrote:
> >>>>
> >>>>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
> >>>>>
> >>>>> IIRC, it was pissed about the lack of a xalan impl but once I
> >>>>> put  that
> >>>>> in devlib it was happy.
> >>>>>
> >>>>> Larry
> >>>>>
> >>>>>
> >>>>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> >>>>>
> >>>>>> I am using Junit test within the eClipse.
> >>>>>>
> >>>>>> -Henry
> >>>>>>
> >>>>>> Nathan Maves wrote:
> >>>>>>
> >>>>>>
> >>>>>>> Your application work because java is backwards compatible.  The
> >>>>>>> build script, which includes the unit tests will not run with  java
> >>>>>>> 1.5.  I think there are classloader issues that require you to
> >>>>>>> mess
> >>>>>>> with the dependancies.
> >>>>>>>
> >>>>>>> Just to reiterate there are no know issues with using ibatis
> >>>>>>> on  Java
> >>>>>>> 1.5.  We have been using it for a while now.
> >>>>>>>
> >>>>>>> Nathan
> >>>>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>> Thanks for your info! Why my application works with jdk 1.5 and
> >>>>>>>> JUnit doesn't with with jdk1.5?
> >>>>>>>>
> >>>>>>>> -Henry
> >>>>>>>>
> >>>>>>>> Nathan Maves wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>> If you are asking about the JUnit tests for the ibatis code  then
> >>>>>>>>> yes  and no :)
> >>>>>>>>>
> >>>>>>>>> I have tried it and it will not work.  You need to run the unit
> >>>>>>>>> tests  with 1.4.  For now the plans looks like we might try to
> >>>>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this
> >>>>>>>>> but I
> >>>>>>>>> would be a good  thing for ibatis.
> >>>>>>>>>
> >>>>>>>>> Nathan
> >>>>>>>>>
> >>>>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for
> >>>>>>>>>> ibatis?
> >>>>>>>>>>
> >>>>>>>>>> -Henry
> >>>>>>>>>>
> >>>>>>>>>> AHrakou@iba.by wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>> what about XML?
> >>>>>>>>>>>
> >>>>>>>>>>> Cause:
> >>>>>>>>>>>
> >>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>
> >>>>>>>>>>> declared for
> >>>>>>>>>>>
> >>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>
> >>>>>>>>>>> "namespace"  is not
> >>>>>>>>>>>
> >>>>>>>>>>>> declared for element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>> !!!
> >>>>>>>>>>> Attribute "namespace" is not declared for
> >>>>>>>>>>>
> >>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>> C  уважением,
> >>>>>>>>>>>               Алексей.
> >>>>>>>>>>>  mobile: +375-029-708-2168                      email:
> >>>>>>>>>>> horal@tut.by
> >>>>>>>>>>>
> >>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>
> >>>>>>>>>>> 23.01.2006 17:12
> >>>>>>>>>>> Please respond to
> >>>>>>>>>>> user-java@ibatis.apache.org
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>    To
> >>>>>>>>>>>    user-java@ibatis.apache.org
> >>>>>>>>>>> cc
> >>>>>>>>>>>    Subject
> >>>>>>>>>>>    Re: junit test
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> All correct version. Because it works for the application.
> >>>>>>>>>>>
> >>>>>>>>>>> ibatis-common-2.jar
> >>>>>>>>>>> ibatis-dao-2.jar
> >>>>>>>>>>> ibatis-sqlmap-2.jar
> >>>>>>>>>>> and spring  1.2.6
> >>>>>>>>>>>
> >>>>>>>>>>> AHrakou@iba.by wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>> Check that you use the correct libraries for spring and
> >>>>>>>>>>>> ibatis.
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> Also check your XML:
> >>>>>>>>>>>>
> >>>>>>>>>>>> Cause:
> >>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>
> >>>>>>>>>>> declared for
> >>>>>>>>>>>
> >>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>
> >>>>>>>>>>> "namespace"  is not
> >>>>>>>>>>>
> >>>>>>>>>>>> declared for element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>>> C  уважением,
> >>>>>>>>>>>>               Алексей.    >
> >>>>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
> >>>>>>>>>>>>
> >>>>>>>>>>> horal@tut.by      >
> >>>>>>>>>>>
> >>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>>
> >>>>>>>>>>>> 23.01.2006 16:59
> >>>>>>>>>>>> Please respond to
> >>>>>>>>>>>> user-java@ibatis.apache.org
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>                 > To
> >>>>>>>>>>>>                 user-java@ibatis.apache.org
> >>>>>>>>>>>> cc
> >>>>>>>>>>>>                 > Subject
> >>>>>>>>>>>>                 junit test
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>                 >
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> I go the following error when I did JUnit test:
> >>>>>>>>>>>>
> >>>>>>>>>>>> setUp()----------
> >>>>>>>>>>>> org.springframework.beans.factory.BeanCreationException:
> >>>>>>>>>>>> E rror
> >>>>>>>>>>>>
> >>>>>>>>>>> creating
> >>>>>>>>>>>
> >>>>>>>>>>>> bean with name 'sqlMapClient' defined in file
> >>>>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >>>>>>>>>>>>
> >>>>>>>>>>> Initialization  of bean
> >>>>>>>>>>>
> >>>>>>>>>>>> failed; nested exception is
> >>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>>>>>
> >>>>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> >>>>>>>>>>> Error  parsing XML.  > Cause:
> >>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>>>> parsing
> >>>>>>>>>>>
> >>>>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing
> >>>>>>>>>>>> XML.   Cause:
> >>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>
> >>>>>>>>>>> declared for
> >>>>>>>>>>>
> >>>>>>>>>>>> element "sqlMap".
> >>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>
> >>>>>>>>>>> "namespace"  is not
> >>>>>>>>>>>
> >>>>>>>>>>>> declared for element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>>> However, it works when I run the application.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Here is code for JUNit test:
> >>>>>>>>>>>>
> >>>>>>>>>>>>       org.springframework.context.ApplicationContext ctx
> >>>>>>>>>>>> =  null;
> >>>>>>>>>>>>       String[] paths = { "/WEB-INF/test/
> >>>>>>>>>>>>
> >>>>>>>>>>> datasource_beans_test.xml",
> >>>>>>>>>>>
> >>>>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
> >>>>>>>>>>>>           "/WEB-INF/spring-auth.xml",
> >>>>>>>>>>>>           "/WEB-INF/app_beans.xml"};
> >>>>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
> >>>>>>>>>>>>
> >>>>>>>>>>>> How to make JUnit works?
> >>>>>>>>>>>>
> >>>>>>>>>>>> -Henry
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>
> >>>
> >>>
> >
> >
> >
>

Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
Thanks Ben but that doesn't solve the problem. 
http://ibatis.apache.org/dtd/sql-map-2.dtd is still there. See the 
problem is that EVERY thing work just fine with 2.1.5 but not 2.1.6 and 
2.1.7 for JUnit. All versions work just fine for web applications.

-Henry

Ben Munat wrote:

> Henry,
>
> Try switching to the new DTD:
>
> <!DOCTYPE sqlMap
>     PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>     "http://ibatis.apache.org/dtd/sql-map-2.dtd">
>
> The DTD is no longer available at ibatis.com. Maybe that's screwing up 
> junit.
>
> b
>
>
>
> Henry Lu wrote:
>
>> Here is my ibatis configuration file:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE sqlMapConfig
>> PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>> "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>>
>> <sqlMapConfig>
>> <sqlMap resource=
>>   "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
>> <sqlMap resource=
>>   "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
>> <sqlMap resource=
>>   "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
>> </sqlMapConfig>
>>
>> It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7. What is 
>> wrong with my file?
>>
>> -Henry
>>
>> Nathan Maves wrote:
>>
>>> Becaureful what you claim :)
>>>
>>> ibatis works perfectly fine with ibatis.  If you need proof 
>>> download  the source of ibatis and run the unit testing for it.
>>>
>>> What you are trying to say is that your unit tests are failing.  I  
>>> can see this but the first line of your error message.  This is not  
>>> an ibatis class throwing this exception.  The problem appears to be  
>>> that you have not specified your namespace in the app_beans.xml.   
>>> Either specify that  or set the namespaces attribute to false in 
>>> your  sqlmapconfig.
>>>
>>> Nathan
>>>
>>> On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
>>>
>>>> iBatis2.1.7 DOES NOT work with JUnit!!!
>>>>
>>>> org.springframework.beans.factory.BeanCreationException: Error  
>>>> creating bean with name 'sqlMapClient' defined in file [C:\devel 
>>>> \webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  
>>>> failed; nested exception is  
>>>> com.ibatis.common.exception.NestedRuntimeException: Error  
>>>> occurred.  Cause: com.ibatis.common.xml.NodeletException: Error  
>>>> parsing XML.  Cause:  
>>>> com.ibatis.common.exception.NestedRuntimeException: Error parsing  
>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:  
>>>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not  
>>>> declared for element "sqlMap".
>>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>>> not declared for element "sqlMap".
>>>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
>>>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  
>>>> is not declared for element "sqlMap".
>>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>>> not declared for element "sqlMap".
>>>> Caused by: com.ibatis.common.exception.NestedRuntimeException:  
>>>> Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause:  
>>>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not  
>>>> declared for element "sqlMap".
>>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>>> not declared for element "sqlMap".
>>>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
>>>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  
>>>> is not declared for element "sqlMap".
>>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>>> not declared for element "sqlMap".
>>>>
>>>>
>>>> -Henry
>>>>
>>>>
>>>> Nathan Maves wrote:
>>>>
>>>>> Not sure what the issue it since you have not included any error   
>>>>> messages but you should upgrade your 2.1.6 to 2.1.7.
>>>>>
>>>>>
>>>>> Nathan
>>>>>
>>>>> On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
>>>>>
>>>>>> Bad news! iBatis 2.1.6 doesn't work for Junit test with java  
>>>>>> 1.5.  When I switched iBatis back to 1.5, it works. Any idea 
>>>>>> why?  in  Fixing? new Version coming out with fixing?
>>>>>>
>>>>>> -Henry
>>>>>>
>>>>>> Larry Meadors wrote:
>>>>>>
>>>>>>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>>>>>
>>>>>>> IIRC, it was pissed about the lack of a xalan impl but once I  
>>>>>>> put  that
>>>>>>> in devlib it was happy.
>>>>>>>
>>>>>>> Larry
>>>>>>>
>>>>>>>
>>>>>>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>>>>>
>>>>>>>> I am using Junit test within the eClipse.
>>>>>>>>
>>>>>>>> -Henry
>>>>>>>>
>>>>>>>> Nathan Maves wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Your application work because java is backwards compatible.  The
>>>>>>>>> build script, which includes the unit tests will not run with  
>>>>>>>>> java
>>>>>>>>> 1.5.  I think there are classloader issues that require you 
>>>>>>>>> to  mess
>>>>>>>>> with the dependancies.
>>>>>>>>>
>>>>>>>>> Just to reiterate there are no know issues with using ibatis  
>>>>>>>>> on  Java
>>>>>>>>> 1.5.  We have been using it for a while now.
>>>>>>>>>
>>>>>>>>> Nathan
>>>>>>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Thanks for your info! Why my application works with jdk 1.5 and
>>>>>>>>>> JUnit doesn't with with jdk1.5?
>>>>>>>>>>
>>>>>>>>>> -Henry
>>>>>>>>>>
>>>>>>>>>> Nathan Maves wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> If you are asking about the JUnit tests for the ibatis code  
>>>>>>>>>>> then
>>>>>>>>>>> yes  and no :)
>>>>>>>>>>>
>>>>>>>>>>> I have tried it and it will not work.  You need to run the unit
>>>>>>>>>>> tests  with 1.4.  For now the plans looks like we might try to
>>>>>>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this  
>>>>>>>>>>> but I
>>>>>>>>>>> would be a good  thing for ibatis.
>>>>>>>>>>>
>>>>>>>>>>> Nathan
>>>>>>>>>>>
>>>>>>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for  
>>>>>>>>>>>> ibatis?
>>>>>>>>>>>>
>>>>>>>>>>>> -Henry
>>>>>>>>>>>>
>>>>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> what about XML?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Cause:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>>
>>>>>>>>>>>>> declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>>
>>>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>>>
>>>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>> !!!
>>>>>>>>>>>>> Attribute "namespace" is not declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>> C  уважением,
>>>>>>>>>>>>>               Алексей.
>>>>>>>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>>>>>>> horal@tut.by
>>>>>>>>>>>>>
>>>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>>
>>>>>>>>>>>>> 23.01.2006 17:12
>>>>>>>>>>>>> Please respond to
>>>>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>    To
>>>>>>>>>>>>>    user-java@ibatis.apache.org
>>>>>>>>>>>>> cc
>>>>>>>>>>>>>    Subject
>>>>>>>>>>>>>    Re: junit test
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> All correct version. Because it works for the application.
>>>>>>>>>>>>>
>>>>>>>>>>>>> ibatis-common-2.jar
>>>>>>>>>>>>> ibatis-dao-2.jar
>>>>>>>>>>>>> ibatis-sqlmap-2.jar
>>>>>>>>>>>>> and spring  1.2.6
>>>>>>>>>>>>>
>>>>>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Check that you use the correct libraries for spring and   
>>>>>>>>>>>>>> ibatis.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Also check your XML:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Cause:
>>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>>
>>>>>>>>>>>>> declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>>
>>>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>>>
>>>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> C  уважением,
>>>>>>>>>>>>>>               Алексей.    >
>>>>>>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>>>>>
>>>>>>>>>>>>> horal@tut.by      >
>>>>>>>>>>>>>
>>>>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> 23.01.2006 16:59
>>>>>>>>>>>>>> Please respond to
>>>>>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                 > To
>>>>>>>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>>>>>>> cc
>>>>>>>>>>>>>>                 > Subject
>>>>>>>>>>>>>>                 junit test
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>                 >
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I go the following error when I did JUnit test:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> setUp()----------
>>>>>>>>>>>>>> org.springframework.beans.factory.BeanCreationException:   
>>>>>>>>>>>>>> E rror
>>>>>>>>>>>>>>
>>>>>>>>>>>>> creating
>>>>>>>>>>>>>
>>>>>>>>>>>>>> bean with name 'sqlMapClient' defined in file
>>>>>>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>>>>>
>>>>>>>>>>>>> Initialization  of bean
>>>>>>>>>>>>>
>>>>>>>>>>>>>> failed; nested exception is
>>>>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>>>>>
>>>>>>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>>>>>> Error  parsing XML.  > Cause:
>>>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: 
>>>>>>>>>>>>> Error   parsing
>>>>>>>>>>>>>
>>>>>>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing   
>>>>>>>>>>>>>> XML.   Cause:
>>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>>
>>>>>>>>>>>>> declared for
>>>>>>>>>>>>>
>>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>>
>>>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>>>
>>>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> However, it works when I run the application.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Here is code for JUNit test:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>       org.springframework.context.ApplicationContext ctx  
>>>>>>>>>>>>>> =  null;
>>>>>>>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>>>>>>>
>>>>>>>>>>>>> datasource_beans_test.xml",
>>>>>>>>>>>>>
>>>>>>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> How to make JUnit works?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> -Henry
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>

Re: junit test

Posted by Ben Munat <be...@munat.com>.
Henry,

Try switching to the new DTD:

<!DOCTYPE sqlMap
     PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
     "http://ibatis.apache.org/dtd/sql-map-2.dtd">

The DTD is no longer available at ibatis.com. Maybe that's screwing up junit.

b



Henry Lu wrote:
> Here is my ibatis configuration file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE sqlMapConfig
> PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
> "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> 
> <sqlMapConfig>
> <sqlMap resource=
>   "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
> <sqlMap resource=
>   "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
> <sqlMap resource=
>   "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
> </sqlMapConfig>
> 
> It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7. What is 
> wrong with my file?
> 
> -Henry
> 
> Nathan Maves wrote:
> 
>> Becaureful what you claim :)
>>
>> ibatis works perfectly fine with ibatis.  If you need proof download  
>> the source of ibatis and run the unit testing for it.
>>
>> What you are trying to say is that your unit tests are failing.  I  
>> can see this but the first line of your error message.  This is not  
>> an ibatis class throwing this exception.  The problem appears to be  
>> that you have not specified your namespace in the app_beans.xml.   
>> Either specify that  or set the namespaces attribute to false in your  
>> sqlmapconfig.
>>
>> Nathan
>>
>> On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
>>
>>> iBatis2.1.7 DOES NOT work with JUnit!!!
>>>
>>> org.springframework.beans.factory.BeanCreationException: Error  
>>> creating bean with name 'sqlMapClient' defined in file [C:\devel 
>>> \webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  
>>> failed; nested exception is  
>>> com.ibatis.common.exception.NestedRuntimeException: Error  occurred.  
>>> Cause: com.ibatis.common.xml.NodeletException: Error  parsing XML.  
>>> Cause:  com.ibatis.common.exception.NestedRuntimeException: Error 
>>> parsing  XPath '/sqlMapConfig/sqlMap'.  Cause:  
>>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
>>> org.xml.sax.SAXParseException: Attribute "namespace" is not  declared 
>>> for element "sqlMap".
>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>> not declared for element "sqlMap".
>>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
>>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is 
>>> not declared for element "sqlMap".
>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>> not declared for element "sqlMap".
>>> Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error 
>>> parsing XPath '/sqlMapConfig/sqlMap'.  Cause:  
>>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
>>> org.xml.sax.SAXParseException: Attribute "namespace" is not  declared 
>>> for element "sqlMap".
>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>> not declared for element "sqlMap".
>>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
>>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is 
>>> not declared for element "sqlMap".
>>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>>> not declared for element "sqlMap".
>>>
>>>
>>> -Henry
>>>
>>>
>>> Nathan Maves wrote:
>>>
>>>> Not sure what the issue it since you have not included any error   
>>>> messages but you should upgrade your 2.1.6 to 2.1.7.
>>>>
>>>>
>>>> Nathan
>>>>
>>>> On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
>>>>
>>>>> Bad news! iBatis 2.1.6 doesn't work for Junit test with java  1.5.  
>>>>> When I switched iBatis back to 1.5, it works. Any idea why?  in  
>>>>> Fixing? new Version coming out with fixing?
>>>>>
>>>>> -Henry
>>>>>
>>>>> Larry Meadors wrote:
>>>>>
>>>>>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>>>>
>>>>>> IIRC, it was pissed about the lack of a xalan impl but once I  
>>>>>> put  that
>>>>>> in devlib it was happy.
>>>>>>
>>>>>> Larry
>>>>>>
>>>>>>
>>>>>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>>>>
>>>>>>> I am using Junit test within the eClipse.
>>>>>>>
>>>>>>> -Henry
>>>>>>>
>>>>>>> Nathan Maves wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Your application work because java is backwards compatible.  The
>>>>>>>> build script, which includes the unit tests will not run with  java
>>>>>>>> 1.5.  I think there are classloader issues that require you to  
>>>>>>>> mess
>>>>>>>> with the dependancies.
>>>>>>>>
>>>>>>>> Just to reiterate there are no know issues with using ibatis  
>>>>>>>> on  Java
>>>>>>>> 1.5.  We have been using it for a while now.
>>>>>>>>
>>>>>>>> Nathan
>>>>>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Thanks for your info! Why my application works with jdk 1.5 and
>>>>>>>>> JUnit doesn't with with jdk1.5?
>>>>>>>>>
>>>>>>>>> -Henry
>>>>>>>>>
>>>>>>>>> Nathan Maves wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> If you are asking about the JUnit tests for the ibatis code  then
>>>>>>>>>> yes  and no :)
>>>>>>>>>>
>>>>>>>>>> I have tried it and it will not work.  You need to run the unit
>>>>>>>>>> tests  with 1.4.  For now the plans looks like we might try to
>>>>>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this  
>>>>>>>>>> but I
>>>>>>>>>> would be a good  thing for ibatis.
>>>>>>>>>>
>>>>>>>>>> Nathan
>>>>>>>>>>
>>>>>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for  
>>>>>>>>>>> ibatis?
>>>>>>>>>>>
>>>>>>>>>>> -Henry
>>>>>>>>>>>
>>>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> what about XML?
>>>>>>>>>>>>
>>>>>>>>>>>> Cause:
>>>>>>>>>>>>
>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>
>>>>>>>>>>>> declared for
>>>>>>>>>>>>
>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>
>>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>>
>>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>>
>>>>>>>>>>>> !!!
>>>>>>>>>>>> Attribute "namespace" is not declared for
>>>>>>>>>>>>
>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>>
>>>>>>>>>>>> C  уважением,
>>>>>>>>>>>>               Алексей.
>>>>>>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>>>>>> horal@tut.by
>>>>>>>>>>>>
>>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>
>>>>>>>>>>>> 23.01.2006 17:12
>>>>>>>>>>>> Please respond to
>>>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>    To
>>>>>>>>>>>>    user-java@ibatis.apache.org
>>>>>>>>>>>> cc
>>>>>>>>>>>>    Subject
>>>>>>>>>>>>    Re: junit test
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> All correct version. Because it works for the application.
>>>>>>>>>>>>
>>>>>>>>>>>> ibatis-common-2.jar
>>>>>>>>>>>> ibatis-dao-2.jar
>>>>>>>>>>>> ibatis-sqlmap-2.jar
>>>>>>>>>>>> and spring  1.2.6
>>>>>>>>>>>>
>>>>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> Check that you use the correct libraries for spring and   
>>>>>>>>>>>>> ibatis.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Also check your XML:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Cause:
>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>
>>>>>>>>>>>> declared for
>>>>>>>>>>>>
>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>
>>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>>
>>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>>
>>>>>>>>>>>>> C  уважением,
>>>>>>>>>>>>>               Алексей.    >
>>>>>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>>>>
>>>>>>>>>>>> horal@tut.by      >
>>>>>>>>>>>>
>>>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>>
>>>>>>>>>>>>> 23.01.2006 16:59
>>>>>>>>>>>>> Please respond to
>>>>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>                 > To
>>>>>>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>>>>>> cc
>>>>>>>>>>>>>                 > Subject
>>>>>>>>>>>>>                 junit test
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>                 >
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> I go the following error when I did JUnit test:
>>>>>>>>>>>>>
>>>>>>>>>>>>> setUp()----------
>>>>>>>>>>>>> org.springframework.beans.factory.BeanCreationException:   
>>>>>>>>>>>>> E rror
>>>>>>>>>>>>>
>>>>>>>>>>>> creating
>>>>>>>>>>>>
>>>>>>>>>>>>> bean with name 'sqlMapClient' defined in file
>>>>>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>>>>
>>>>>>>>>>>> Initialization  of bean
>>>>>>>>>>>>
>>>>>>>>>>>>> failed; nested exception is
>>>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>>>>
>>>>>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>>>>> Error  parsing XML.  > Cause:
>>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error   
>>>>>>>>>>>> parsing
>>>>>>>>>>>>
>>>>>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing   
>>>>>>>>>>>>> XML.   Cause:
>>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>>
>>>>>>>>>>>> declared for
>>>>>>>>>>>>
>>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>>
>>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>>
>>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>>
>>>>>>>>>>>>> However, it works when I run the application.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Here is code for JUNit test:
>>>>>>>>>>>>>
>>>>>>>>>>>>>       org.springframework.context.ApplicationContext ctx  
>>>>>>>>>>>>> =  null;
>>>>>>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>>>>>>
>>>>>>>>>>>> datasource_beans_test.xml",
>>>>>>>>>>>>
>>>>>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>>>>
>>>>>>>>>>>>> How to make JUnit works?
>>>>>>>>>>>>>
>>>>>>>>>>>>> -Henry
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>
>>>>
>>>>
>>
>>
>>

Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
Here is my ibatis configuration file:

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

<sqlMapConfig>
 <sqlMap resource=
   "edu/umich/med/umms/coreyp/dao/ibatis_map/misc.xml"/>
 <sqlMap resource=
   "edu/umich/med/umms/coreyp/dao/ibatis_map/labs.xml"/>
 <sqlMap resource=
   "edu/umich/med/umms/coreyp/dao/ibatis_map/lab_contact.xml"/>
</sqlMapConfig>

It works fine for 2.1.5 and doesn't work for 2.1.6 and 2.1.7. What is 
wrong with my file?

-Henry

Nathan Maves wrote:

> Becaureful what you claim :)
>
> ibatis works perfectly fine with ibatis.  If you need proof download  
> the source of ibatis and run the unit testing for it.
>
> What you are trying to say is that your unit tests are failing.  I  
> can see this but the first line of your error message.  This is not  
> an ibatis class throwing this exception.  The problem appears to be  
> that you have not specified your namespace in the app_beans.xml.   
> Either specify that  or set the namespaces attribute to false in your  
> sqlmapconfig.
>
> Nathan
>
> On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:
>
>> iBatis2.1.7 DOES NOT work with JUnit!!!
>>
>> org.springframework.beans.factory.BeanCreationException: Error  
>> creating bean with name 'sqlMapClient' defined in file [C:\devel 
>> \webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  
>> failed; nested exception is  
>> com.ibatis.common.exception.NestedRuntimeException: Error  occurred.  
>> Cause: com.ibatis.common.xml.NodeletException: Error  parsing XML.  
>> Cause:  com.ibatis.common.exception.NestedRuntimeException: Error 
>> parsing  XPath '/sqlMapConfig/sqlMap'.  Cause:  
>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
>> org.xml.sax.SAXParseException: Attribute "namespace" is not  declared 
>> for element "sqlMap".
>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>> not declared for element "sqlMap".
>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is 
>> not declared for element "sqlMap".
>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>> not declared for element "sqlMap".
>> Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error 
>> parsing XPath '/sqlMapConfig/sqlMap'.  Cause:  
>> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
>> org.xml.sax.SAXParseException: Attribute "namespace" is not  declared 
>> for element "sqlMap".
>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>> not declared for element "sqlMap".
>> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
>> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is 
>> not declared for element "sqlMap".
>> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
>> not declared for element "sqlMap".
>>
>>
>> -Henry
>>
>>
>> Nathan Maves wrote:
>>
>>> Not sure what the issue it since you have not included any error   
>>> messages but you should upgrade your 2.1.6 to 2.1.7.
>>>
>>>
>>> Nathan
>>>
>>> On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
>>>
>>>> Bad news! iBatis 2.1.6 doesn't work for Junit test with java  1.5.  
>>>> When I switched iBatis back to 1.5, it works. Any idea why?  in  
>>>> Fixing? new Version coming out with fixing?
>>>>
>>>> -Henry
>>>>
>>>> Larry Meadors wrote:
>>>>
>>>>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>>>
>>>>> IIRC, it was pissed about the lack of a xalan impl but once I  
>>>>> put  that
>>>>> in devlib it was happy.
>>>>>
>>>>> Larry
>>>>>
>>>>>
>>>>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>>>
>>>>>> I am using Junit test within the eClipse.
>>>>>>
>>>>>> -Henry
>>>>>>
>>>>>> Nathan Maves wrote:
>>>>>>
>>>>>>
>>>>>>> Your application work because java is backwards compatible.  The
>>>>>>> build script, which includes the unit tests will not run with  java
>>>>>>> 1.5.  I think there are classloader issues that require you to  
>>>>>>> mess
>>>>>>> with the dependancies.
>>>>>>>
>>>>>>> Just to reiterate there are no know issues with using ibatis  
>>>>>>> on  Java
>>>>>>> 1.5.  We have been using it for a while now.
>>>>>>>
>>>>>>> Nathan
>>>>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Thanks for your info! Why my application works with jdk 1.5 and
>>>>>>>> JUnit doesn't with with jdk1.5?
>>>>>>>>
>>>>>>>> -Henry
>>>>>>>>
>>>>>>>> Nathan Maves wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> If you are asking about the JUnit tests for the ibatis code  then
>>>>>>>>> yes  and no :)
>>>>>>>>>
>>>>>>>>> I have tried it and it will not work.  You need to run the unit
>>>>>>>>> tests  with 1.4.  For now the plans looks like we might try to
>>>>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this  
>>>>>>>>> but I
>>>>>>>>> would be a good  thing for ibatis.
>>>>>>>>>
>>>>>>>>> Nathan
>>>>>>>>>
>>>>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for  
>>>>>>>>>> ibatis?
>>>>>>>>>>
>>>>>>>>>> -Henry
>>>>>>>>>>
>>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> what about XML?
>>>>>>>>>>>
>>>>>>>>>>> Cause:
>>>>>>>>>>>
>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>
>>>>>>>>>>> declared for
>>>>>>>>>>>
>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>
>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>
>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>> !!!
>>>>>>>>>>> Attribute "namespace" is not declared for
>>>>>>>>>>>
>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>> C  уважением,
>>>>>>>>>>>               Алексей.
>>>>>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>>>>> horal@tut.by
>>>>>>>>>>>
>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>
>>>>>>>>>>> 23.01.2006 17:12
>>>>>>>>>>> Please respond to
>>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>    To
>>>>>>>>>>>    user-java@ibatis.apache.org
>>>>>>>>>>> cc
>>>>>>>>>>>    Subject
>>>>>>>>>>>    Re: junit test
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> All correct version. Because it works for the application.
>>>>>>>>>>>
>>>>>>>>>>> ibatis-common-2.jar
>>>>>>>>>>> ibatis-dao-2.jar
>>>>>>>>>>> ibatis-sqlmap-2.jar
>>>>>>>>>>> and spring  1.2.6
>>>>>>>>>>>
>>>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Check that you use the correct libraries for spring and   
>>>>>>>>>>>> ibatis.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Also check your XML:
>>>>>>>>>>>>
>>>>>>>>>>>> Cause:
>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>
>>>>>>>>>>> declared for
>>>>>>>>>>>
>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>
>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>
>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>>> C  уважением,
>>>>>>>>>>>>               Алексей.    >
>>>>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>>>
>>>>>>>>>>> horal@tut.by      >
>>>>>>>>>>>
>>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>
>>>>>>>>>>>> 23.01.2006 16:59
>>>>>>>>>>>> Please respond to
>>>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                 > To
>>>>>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>>>>> cc
>>>>>>>>>>>>                 > Subject
>>>>>>>>>>>>                 junit test
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                 >
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I go the following error when I did JUnit test:
>>>>>>>>>>>>
>>>>>>>>>>>> setUp()----------
>>>>>>>>>>>> org.springframework.beans.factory.BeanCreationException:   
>>>>>>>>>>>> E rror
>>>>>>>>>>>>
>>>>>>>>>>> creating
>>>>>>>>>>>
>>>>>>>>>>>> bean with name 'sqlMapClient' defined in file
>>>>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>>>
>>>>>>>>>>> Initialization  of bean
>>>>>>>>>>>
>>>>>>>>>>>> failed; nested exception is
>>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>>>
>>>>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>>>> Error  parsing XML.  > Cause:
>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error   
>>>>>>>>>>> parsing
>>>>>>>>>>>
>>>>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing   
>>>>>>>>>>>> XML.   Cause:
>>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>
>>>>>>>>>>> declared for
>>>>>>>>>>>
>>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>
>>>>>>>>>>> "namespace"  is not
>>>>>>>>>>>
>>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>>> However, it works when I run the application.
>>>>>>>>>>>>
>>>>>>>>>>>> Here is code for JUNit test:
>>>>>>>>>>>>
>>>>>>>>>>>>       org.springframework.context.ApplicationContext ctx  
>>>>>>>>>>>> =  null;
>>>>>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>>>>>
>>>>>>>>>>> datasource_beans_test.xml",
>>>>>>>>>>>
>>>>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>>>
>>>>>>>>>>>> How to make JUnit works?
>>>>>>>>>>>>
>>>>>>>>>>>> -Henry
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>
>>>
>>>
>
>
>

Re: junit test

Posted by Nathan Maves <Na...@Sun.COM>.
Becaureful what you claim :)

ibatis works perfectly fine with ibatis.  If you need proof download  
the source of ibatis and run the unit testing for it.

What you are trying to say is that your unit tests are failing.  I  
can see this but the first line of your error message.  This is not  
an ibatis class throwing this exception.  The problem appears to be  
that you have not specified your namespace in the app_beans.xml.   
Either specify that  or set the namespaces attribute to false in your  
sqlmapconfig.

Nathan

On Jan 24, 2006, at 9:16 AM, Henry Lu wrote:

> iBatis2.1.7 DOES NOT work with JUnit!!!
>
> org.springframework.beans.factory.BeanCreationException: Error  
> creating bean with name 'sqlMapClient' defined in file [C:\devel 
> \webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  
> failed; nested exception is  
> com.ibatis.common.exception.NestedRuntimeException: Error  
> occurred.  Cause: com.ibatis.common.xml.NodeletException: Error  
> parsing XML.  Cause:  
> com.ibatis.common.exception.NestedRuntimeException: Error parsing  
> XPath '/sqlMapConfig/sqlMap'.  Cause:  
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
> org.xml.sax.SAXParseException: Attribute "namespace" is not  
> declared for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
> not declared for element "sqlMap".
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  
> is not declared for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
> not declared for element "sqlMap".
> Caused by: com.ibatis.common.exception.NestedRuntimeException:  
> Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause:  
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
> org.xml.sax.SAXParseException: Attribute "namespace" is not  
> declared for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
> not declared for element "sqlMap".
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  
> XML.  Cause: org.xml.sax.SAXParseException: Attribute "namespace"  
> is not declared for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  
> not declared for element "sqlMap".
>
>
> -Henry
>
>
> Nathan Maves wrote:
>
>> Not sure what the issue it since you have not included any error   
>> messages but you should upgrade your 2.1.6 to 2.1.7.
>>
>>
>> Nathan
>>
>> On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
>>
>>> Bad news! iBatis 2.1.6 doesn't work for Junit test with java  
>>> 1.5.  When I switched iBatis back to 1.5, it works. Any idea why?  
>>> in  Fixing? new Version coming out with fixing?
>>>
>>> -Henry
>>>
>>> Larry Meadors wrote:
>>>
>>>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>>
>>>> IIRC, it was pissed about the lack of a xalan impl but once I  
>>>> put  that
>>>> in devlib it was happy.
>>>>
>>>> Larry
>>>>
>>>>
>>>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>>
>>>>> I am using Junit test within the eClipse.
>>>>>
>>>>> -Henry
>>>>>
>>>>> Nathan Maves wrote:
>>>>>
>>>>>
>>>>>> Your application work because java is backwards compatible.  The
>>>>>> build script, which includes the unit tests will not run with  
>>>>>> java
>>>>>> 1.5.  I think there are classloader issues that require you to  
>>>>>> mess
>>>>>> with the dependancies.
>>>>>>
>>>>>> Just to reiterate there are no know issues with using ibatis  
>>>>>> on  Java
>>>>>> 1.5.  We have been using it for a while now.
>>>>>>
>>>>>> Nathan
>>>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>>
>>>>>>
>>>>>>> Thanks for your info! Why my application works with jdk 1.5 and
>>>>>>> JUnit doesn't with with jdk1.5?
>>>>>>>
>>>>>>> -Henry
>>>>>>>
>>>>>>> Nathan Maves wrote:
>>>>>>>
>>>>>>>
>>>>>>>> If you are asking about the JUnit tests for the ibatis code  
>>>>>>>> then
>>>>>>>> yes  and no :)
>>>>>>>>
>>>>>>>> I have tried it and it will not work.  You need to run the unit
>>>>>>>> tests  with 1.4.  For now the plans looks like we might try to
>>>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this  
>>>>>>>> but I
>>>>>>>> would be a good  thing for ibatis.
>>>>>>>>
>>>>>>>> Nathan
>>>>>>>>
>>>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for  
>>>>>>>>> ibatis?
>>>>>>>>>
>>>>>>>>> -Henry
>>>>>>>>>
>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> what about XML?
>>>>>>>>>>
>>>>>>>>>> Cause:
>>>>>>>>>>
>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>
>>>>>>>>>> declared for
>>>>>>>>>>
>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>
>>>>>>>>>> "namespace"  is not
>>>>>>>>>>
>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>
>>>>>>>>>> !!!
>>>>>>>>>> Attribute "namespace" is not declared for
>>>>>>>>>>
>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>>
>>>>>>>>>> C  уважением,
>>>>>>>>>>               Алексей.
>>>>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>>>> horal@tut.by
>>>>>>>>>>
>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>
>>>>>>>>>> 23.01.2006 17:12
>>>>>>>>>> Please respond to
>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>    To
>>>>>>>>>>    user-java@ibatis.apache.org
>>>>>>>>>> cc
>>>>>>>>>>    Subject
>>>>>>>>>>    Re: junit test
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> All correct version. Because it works for the application.
>>>>>>>>>>
>>>>>>>>>> ibatis-common-2.jar
>>>>>>>>>> ibatis-dao-2.jar
>>>>>>>>>> ibatis-sqlmap-2.jar
>>>>>>>>>> and spring  1.2.6
>>>>>>>>>>
>>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Check that you use the correct libraries for spring and   
>>>>>>>>>>> ibatis.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Also check your XML:
>>>>>>>>>>>
>>>>>>>>>>> Cause:
>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>
>>>>>>>>>> declared for
>>>>>>>>>>
>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>
>>>>>>>>>> "namespace"  is not
>>>>>>>>>>
>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>
>>>>>>>>>>> C  уважением,
>>>>>>>>>>>               Алексей.    >
>>>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>>
>>>>>>>>>> horal@tut.by      >
>>>>>>>>>>
>>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>
>>>>>>>>>>> 23.01.2006 16:59
>>>>>>>>>>> Please respond to
>>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                 > To
>>>>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>>>> cc
>>>>>>>>>>>                 > Subject
>>>>>>>>>>>                 junit test
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                 >
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I go the following error when I did JUnit test:
>>>>>>>>>>>
>>>>>>>>>>> setUp()----------
>>>>>>>>>>> org.springframework.beans.factory.BeanCreationException:   E 
>>>>>>>>>>> rror
>>>>>>>>>>>
>>>>>>>>>> creating
>>>>>>>>>>
>>>>>>>>>>> bean with name 'sqlMapClient' defined in file
>>>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>>
>>>>>>>>>> Initialization  of bean
>>>>>>>>>>
>>>>>>>>>>> failed; nested exception is
>>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>>
>>>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>>> Error  parsing XML.  > Cause:
>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error   
>>>>>>>>>> parsing
>>>>>>>>>>
>>>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing   
>>>>>>>>>>> XML.   Cause:
>>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>
>>>>>>>>>> declared for
>>>>>>>>>>
>>>>>>>>>>> element "sqlMap".
>>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>
>>>>>>>>>> "namespace"  is not
>>>>>>>>>>
>>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>>
>>>>>>>>>>> However, it works when I run the application.
>>>>>>>>>>>
>>>>>>>>>>> Here is code for JUNit test:
>>>>>>>>>>>
>>>>>>>>>>>       org.springframework.context.ApplicationContext ctx  
>>>>>>>>>>> =  null;
>>>>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>>>>
>>>>>>>>>> datasource_beans_test.xml",
>>>>>>>>>>
>>>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>>
>>>>>>>>>>> How to make JUnit works?
>>>>>>>>>>>
>>>>>>>>>>> -Henry
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>
>>
>>


Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
iBatis2.1.7 DOES NOT work with JUnit!!!

org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'sqlMapClient' defined in file 
[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean 
failed; nested exception is 
com.ibatis.common.exception.NestedRuntimeException: Error occurred.  
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing 
XPath '/sqlMapConfig/sqlMap'.  Cause: 
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
org.xml.sax.SAXParseException: Attribute "namespace" is not declared for 
element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  
Cause: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error 
parsing XPath '/sqlMapConfig/sqlMap'.  Cause: 
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
org.xml.sax.SAXParseException: Attribute "namespace" is not declared for 
element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  
Cause: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".


-Henry


Nathan Maves wrote:

> Not sure what the issue it since you have not included any error  
> messages but you should upgrade your 2.1.6 to 2.1.7.
>
>
> Nathan
>
> On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:
>
>> Bad news! iBatis 2.1.6 doesn't work for Junit test with java 1.5.  
>> When I switched iBatis back to 1.5, it works. Any idea why? in  
>> Fixing? new Version coming out with fixing?
>>
>> -Henry
>>
>> Larry Meadors wrote:
>>
>>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>
>>> IIRC, it was pissed about the lack of a xalan impl but once I put  that
>>> in devlib it was happy.
>>>
>>> Larry
>>>
>>>
>>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>
>>>> I am using Junit test within the eClipse.
>>>>
>>>> -Henry
>>>>
>>>> Nathan Maves wrote:
>>>>
>>>>
>>>>> Your application work because java is backwards compatible.  The
>>>>> build script, which includes the unit tests will not run with java
>>>>> 1.5.  I think there are classloader issues that require you to mess
>>>>> with the dependancies.
>>>>>
>>>>> Just to reiterate there are no know issues with using ibatis on  Java
>>>>> 1.5.  We have been using it for a while now.
>>>>>
>>>>> Nathan
>>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>
>>>>>
>>>>>> Thanks for your info! Why my application works with jdk 1.5 and
>>>>>> JUnit doesn't with with jdk1.5?
>>>>>>
>>>>>> -Henry
>>>>>>
>>>>>> Nathan Maves wrote:
>>>>>>
>>>>>>
>>>>>>> If you are asking about the JUnit tests for the ibatis code then
>>>>>>> yes  and no :)
>>>>>>>
>>>>>>> I have tried it and it will not work.  You need to run the unit
>>>>>>> tests  with 1.4.  For now the plans looks like we might try to
>>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>>> would be a good  thing for ibatis.
>>>>>>>
>>>>>>> Nathan
>>>>>>>
>>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>>>
>>>>>>>> -Henry
>>>>>>>>
>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> what about XML?
>>>>>>>>>
>>>>>>>>> Cause:
>>>>>>>>>
>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>
>>>>>>>>> declared for
>>>>>>>>>
>>>>>>>>>> element "sqlMap".
>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>
>>>>>>>>> "namespace"  is not
>>>>>>>>>
>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>
>>>>>>>>> !!!
>>>>>>>>> Attribute "namespace" is not declared for
>>>>>>>>>
>>>>>>>>>> element "sqlMap".
>>>>>>>>>>
>>>>>>>>> C  уважением,
>>>>>>>>>               Алексей.
>>>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>>> horal@tut.by
>>>>>>>>>
>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>
>>>>>>>>> 23.01.2006 17:12
>>>>>>>>> Please respond to
>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>    To
>>>>>>>>>    user-java@ibatis.apache.org
>>>>>>>>> cc
>>>>>>>>>    Subject
>>>>>>>>>    Re: junit test
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> All correct version. Because it works for the application.
>>>>>>>>>
>>>>>>>>> ibatis-common-2.jar
>>>>>>>>> ibatis-dao-2.jar
>>>>>>>>> ibatis-sqlmap-2.jar
>>>>>>>>> and spring  1.2.6
>>>>>>>>>
>>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Check that you use the correct libraries for spring and  ibatis.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Also check your XML:
>>>>>>>>>>
>>>>>>>>>> Cause:
>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>
>>>>>>>>> declared for
>>>>>>>>>
>>>>>>>>>> element "sqlMap".
>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>
>>>>>>>>> "namespace"  is not
>>>>>>>>>
>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>
>>>>>>>>>> C  уважением,
>>>>>>>>>>               Алексей.    >
>>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>
>>>>>>>>> horal@tut.by      >
>>>>>>>>>
>>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>>
>>>>>>>>>> 23.01.2006 16:59
>>>>>>>>>> Please respond to
>>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                 > To
>>>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>>> cc
>>>>>>>>>>                 > Subject
>>>>>>>>>>                 junit test
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                 >
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I go the following error when I did JUnit test:
>>>>>>>>>>
>>>>>>>>>> setUp()----------
>>>>>>>>>> org.springframework.beans.factory.BeanCreationException:   Error
>>>>>>>>>>
>>>>>>>>> creating
>>>>>>>>>
>>>>>>>>>> bean with name 'sqlMapClient' defined in file
>>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>
>>>>>>>>> Initialization  of bean
>>>>>>>>>
>>>>>>>>>> failed; nested exception is
>>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>
>>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>> Error  parsing XML.  > Cause:
>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error  
>>>>>>>>> parsing
>>>>>>>>>
>>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing  XML.   
>>>>>>>>>> Cause:
>>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>
>>>>>>>>> declared for
>>>>>>>>>
>>>>>>>>>> element "sqlMap".
>>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>
>>>>>>>>> "namespace"  is not
>>>>>>>>>
>>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>>
>>>>>>>>>> However, it works when I run the application.
>>>>>>>>>>
>>>>>>>>>> Here is code for JUNit test:
>>>>>>>>>>
>>>>>>>>>>       org.springframework.context.ApplicationContext ctx =  
>>>>>>>>>> null;
>>>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>>>
>>>>>>>>> datasource_beans_test.xml",
>>>>>>>>>
>>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>
>>>>>>>>>> How to make JUnit works?
>>>>>>>>>>
>>>>>>>>>> -Henry
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>
>
>

Re: junit test

Posted by Nathan Maves <Na...@Sun.COM>.
Not sure what the issue it since you have not included any error  
messages but you should upgrade your 2.1.6 to 2.1.7.


Nathan

On Jan 24, 2006, at 8:44 AM, Henry Lu wrote:

> Bad news! iBatis 2.1.6 doesn't work for Junit test with java 1.5.  
> When I switched iBatis back to 1.5, it works. Any idea why? in  
> Fixing? new Version coming out with fixing?
>
> -Henry
>
> Larry Meadors wrote:
>
>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>
>> IIRC, it was pissed about the lack of a xalan impl but once I put  
>> that
>> in devlib it was happy.
>>
>> Larry
>>
>>
>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>
>>> I am using Junit test within the eClipse.
>>>
>>> -Henry
>>>
>>> Nathan Maves wrote:
>>>
>>>
>>>> Your application work because java is backwards compatible.  The
>>>> build script, which includes the unit tests will not run with java
>>>> 1.5.  I think there are classloader issues that require you to mess
>>>> with the dependancies.
>>>>
>>>> Just to reiterate there are no know issues with using ibatis on  
>>>> Java
>>>> 1.5.  We have been using it for a while now.
>>>>
>>>> Nathan
>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>
>>>>
>>>>> Thanks for your info! Why my application works with jdk 1.5 and
>>>>> JUnit doesn't with with jdk1.5?
>>>>>
>>>>> -Henry
>>>>>
>>>>> Nathan Maves wrote:
>>>>>
>>>>>
>>>>>> If you are asking about the JUnit tests for the ibatis code then
>>>>>> yes  and no :)
>>>>>>
>>>>>> I have tried it and it will not work.  You need to run the unit
>>>>>> tests  with 1.4.  For now the plans looks like we might try to
>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>> would be a good  thing for ibatis.
>>>>>>
>>>>>> Nathan
>>>>>>
>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>
>>>>>>
>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>>
>>>>>>> -Henry
>>>>>>>
>>>>>>> AHrakou@iba.by wrote:
>>>>>>>
>>>>>>>
>>>>>>>> what about XML?
>>>>>>>>
>>>>>>>> Cause:
>>>>>>>>
>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>
>>>>>>>> declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>
>>>>>>>> "namespace"  is not
>>>>>>>>
>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>
>>>>>>>> !!!
>>>>>>>> Attribute "namespace" is not declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>>
>>>>>>>> C  уважением,
>>>>>>>>               Алексей.
>>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>> horal@tut.by
>>>>>>>>
>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>
>>>>>>>> 23.01.2006 17:12
>>>>>>>> Please respond to
>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>    To
>>>>>>>>    user-java@ibatis.apache.org
>>>>>>>> cc
>>>>>>>>    Subject
>>>>>>>>    Re: junit test
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> All correct version. Because it works for the application.
>>>>>>>>
>>>>>>>> ibatis-common-2.jar
>>>>>>>> ibatis-dao-2.jar
>>>>>>>> ibatis-sqlmap-2.jar
>>>>>>>> and spring  1.2.6
>>>>>>>>
>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Check that you use the correct libraries for spring and  
>>>>>>>>> ibatis.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Also check your XML:
>>>>>>>>>
>>>>>>>>> Cause:
>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>
>>>>>>>> declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>
>>>>>>>> "namespace"  is not
>>>>>>>>
>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>
>>>>>>>>> C  уважением,
>>>>>>>>>               Алексей.    >
>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>>
>>>>>>>> horal@tut.by      >
>>>>>>>>
>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>
>>>>>>>>> 23.01.2006 16:59
>>>>>>>>> Please respond to
>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                 > To
>>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>> cc
>>>>>>>>>                 > Subject
>>>>>>>>>                 junit test
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                 >
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I go the following error when I did JUnit test:
>>>>>>>>>
>>>>>>>>> setUp()----------
>>>>>>>>> org.springframework.beans.factory.BeanCreationException:   
>>>>>>>>> Error
>>>>>>>>>
>>>>>>>> creating
>>>>>>>>
>>>>>>>>> bean with name 'sqlMapClient' defined in file
>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>
>>>>>>>> Initialization  of bean
>>>>>>>>
>>>>>>>>> failed; nested exception is
>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>
>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>> Error  parsing XML.  > Cause:
>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error  
>>>>>>>> parsing
>>>>>>>>
>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing  
>>>>>>>>> XML.   Cause:
>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>
>>>>>>>> declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>
>>>>>>>> "namespace"  is not
>>>>>>>>
>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>
>>>>>>>>> However, it works when I run the application.
>>>>>>>>>
>>>>>>>>> Here is code for JUNit test:
>>>>>>>>>
>>>>>>>>>       org.springframework.context.ApplicationContext ctx =  
>>>>>>>>> null;
>>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>>
>>>>>>>> datasource_beans_test.xml",
>>>>>>>>
>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>
>>>>>>>>> How to make JUnit works?
>>>>>>>>>
>>>>>>>>> -Henry
>>>>>>>>>
>>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>


Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
Bad news! iBatis 2.1.6 doesn't work for Junit test with java 1.5. When I 
switched iBatis back to 1.5, it works. Any idea why? in Fixing? new 
Version coming out with fixing?

-Henry

Larry Meadors wrote:

>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>
>IIRC, it was pissed about the lack of a xalan impl but once I put that
>in devlib it was happy.
>
>Larry
>
>
>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>  
>
>>I am using Junit test within the eClipse.
>>
>>-Henry
>>
>>Nathan Maves wrote:
>>
>>    
>>
>>>Your application work because java is backwards compatible.  The
>>>build script, which includes the unit tests will not run with java
>>>1.5.  I think there are classloader issues that require you to mess
>>>with the dependancies.
>>>
>>>Just to reiterate there are no know issues with using ibatis on Java
>>>1.5.  We have been using it for a while now.
>>>
>>>Nathan
>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>
>>>      
>>>
>>>>Thanks for your info! Why my application works with jdk 1.5 and
>>>>JUnit doesn't with with jdk1.5?
>>>>
>>>>-Henry
>>>>
>>>>Nathan Maves wrote:
>>>>
>>>>        
>>>>
>>>>>If you are asking about the JUnit tests for the ibatis code then
>>>>>yes  and no :)
>>>>>
>>>>>I have tried it and it will not work.  You need to run the unit
>>>>>tests  with 1.4.  For now the plans looks like we might try to
>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>would be a good  thing for ibatis.
>>>>>
>>>>>Nathan
>>>>>
>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>
>>>>>          
>>>>>
>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>
>>>>>>-Henry
>>>>>>
>>>>>>AHrakou@iba.by wrote:
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>what about XML?
>>>>>>>
>>>>>>> Cause:
>>>>>>>              
>>>>>>>
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>                
>>>>>>>>
>>>>>>>!!!
>>>>>>>Attribute "namespace" is not declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>                
>>>>>>>>
>>>>>>> C  уважением,
>>>>>>>               Алексей.
>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>horal@tut.by
>>>>>>>
>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>
>>>>>>>23.01.2006 17:12
>>>>>>>Please respond to
>>>>>>>user-java@ibatis.apache.org
>>>>>>>
>>>>>>>
>>>>>>>    To
>>>>>>>    user-java@ibatis.apache.org
>>>>>>>cc
>>>>>>>    Subject
>>>>>>>    Re: junit test
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>All correct version. Because it works for the application.
>>>>>>>
>>>>>>>ibatis-common-2.jar
>>>>>>>ibatis-dao-2.jar
>>>>>>>ibatis-sqlmap-2.jar
>>>>>>>and spring  1.2.6
>>>>>>>
>>>>>>>AHrakou@iba.by wrote:
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>Check that you use the correct libraries for spring and ibatis.
>>>>>>>>
>>>>>>>>
>>>>>>>>Also check your XML:
>>>>>>>>
>>>>>>>>Cause:
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>
>>>>>>>> C  уважением,
>>>>>>>>               Алексей.    >
>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>                
>>>>>>>>
>>>>>>>horal@tut.by      >
>>>>>>>              
>>>>>>>
>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>
>>>>>>>>23.01.2006 16:59
>>>>>>>>Please respond to
>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>                 > To
>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>cc
>>>>>>>>                 > Subject
>>>>>>>>                 junit test
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 >
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>I go the following error when I did JUnit test:
>>>>>>>>
>>>>>>>>setUp()----------
>>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
>>>>>>>>                
>>>>>>>>
>>>>>>>creating
>>>>>>>              
>>>>>>>
>>>>>>>>bean with name 'sqlMapClient' defined in file
>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>                
>>>>>>>>
>>>>>>>Initialization  of bean
>>>>>>>              
>>>>>>>
>>>>>>>>failed; nested exception is
>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>                
>>>>>>>>
>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>Error  parsing XML.  > Cause:
>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>>>>>>              
>>>>>>>
>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>
>>>>>>>>However, it works when I run the application.
>>>>>>>>
>>>>>>>>Here is code for JUNit test:
>>>>>>>>
>>>>>>>>       org.springframework.context.ApplicationContext ctx = null;
>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>                
>>>>>>>>
>>>>>>>datasource_beans_test.xml",
>>>>>>>              
>>>>>>>
>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>
>>>>>>>>How to make JUnit works?
>>>>>>>>
>>>>>>>>-Henry
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>
>>>>>          
>>>>>
>>>
>>>      
>>>

Re: junit test

Posted by Nathan Maves <Na...@Sun.COM>.
Larry was running it from the command line using ant.

Nathan

On Jan 23, 2006, at 2:30 PM, Henry Lu wrote:

> Are you using EClipse for Junit testing?
>
> -Henry
>
> Larry Meadors wrote:
>
>> I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>
>> IIRC, it was pissed about the lack of a xalan impl but once I put  
>> that
>> in devlib it was happy.
>>
>> Larry
>>
>>
>> On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>
>>> I am using Junit test within the eClipse.
>>>
>>> -Henry
>>>
>>> Nathan Maves wrote:
>>>
>>>
>>>> Your application work because java is backwards compatible.  The
>>>> build script, which includes the unit tests will not run with java
>>>> 1.5.  I think there are classloader issues that require you to mess
>>>> with the dependancies.
>>>>
>>>> Just to reiterate there are no know issues with using ibatis on  
>>>> Java
>>>> 1.5.  We have been using it for a while now.
>>>>
>>>> Nathan
>>>> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>
>>>>
>>>>> Thanks for your info! Why my application works with jdk 1.5 and
>>>>> JUnit doesn't with with jdk1.5?
>>>>>
>>>>> -Henry
>>>>>
>>>>> Nathan Maves wrote:
>>>>>
>>>>>
>>>>>> If you are asking about the JUnit tests for the ibatis code then
>>>>>> yes  and no :)
>>>>>>
>>>>>> I have tried it and it will not work.  You need to run the unit
>>>>>> tests  with 1.4.  For now the plans looks like we might try to
>>>>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>> would be a good  thing for ibatis.
>>>>>>
>>>>>> Nathan
>>>>>>
>>>>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>
>>>>>>
>>>>>>> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>>
>>>>>>> -Henry
>>>>>>>
>>>>>>> AHrakou@iba.by wrote:
>>>>>>>
>>>>>>>
>>>>>>>> what about XML?
>>>>>>>>
>>>>>>>> Cause:
>>>>>>>>
>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>
>>>>>>>> declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>
>>>>>>>> "namespace"  is not
>>>>>>>>
>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>
>>>>>>>> !!!
>>>>>>>> Attribute "namespace" is not declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>>
>>>>>>>> C  уважением,
>>>>>>>>               Алексей.
>>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>> horal@tut.by
>>>>>>>>
>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>
>>>>>>>> 23.01.2006 17:12
>>>>>>>> Please respond to
>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>    To
>>>>>>>>    user-java@ibatis.apache.org
>>>>>>>> cc
>>>>>>>>    Subject
>>>>>>>>    Re: junit test
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> All correct version. Because it works for the application.
>>>>>>>>
>>>>>>>> ibatis-common-2.jar
>>>>>>>> ibatis-dao-2.jar
>>>>>>>> ibatis-sqlmap-2.jar
>>>>>>>> and spring  1.2.6
>>>>>>>>
>>>>>>>> AHrakou@iba.by wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Check that you use the correct libraries for spring and  
>>>>>>>>> ibatis.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Also check your XML:
>>>>>>>>>
>>>>>>>>> Cause:
>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>
>>>>>>>> declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>
>>>>>>>> "namespace"  is not
>>>>>>>>
>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>
>>>>>>>>> C  уважением,
>>>>>>>>>               Алексей.    >
>>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>>
>>>>>>>> horal@tut.by      >
>>>>>>>>
>>>>>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>>>>>
>>>>>>>>> 23.01.2006 16:59
>>>>>>>>> Please respond to
>>>>>>>>> user-java@ibatis.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                 > To
>>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>> cc
>>>>>>>>>                 > Subject
>>>>>>>>>                 junit test
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                 >
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I go the following error when I did JUnit test:
>>>>>>>>>
>>>>>>>>> setUp()----------
>>>>>>>>> org.springframework.beans.factory.BeanCreationException:   
>>>>>>>>> Error
>>>>>>>>>
>>>>>>>> creating
>>>>>>>>
>>>>>>>>> bean with name 'sqlMapClient' defined in file
>>>>>>>>> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>
>>>>>>>> Initialization  of bean
>>>>>>>>
>>>>>>>>> failed; nested exception is
>>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>
>>>>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>> Error  parsing XML.  > Cause:
>>>>>>>> com.ibatis.common.exception.NestedRuntimeException: Error  
>>>>>>>> parsing
>>>>>>>>
>>>>>>>>> XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>> com.ibatis.common.xml.NodeletException: Error parsing  
>>>>>>>>> XML.   Cause:
>>>>>>>>> org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>
>>>>>>>> declared for
>>>>>>>>
>>>>>>>>> element "sqlMap".
>>>>>>>>> Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>
>>>>>>>> "namespace"  is not
>>>>>>>>
>>>>>>>>> declared for element "sqlMap".
>>>>>>>>>
>>>>>>>>> However, it works when I run the application.
>>>>>>>>>
>>>>>>>>> Here is code for JUNit test:
>>>>>>>>>
>>>>>>>>>       org.springframework.context.ApplicationContext ctx =  
>>>>>>>>> null;
>>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>>
>>>>>>>> datasource_beans_test.xml",
>>>>>>>>
>>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>
>>>>>>>>> How to make JUnit works?
>>>>>>>>>
>>>>>>>>> -Henry
>>>>>>>>>
>>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>


Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
Are you using EClipse for Junit testing?

-Henry

Larry Meadors wrote:

>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>
>IIRC, it was pissed about the lack of a xalan impl but once I put that
>in devlib it was happy.
>
>Larry
>
>
>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>  
>
>>I am using Junit test within the eClipse.
>>
>>-Henry
>>
>>Nathan Maves wrote:
>>
>>    
>>
>>>Your application work because java is backwards compatible.  The
>>>build script, which includes the unit tests will not run with java
>>>1.5.  I think there are classloader issues that require you to mess
>>>with the dependancies.
>>>
>>>Just to reiterate there are no know issues with using ibatis on Java
>>>1.5.  We have been using it for a while now.
>>>
>>>Nathan
>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>
>>>      
>>>
>>>>Thanks for your info! Why my application works with jdk 1.5 and
>>>>JUnit doesn't with with jdk1.5?
>>>>
>>>>-Henry
>>>>
>>>>Nathan Maves wrote:
>>>>
>>>>        
>>>>
>>>>>If you are asking about the JUnit tests for the ibatis code then
>>>>>yes  and no :)
>>>>>
>>>>>I have tried it and it will not work.  You need to run the unit
>>>>>tests  with 1.4.  For now the plans looks like we might try to
>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>would be a good  thing for ibatis.
>>>>>
>>>>>Nathan
>>>>>
>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>
>>>>>          
>>>>>
>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>
>>>>>>-Henry
>>>>>>
>>>>>>AHrakou@iba.by wrote:
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>what about XML?
>>>>>>>
>>>>>>> Cause:
>>>>>>>              
>>>>>>>
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>                
>>>>>>>>
>>>>>>>!!!
>>>>>>>Attribute "namespace" is not declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>                
>>>>>>>>
>>>>>>> C  уважением,
>>>>>>>               Алексей.
>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>horal@tut.by
>>>>>>>
>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>
>>>>>>>23.01.2006 17:12
>>>>>>>Please respond to
>>>>>>>user-java@ibatis.apache.org
>>>>>>>
>>>>>>>
>>>>>>>    To
>>>>>>>    user-java@ibatis.apache.org
>>>>>>>cc
>>>>>>>    Subject
>>>>>>>    Re: junit test
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>All correct version. Because it works for the application.
>>>>>>>
>>>>>>>ibatis-common-2.jar
>>>>>>>ibatis-dao-2.jar
>>>>>>>ibatis-sqlmap-2.jar
>>>>>>>and spring  1.2.6
>>>>>>>
>>>>>>>AHrakou@iba.by wrote:
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>Check that you use the correct libraries for spring and ibatis.
>>>>>>>>
>>>>>>>>
>>>>>>>>Also check your XML:
>>>>>>>>
>>>>>>>>Cause:
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>
>>>>>>>> C  уважением,
>>>>>>>>               Алексей.    >
>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>                
>>>>>>>>
>>>>>>>horal@tut.by      >
>>>>>>>              
>>>>>>>
>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>
>>>>>>>>23.01.2006 16:59
>>>>>>>>Please respond to
>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>                 > To
>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>cc
>>>>>>>>                 > Subject
>>>>>>>>                 junit test
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 >
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>I go the following error when I did JUnit test:
>>>>>>>>
>>>>>>>>setUp()----------
>>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
>>>>>>>>                
>>>>>>>>
>>>>>>>creating
>>>>>>>              
>>>>>>>
>>>>>>>>bean with name 'sqlMapClient' defined in file
>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>                
>>>>>>>>
>>>>>>>Initialization  of bean
>>>>>>>              
>>>>>>>
>>>>>>>>failed; nested exception is
>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>                
>>>>>>>>
>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>Error  parsing XML.  > Cause:
>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>>>>>>              
>>>>>>>
>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>
>>>>>>>>However, it works when I run the application.
>>>>>>>>
>>>>>>>>Here is code for JUNit test:
>>>>>>>>
>>>>>>>>       org.springframework.context.ApplicationContext ctx = null;
>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>                
>>>>>>>>
>>>>>>>datasource_beans_test.xml",
>>>>>>>              
>>>>>>>
>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>
>>>>>>>>How to make JUnit works?
>>>>>>>>
>>>>>>>>-Henry
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>
>>>>>          
>>>>>
>>>
>>>      
>>>

Re: ibatis 2.1.16

Posted by Clinton Begin <cl...@gmail.com>.
Also remember that 2.1.6 had the TopLink DAO bug, so you should upgrade to
2.1.7.

Cheers,
Clinton

On 1/24/06, Larry Meadors <lm...@apache.org> wrote:
>
> Are you talking about the build?
>
> If so, look here:
>
> http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix
>
> You're losing me here Henry.
>
> Larry
>
>
> On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> > Doesn't work with JUnit!!! 2.1.5 works.
> >
> > -Henry
> >
> > Larry Meadors wrote:
> >
> > >I am using, and have built iBATIS with jdk1.5 - unit tests and all.
> > >
> > >IIRC, it was pissed about the lack of a xalan impl but once I put that
> > >in devlib it was happy.
> > >
> > >Larry
> > >
> > >
> > >On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> > >
> > >
> > >>I am using Junit test within the eClipse.
> > >>
> > >>-Henry
> > >>
> > >>Nathan Maves wrote:
> > >>
> > >>
> > >>
> > >>>Your application work because java is backwards compatible.  The
> > >>>build script, which includes the unit tests will not run with java
> > >>>1.5.  I think there are classloader issues that require you to mess
> > >>>with the dependancies.
> > >>>
> > >>>Just to reiterate there are no know issues with using ibatis on Java
> > >>>1.5.  We have been using it for a while now.
> > >>>
> > >>>Nathan
> > >>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> > >>>
> > >>>
> > >>>
> > >>>>Thanks for your info! Why my application works with jdk 1.5 and
> > >>>>JUnit doesn't with with jdk1.5?
> > >>>>
> > >>>>-Henry
> > >>>>
> > >>>>Nathan Maves wrote:
> > >>>>
> > >>>>
> > >>>>
> > >>>>>If you are asking about the JUnit tests for the ibatis code then
> > >>>>>yes  and no :)
> > >>>>>
> > >>>>>I have tried it and it will not work.  You need to run the unit
> > >>>>>tests  with 1.4.  For now the plans looks like we might try to
> > >>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
> > >>>>>would be a good  thing for ibatis.
> > >>>>>
> > >>>>>Nathan
> > >>>>>
> > >>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
> > >>>>>>
> > >>>>>>-Henry
> > >>>>>>
> > >>>>>>AHrakou@iba.by wrote:
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>>what about XML?
> > >>>>>>>
> > >>>>>>> Cause:
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>declared for
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>element "sqlMap".
> > >>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>"namespace"  is not
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>declared for element "sqlMap".
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>!!!
> > >>>>>>>Attribute "namespace" is not declared for
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>element "sqlMap".
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>> C  уважением,
> > >>>>>>>               Алексей.
> > >>>>>>>  mobile: +375-029-708-2168                      email:
> > >>>>>>>horal@tut.by
> > >>>>>>>
> > >>>>>>>*Henry Lu <zh...@umich.edu>*
> > >>>>>>>
> > >>>>>>>23.01.2006 17:12
> > >>>>>>>Please respond to
> > >>>>>>>user-java@ibatis.apache.org
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>    To
> > >>>>>>>    user-java@ibatis.apache.org
> > >>>>>>>cc
> > >>>>>>>    Subject
> > >>>>>>>    Re: junit test
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>All correct version. Because it works for the application.
> > >>>>>>>
> > >>>>>>>ibatis-common-2.jar
> > >>>>>>>ibatis-dao-2.jar
> > >>>>>>>ibatis-sqlmap-2.jar
> > >>>>>>>and spring  1.2.6
> > >>>>>>>
> > >>>>>>>AHrakou@iba.by wrote:
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>Check that you use the correct libraries for spring and ibatis.
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>Also check your XML:
> > >>>>>>>>
> > >>>>>>>>Cause:
> > >>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>declared for
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>element "sqlMap".
> > >>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>"namespace"  is not
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>declared for element "sqlMap".
> > >>>>>>>>
> > >>>>>>>> C  уважением,
> > >>>>>>>>               Алексей.    >
> > >>>>>>>>  mobile: +375-029-708-2168                    >   email:
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>horal@tut.by      >
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>*Henry Lu <zh...@umich.edu>*
> > >>>>>>>>
> > >>>>>>>>23.01.2006 16:59
> > >>>>>>>>Please respond to
> > >>>>>>>>user-java@ibatis.apache.org
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>                 > To
> > >>>>>>>>                 user-java@ibatis.apache.org
> > >>>>>>>>cc
> > >>>>>>>>                 > Subject
> > >>>>>>>>                 junit test
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>                 >
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>I go the following error when I did JUnit test:
> > >>>>>>>>
> > >>>>>>>>setUp()----------
> > >>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>creating
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>bean with name 'sqlMapClient' defined in file
> > >>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>Initialization  of bean
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>failed; nested exception is
> > >>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> > >>>>>>>Error  parsing XML.  > Cause:
> > >>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
> > >>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause:
> > >>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>declared for
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>element "sqlMap".
> > >>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>"namespace"  is not
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>declared for element "sqlMap".
> > >>>>>>>>
> > >>>>>>>>However, it works when I run the application.
> > >>>>>>>>
> > >>>>>>>>Here is code for JUNit test:
> > >>>>>>>>
> > >>>>>>>>       org.springframework.context.ApplicationContext ctx =
> null;
> > >>>>>>>>       String[] paths = { "/WEB-INF/test/
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>datasource_beans_test.xml",
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>>           "/WEB-INF/authorize-spring.xml",
> > >>>>>>>>           "/WEB-INF/spring-auth.xml",
> > >>>>>>>>           "/WEB-INF/app_beans.xml"};
> > >>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
> > >>>>>>>>
> > >>>>>>>>How to make JUnit works?
> > >>>>>>>>
> > >>>>>>>>-Henry
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>
> > >>>
> > >>>
> >
>

Re: ibatis 2.1.16

Posted by Clinton Begin <cl...@gmail.com>.
Henry, we understand that.  You've repeated that a number of times.
Unfortunately it doesn't help us to help you.

Have you tried any of the suggestions at all?  You just keep repeating the
same thing over and over.

Work with us here!  :-)

Cheers,
Clinton

On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
>
> Thank you very much Clinton for your understanding. I am using eClipse
> 3.1 and it works fine with ibatis 2.1.5 and it doesn't work with 2.16.
> and 2.1.7
>
> -Henry
>
> Clinton Begin wrote:
>
> > Henry, I can't recreate this.  Could it be something wrong with your
> > IDE?  Try building and running your tests with Ant via the command
> > line, just to be sure.
> >
> > I have run unit tests without issue with iBATIS 2.1.6 and 2.1.7 within
> > IntelliJ IDEA and from the command line with Ant.
> >
> > Cheers,
> > Clinton
> >
> > On 1/24/06, *Henry Lu* <zhlu@umich.edu <ma...@umich.edu>> wrote:
> >
> >     <?xml version="1.0" encoding="UTF-8"?>
> >
> >     <!DOCTYPE sqlMap
> >         PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
> >         "http://ibatis.apache.org/dtd/sql-map-2.dtd
> >     <http://ibatis.apache.org/dtd/sql-map-2.dtd>">
> >
> >
> >     and
> >
> >     <?xml version="1.0" encoding="UTF-8"?>
> >     <!DOCTYPE sqlMapConfig
> >     PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
> >     " http://www.ibatis.com/dtd/sql-map-config-2.dtd">
> >
> >
> >     Once again, all web application works just fine with any ibatis
> >     and all
> >     my files and code. Just for JUnit testing, 2.1.6 and 2.1.7 failed.
> >
> >     -Henry
> >
> >
> >     Larry Meadors wrote:
> >
> >     >What DTD are you using?
> >     >
> >     >Larry
> >     >
> >     >
> >     >On 1/24/06, Henry Lu <zhlu@umich.edu <ma...@umich.edu>>
> wrote:
> >     >
> >     >
> >     >>There is some confusion here. All ibatis version
> >     2.1.5,2.16.2,1.7 work
> >     >>fine with my web application. I am talking about JUNIT here.
> >     >>
> >     >>When I run JUnit with ibatis, all files, code are working fine for
> >     >>2.1.5, but failed with 2.1.6 and 2.1.7.
> >     >>
> >     >>-Henry
> >     >>
> >     >>P.S. Here is the errors:
> >     >>
> >     >>org.springframework.beans.factory.BeanCreationException:
> >     Error  creating
> >     >>bean with name 'sqlMapClient' defined in file [C:\devel
> >     >>\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of
> >     bean  failed;
> >     >>nested exception
> >     is  com.ibatis.common.exception.NestedRuntimeException :
> >     >>Error  occurred.  Cause: com.ibatis.common.xml.NodeletException:
> >     Error
> >     >>parsing XML.  Cause:
> >     >>com.ibatis.common.exception.NestedRuntimeException: Error
> >     parsing  XPath
> >     >>'/sqlMapConfig/sqlMap'.  Cause:
> >     com.ibatis.common.xml.NodeletException:
> >     >>Error parsing XML.  Cause:  org.xml.sax.SAXParseException:
> Attribute
> >     >>"namespace" is not  declared for element "sqlMap".
> >     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
> >     is  not
> >     >>declared for element "sqlMap".
> >     >>Caused by: com.ibatis.common.xml.NodeletException: Error
> >     parsing  XML.
> >     >>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
> not
> >     >>declared for element "sqlMap".
> >     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
> >     is  not
> >     >>declared for element "sqlMap".
> >     >>Caused by:
> >     com.ibatis.common.exception.NestedRuntimeException:  Error
> >     >>parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> >     >>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >     >> org.xml.sax.SAXParseException: Attribute "namespace" is
> >     not  declared
> >     >>for element "sqlMap".
> >     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
> >     is  not
> >     >>declared for element "sqlMap".
> >     >>Caused by: com.ibatis.common.xml.NodeletException: Error
> >     parsing  XML.
> >     >>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is
> not
> >     >>declared for element "sqlMap".
> >     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
> >     is  not
> >     >>declared for element "sqlMap".
> >     >>
> >     >>P.S. When I switched back to 2.1.5 jars, JUnit works just fine.
> >     >>
> >     >>-Henry
> >     >>
> >     >>Larry Meadors wrote:
> >     >>
> >     >>
> >     >>
> >     >>>Are you talking about the build?
> >     >>>
> >     >>>If so, look here:
> >     >>>
> >     >>>
> http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix
> >     >>>
> >     >>>You're losing me here Henry.
> >     >>>
> >     >>>Larry
> >     >>>
> >     >>>
> >     >>>On 1/24/06, Henry Lu <zhlu@umich.edu <ma...@umich.edu>>
> >     wrote:
> >     >>>
> >     >>>
> >     >>>
> >     >>>
> >     >>>>Doesn't work with JUnit!!! 2.1.5 works.
> >     >>>>
> >     >>>>-Henry
> >     >>>>
> >     >>>>Larry Meadors wrote:
> >     >>>>
> >     >>>>
> >     >>>>
> >     >>>>
> >     >>>>
> >     >>>>>I am using, and have built iBATIS with jdk1.5 - unit tests
> >     and all.
> >     >>>>>
> >     >>>>>IIRC, it was pissed about the lack of a xalan impl but once I
> >     put that
> >     >>>>>in devlib it was happy.
> >     >>>>>
> >     >>>>>Larry
> >     >>>>>
> >     >>>>>
> >     >>>>>On 1/23/06, Henry Lu < zhlu@umich.edu
> >     <ma...@umich.edu>> wrote:
> >     >>>>>
> >     >>>>>
> >     >>>>>
> >     >>>>>
> >     >>>>>
> >     >>>>>
> >     >>>>>>I am using Junit test within the eClipse.
> >     >>>>>>
> >     >>>>>>-Henry
> >     >>>>>>
> >     >>>>>>Nathan Maves wrote:
> >     >>>>>>
> >     >>>>>>
> >     >>>>>>
> >     >>>>>>
> >     >>>>>>
> >     >>>>>>
> >     >>>>>>
> >     >>>>>>>Your application work because java is backwards
> >     compatible.  The
> >     >>>>>>>build script, which includes the unit tests will not run
> >     with java
> >     >>>>>>>1.5.  I think there are classloader issues that require you
> >     to mess
> >     >>>>>>>with the dependancies.
> >     >>>>>>>
> >     >>>>>>>Just to reiterate there are no know issues with using
> >     ibatis on Java
> >     >>>>>>>1.5.  We have been using it for a while now.
> >     >>>>>>>
> >     >>>>>>>Nathan
> >     >>>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >     >>>>>>>
> >     >>>>>>>
> >     >>>>>>>
> >     >>>>>>>
> >     >>>>>>>
> >     >>>>>>>
> >     >>>>>>>
> >     >>>>>>>>Thanks for your info! Why my application works with jdk
> >     1.5 and
> >     >>>>>>>>JUnit doesn't with with jdk1.5?
> >     >>>>>>>>
> >     >>>>>>>>-Henry
> >     >>>>>>>>
> >     >>>>>>>>Nathan Maves wrote:
> >     >>>>>>>>
> >     >>>>>>>>
> >     >>>>>>>>
> >     >>>>>>>>
> >     >>>>>>>>
> >     >>>>>>>>
> >     >>>>>>>>
> >     >>>>>>>>>If you are asking about the JUnit tests for the ibatis
> >     code then
> >     >>>>>>>>>yes  and no :)
> >     >>>>>>>>>
> >     >>>>>>>>>I have tried it and it will not work.  You need to run
> >     the unit
> >     >>>>>>>>>tests  with 1.4.  For now the plans looks like we might
> >     try to
> >     >>>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on
> >     this but I
> >     >>>>>>>>>would be a good  thing for ibatis.
> >     >>>>>>>>>
> >     >>>>>>>>>Nathan
> >     >>>>>>>>>
> >     >>>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for
> >     ibatis?
> >     >>>>>>>>>>
> >     >>>>>>>>>>-Henry
> >     >>>>>>>>>>
> >     >>>>>>>>>> AHrakou@iba.by <ma...@iba.by> wrote:
> >     >>>>>>>>>>
> >     >>>>>>>>>>
> >     >>>>>>>>>>
> >     >>>>>>>>>>
> >     >>>>>>>>>>
> >     >>>>>>>>>>
> >     >>>>>>>>>>
> >     >>>>>>>>>>>what about XML?
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>Cause:
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
> >     is not
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>declared for
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>element "sqlMap".
> >     >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>"namespace"  is not
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>declared for element "sqlMap".
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>!!!
> >     >>>>>>>>>>>Attribute "namespace" is not declared for
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>element "sqlMap".
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>C  уважением,
> >     >>>>>>>>>>>             Алексей.
> >     >>>>>>>>>>>mobile: +375-029-708-2168                      email:
> >     >>>>>>>>>>>horal@tut.by <ma...@tut.by>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>*Henry Lu < zhlu@umich.edu <ma...@umich.edu>>*
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>23.01.2006 17:12
> >     >>>>>>>>>>>Please respond to
> >     >>>>>>>>>>>user-java@ibatis.apache.org
> >     <ma...@ibatis.apache.org>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>  To
> >     >>>>>>>>>>>  user-java@ibatis.apache.org
> >     <ma...@ibatis.apache.org>
> >     >>>>>>>>>>>cc
> >     >>>>>>>>>>>  Subject
> >     >>>>>>>>>>>  Re: junit test
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>All correct version. Because it works for the
> application.
> >     >>>>>>>>>>>
> >     >>>>>>>>>>> ibatis-common-2.jar
> >     >>>>>>>>>>>ibatis-dao-2.jar
> >     >>>>>>>>>>>ibatis-sqlmap-2.jar
> >     >>>>>>>>>>>and spring  1.2.6
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>AHrakou@iba.by <ma...@iba.by> wrote:
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>Check that you use the correct libraries for spring
> >     and ibatis.
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>Also check your XML:
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>Cause:
> >     >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
> >     is not
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>declared for
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>element "sqlMap".
> >     >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>"namespace"  is not
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>declared for element "sqlMap".
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>C  уважением,
> >     >>>>>>>>>>>>             Алексей.    >
> >     >>>>>>>>>>>>mobile: +375-029-708-2168                    >   email:
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>horal@tut.by <ma...@tut.by>      >
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>*Henry Lu < zhlu@umich.edu <ma...@umich.edu>>*
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>23.01.2006 16:59
> >     >>>>>>>>>>>>Please respond to
> >     >>>>>>>>>>>>user-java@ibatis.apache.org
> >     <ma...@ibatis.apache.org>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>               > To
> >     >>>>>>>>>>>>               user-java@ibatis.apache.org
> >     <ma...@ibatis.apache.org>
> >     >>>>>>>>>>>>cc
> >     >>>>>>>>>>>>               > Subject
> >     >>>>>>>>>>>>               junit test
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>               >
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>I go the following error when I did JUnit test:
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>setUp()----------
> >     >>>>>>>>>>>>org.springframework.beans.factory.BeanCreationException
> >     :  Error
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>creating
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>bean with name 'sqlMapClient' defined in file
> >     >>>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>Initialization  of bean
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>failed; nested exception is
> >     >>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException :
> Error
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>occurred.  > Cause:
> com.ibatis.common.xml.NodeletException:
> >     >>>>>>>>>>>Error  parsing XML.  > Cause:
> >     >>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException:
> >     Error parsing
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
> >     >>>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing
> >     XML.   Cause:
> >     >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
> >     is not
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>declared for
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>element "sqlMap".
> >     >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>"namespace"  is not
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>declared for element "sqlMap".
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>However, it works when I run the application.
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>Here is code for JUNit test:
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>     org.springframework.context.ApplicationContext
> >     ctx = null;
> >     >>>>>>>>>>>>     String[] paths = { "/WEB-INF/test/
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>datasource_beans_test.xml",
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>
> >     >>>>>>>>>>>>         "/WEB-INF/authorize-spring.xml",
> >     >>>>>>>>>>>>         "/WEB-INF/spring-auth.xml",
> >     >>>>>>>>>>>>         "/WEB-INF/app_beans.xml"};
> >     >>>>>>>>>>>>     ctx = new FileSystemXmlApplicationContext(paths);
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>How to make JUnit works?
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>-Henry
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>>>
> >     >>>>>>>
> >     >>>>>>>
> >     >>>>>>>
> >
> >
>

Re: ibatis 2.1.16

Posted by Henry Lu <zh...@umich.edu>.
Thank you very much Clinton for your understanding. I am using eClipse 
3.1 and it works fine with ibatis 2.1.5 and it doesn't work with 2.16. 
and 2.1.7

-Henry

Clinton Begin wrote:

> Henry, I can't recreate this.  Could it be something wrong with your 
> IDE?  Try building and running your tests with Ant via the command 
> line, just to be sure.
>
> I have run unit tests without issue with iBATIS 2.1.6 and 2.1.7 within 
> IntelliJ IDEA and from the command line with Ant.
>
> Cheers,
> Clinton
>
> On 1/24/06, *Henry Lu* <zhlu@umich.edu <ma...@umich.edu>> wrote:
>
>     <?xml version="1.0" encoding="UTF-8"?>
>
>     <!DOCTYPE sqlMap
>         PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>         "http://ibatis.apache.org/dtd/sql-map-2.dtd
>     <http://ibatis.apache.org/dtd/sql-map-2.dtd>">
>
>
>     and
>
>     <?xml version="1.0" encoding="UTF-8"?>
>     <!DOCTYPE sqlMapConfig
>     PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>     " http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>
>
>     Once again, all web application works just fine with any ibatis
>     and all
>     my files and code. Just for JUnit testing, 2.1.6 and 2.1.7 failed.
>
>     -Henry
>
>
>     Larry Meadors wrote:
>
>     >What DTD are you using?
>     >
>     >Larry
>     >
>     >
>     >On 1/24/06, Henry Lu <zhlu@umich.edu <ma...@umich.edu>> wrote:
>     >
>     >
>     >>There is some confusion here. All ibatis version
>     2.1.5,2.16.2,1.7 work
>     >>fine with my web application. I am talking about JUNIT here.
>     >>
>     >>When I run JUnit with ibatis, all files, code are working fine for
>     >>2.1.5, but failed with 2.1.6 and 2.1.7.
>     >>
>     >>-Henry
>     >>
>     >>P.S. Here is the errors:
>     >>
>     >>org.springframework.beans.factory.BeanCreationException:
>     Error  creating
>     >>bean with name 'sqlMapClient' defined in file [C:\devel
>     >>\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of
>     bean  failed;
>     >>nested exception
>     is  com.ibatis.common.exception.NestedRuntimeException :
>     >>Error  occurred.  Cause: com.ibatis.common.xml.NodeletException:
>     Error
>     >>parsing XML.  Cause:
>     >>com.ibatis.common.exception.NestedRuntimeException: Error
>     parsing  XPath
>     >>'/sqlMapConfig/sqlMap'.  Cause:  
>     com.ibatis.common.xml.NodeletException:
>     >>Error parsing XML.  Cause:  org.xml.sax.SAXParseException: Attribute
>     >>"namespace" is not  declared for element "sqlMap".
>     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
>     is  not
>     >>declared for element "sqlMap".
>     >>Caused by: com.ibatis.common.xml.NodeletException: Error
>     parsing  XML.
>     >>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
>     >>declared for element "sqlMap".
>     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
>     is  not
>     >>declared for element "sqlMap".
>     >>Caused by:
>     com.ibatis.common.exception.NestedRuntimeException:  Error
>     >>parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
>     >>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>     >> org.xml.sax.SAXParseException: Attribute "namespace" is
>     not  declared
>     >>for element "sqlMap".
>     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
>     is  not
>     >>declared for element "sqlMap".
>     >>Caused by: com.ibatis.common.xml.NodeletException: Error
>     parsing  XML.
>     >>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
>     >>declared for element "sqlMap".
>     >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace"
>     is  not
>     >>declared for element "sqlMap".
>     >>
>     >>P.S. When I switched back to 2.1.5 jars, JUnit works just fine.
>     >>
>     >>-Henry
>     >>
>     >>Larry Meadors wrote:
>     >>
>     >>
>     >>
>     >>>Are you talking about the build?
>     >>>
>     >>>If so, look here:
>     >>>
>     >>>http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix
>     >>>
>     >>>You're losing me here Henry.
>     >>>
>     >>>Larry
>     >>>
>     >>>
>     >>>On 1/24/06, Henry Lu <zhlu@umich.edu <ma...@umich.edu>>
>     wrote:
>     >>>
>     >>>
>     >>>
>     >>>
>     >>>>Doesn't work with JUnit!!! 2.1.5 works.
>     >>>>
>     >>>>-Henry
>     >>>>
>     >>>>Larry Meadors wrote:
>     >>>>
>     >>>>
>     >>>>
>     >>>>
>     >>>>
>     >>>>>I am using, and have built iBATIS with jdk1.5 - unit tests
>     and all.
>     >>>>>
>     >>>>>IIRC, it was pissed about the lack of a xalan impl but once I
>     put that
>     >>>>>in devlib it was happy.
>     >>>>>
>     >>>>>Larry
>     >>>>>
>     >>>>>
>     >>>>>On 1/23/06, Henry Lu < zhlu@umich.edu
>     <ma...@umich.edu>> wrote:
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>>
>     >>>>>>I am using Junit test within the eClipse.
>     >>>>>>
>     >>>>>>-Henry
>     >>>>>>
>     >>>>>>Nathan Maves wrote:
>     >>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>>
>     >>>>>>>Your application work because java is backwards
>     compatible.  The
>     >>>>>>>build script, which includes the unit tests will not run
>     with java
>     >>>>>>>1.5.  I think there are classloader issues that require you
>     to mess
>     >>>>>>>with the dependancies.
>     >>>>>>>
>     >>>>>>>Just to reiterate there are no know issues with using
>     ibatis on Java
>     >>>>>>>1.5.  We have been using it for a while now.
>     >>>>>>>
>     >>>>>>>Nathan
>     >>>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>>Thanks for your info! Why my application works with jdk
>     1.5 and
>     >>>>>>>>JUnit doesn't with with jdk1.5?
>     >>>>>>>>
>     >>>>>>>>-Henry
>     >>>>>>>>
>     >>>>>>>>Nathan Maves wrote:
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>
>     >>>>>>>>>If you are asking about the JUnit tests for the ibatis
>     code then
>     >>>>>>>>>yes  and no :)
>     >>>>>>>>>
>     >>>>>>>>>I have tried it and it will not work.  You need to run
>     the unit
>     >>>>>>>>>tests  with 1.4.  For now the plans looks like we might
>     try to
>     >>>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on
>     this but I
>     >>>>>>>>>would be a good  thing for ibatis.
>     >>>>>>>>>
>     >>>>>>>>>Nathan
>     >>>>>>>>>
>     >>>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for
>     ibatis?
>     >>>>>>>>>>
>     >>>>>>>>>>-Henry
>     >>>>>>>>>>
>     >>>>>>>>>> AHrakou@iba.by <ma...@iba.by> wrote:
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>
>     >>>>>>>>>>>what about XML?
>     >>>>>>>>>>>
>     >>>>>>>>>>>Cause:
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
>     is not
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>declared for
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>"namespace"  is not
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>declared for element "sqlMap".
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>!!!
>     >>>>>>>>>>>Attribute "namespace" is not declared for
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>C  уважением,
>     >>>>>>>>>>>             Алексей.
>     >>>>>>>>>>>mobile: +375-029-708-2168                      email:
>     >>>>>>>>>>>horal@tut.by <ma...@tut.by>
>     >>>>>>>>>>>
>     >>>>>>>>>>>*Henry Lu < zhlu@umich.edu <ma...@umich.edu>>*
>     >>>>>>>>>>>
>     >>>>>>>>>>>23.01.2006 17:12
>     >>>>>>>>>>>Please respond to
>     >>>>>>>>>>>user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>  To
>     >>>>>>>>>>>  user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>cc
>     >>>>>>>>>>>  Subject
>     >>>>>>>>>>>  Re: junit test
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>All correct version. Because it works for the application.
>     >>>>>>>>>>>
>     >>>>>>>>>>> ibatis-common-2.jar
>     >>>>>>>>>>>ibatis-dao-2.jar
>     >>>>>>>>>>>ibatis-sqlmap-2.jar
>     >>>>>>>>>>>and spring  1.2.6
>     >>>>>>>>>>>
>     >>>>>>>>>>>AHrakou@iba.by <ma...@iba.by> wrote:
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>Check that you use the correct libraries for spring
>     and ibatis.
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>Also check your XML:
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>Cause:
>     >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
>     is not
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>declared for
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>"namespace"  is not
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>declared for element "sqlMap".
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>C  уважением,
>     >>>>>>>>>>>>             Алексей.    >
>     >>>>>>>>>>>>mobile: +375-029-708-2168                    >   email:
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>horal@tut.by <ma...@tut.by>      >
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>*Henry Lu < zhlu@umich.edu <ma...@umich.edu>>*
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>23.01.2006 16:59
>     >>>>>>>>>>>>Please respond to
>     >>>>>>>>>>>>user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>               > To
>     >>>>>>>>>>>>               user-java@ibatis.apache.org
>     <ma...@ibatis.apache.org>
>     >>>>>>>>>>>>cc
>     >>>>>>>>>>>>               > Subject
>     >>>>>>>>>>>>               junit test
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>               >
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>I go the following error when I did JUnit test:
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>setUp()----------
>     >>>>>>>>>>>>org.springframework.beans.factory.BeanCreationException
>     :  Error
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>creating
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>bean with name 'sqlMapClient' defined in file
>     >>>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>Initialization  of bean
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>failed; nested exception is
>     >>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException : Error
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>     >>>>>>>>>>>Error  parsing XML.  > Cause:
>     >>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException:
>     Error parsing
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>     >>>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing
>     XML.   Cause:
>     >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace"
>     is not
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>declared for
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>element "sqlMap".
>     >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>"namespace"  is not
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>declared for element "sqlMap".
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>However, it works when I run the application.
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>Here is code for JUNit test:
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>     org.springframework.context.ApplicationContext
>     ctx = null;
>     >>>>>>>>>>>>     String[] paths = { "/WEB-INF/test/
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>datasource_beans_test.xml",
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>
>     >>>>>>>>>>>>         "/WEB-INF/authorize-spring.xml",
>     >>>>>>>>>>>>         "/WEB-INF/spring-auth.xml",
>     >>>>>>>>>>>>         "/WEB-INF/app_beans.xml"};
>     >>>>>>>>>>>>     ctx = new FileSystemXmlApplicationContext(paths);
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>How to make JUnit works?
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>-Henry
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>>>
>     >>>>>>>
>     >>>>>>>
>     >>>>>>>
>
>

Re: ibatis 2.1.16

Posted by Clinton Begin <cl...@gmail.com>.
Henry, I can't recreate this.  Could it be something wrong with your IDE?
Try building and running your tests with Ant via the command line, just to
be sure.

I have run unit tests without issue with iBATIS 2.1.6 and 2.1.7 within
IntelliJ IDEA and from the command line with Ant.

Cheers,
Clinton

On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <!DOCTYPE sqlMap
>     PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>     "http://ibatis.apache.org/dtd/sql-map-2.dtd">
>
>
> and
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE sqlMapConfig
> PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
> "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>
>
> Once again, all web application works just fine with any ibatis and all
> my files and code. Just for JUnit testing, 2.1.6 and 2.1.7 failed.
>
> -Henry
>
>
> Larry Meadors wrote:
>
> >What DTD are you using?
> >
> >Larry
> >
> >
> >On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> >
> >
> >>There is some confusion here. All ibatis version 2.1.5,2.16.2,1.7 work
> >>fine with my web application. I am talking about JUNIT here.
> >>
> >>When I run JUnit with ibatis, all files, code are working fine for
> >>2.1.5, but failed with 2.1.6 and 2.1.7.
> >>
> >>-Henry
> >>
> >>P.S. Here is the errors:
> >>
> >>org.springframework.beans.factory.BeanCreationException: Error  creating
> >>bean with name 'sqlMapClient' defined in file [C:\devel
> >>\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  failed;
> >>nested exception is  com.ibatis.common.exception.NestedRuntimeException:
> >>Error  occurred.  Cause: com.ibatis.common.xml.NodeletException: Error
> >>parsing XML.  Cause:
> >>com.ibatis.common.exception.NestedRuntimeException: Error parsing  XPath
> >>'/sqlMapConfig/sqlMap'.  Cause:  com.ibatis.common.xml.NodeletException:
> >>Error parsing XML.  Cause:  org.xml.sax.SAXParseException: Attribute
> >>"namespace" is not  declared for element "sqlMap".
> >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> >>declared for element "sqlMap".
> >>Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.
> >>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
> >>declared for element "sqlMap".
> >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> >>declared for element "sqlMap".
> >>Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error
> >>parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> >>org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
> >>for element "sqlMap".
> >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> >>declared for element "sqlMap".
> >>Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.
> >>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
> >>declared for element "sqlMap".
> >>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> >>declared for element "sqlMap".
> >>
> >>P.S. When I switched back to 2.1.5 jars, JUnit works just fine.
> >>
> >>-Henry
> >>
> >>Larry Meadors wrote:
> >>
> >>
> >>
> >>>Are you talking about the build?
> >>>
> >>>If so, look here:
> >>>
> >>>http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix
> >>>
> >>>You're losing me here Henry.
> >>>
> >>>Larry
> >>>
> >>>
> >>>On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>Doesn't work with JUnit!!! 2.1.5 works.
> >>>>
> >>>>-Henry
> >>>>
> >>>>Larry Meadors wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
> >>>>>
> >>>>>IIRC, it was pissed about the lack of a xalan impl but once I put
> that
> >>>>>in devlib it was happy.
> >>>>>
> >>>>>Larry
> >>>>>
> >>>>>
> >>>>>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>I am using Junit test within the eClipse.
> >>>>>>
> >>>>>>-Henry
> >>>>>>
> >>>>>>Nathan Maves wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>Your application work because java is backwards compatible.  The
> >>>>>>>build script, which includes the unit tests will not run with java
> >>>>>>>1.5.  I think there are classloader issues that require you to mess
> >>>>>>>with the dependancies.
> >>>>>>>
> >>>>>>>Just to reiterate there are no know issues with using ibatis on
> Java
> >>>>>>>1.5.  We have been using it for a while now.
> >>>>>>>
> >>>>>>>Nathan
> >>>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Thanks for your info! Why my application works with jdk 1.5 and
> >>>>>>>>JUnit doesn't with with jdk1.5?
> >>>>>>>>
> >>>>>>>>-Henry
> >>>>>>>>
> >>>>>>>>Nathan Maves wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>If you are asking about the JUnit tests for the ibatis code then
> >>>>>>>>>yes  and no :)
> >>>>>>>>>
> >>>>>>>>>I have tried it and it will not work.  You need to run the unit
> >>>>>>>>>tests  with 1.4.  For now the plans looks like we might try to
> >>>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
> >>>>>>>>>would be a good  thing for ibatis.
> >>>>>>>>>
> >>>>>>>>>Nathan
> >>>>>>>>>
> >>>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
> >>>>>>>>>>
> >>>>>>>>>>-Henry
> >>>>>>>>>>
> >>>>>>>>>>AHrakou@iba.by wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>>what about XML?
> >>>>>>>>>>>
> >>>>>>>>>>>Cause:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>declared for
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>"namespace"  is not
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>!!!
> >>>>>>>>>>>Attribute "namespace" is not declared for
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>C  уважением,
> >>>>>>>>>>>             Алексей.
> >>>>>>>>>>>mobile: +375-029-708-2168                      email:
> >>>>>>>>>>>horal@tut.by
> >>>>>>>>>>>
> >>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>
> >>>>>>>>>>>23.01.2006 17:12
> >>>>>>>>>>>Please respond to
> >>>>>>>>>>>user-java@ibatis.apache.org
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>  To
> >>>>>>>>>>>  user-java@ibatis.apache.org
> >>>>>>>>>>>cc
> >>>>>>>>>>>  Subject
> >>>>>>>>>>>  Re: junit test
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>All correct version. Because it works for the application.
> >>>>>>>>>>>
> >>>>>>>>>>>ibatis-common-2.jar
> >>>>>>>>>>>ibatis-dao-2.jar
> >>>>>>>>>>>ibatis-sqlmap-2.jar
> >>>>>>>>>>>and spring  1.2.6
> >>>>>>>>>>>
> >>>>>>>>>>>AHrakou@iba.by wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>Check that you use the correct libraries for spring and
> ibatis.
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>Also check your XML:
> >>>>>>>>>>>>
> >>>>>>>>>>>>Cause:
> >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>declared for
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>"namespace"  is not
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>>>C  уважением,
> >>>>>>>>>>>>             Алексей.    >
> >>>>>>>>>>>>mobile: +375-029-708-2168                    >   email:
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>horal@tut.by      >
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>>>
> >>>>>>>>>>>>23.01.2006 16:59
> >>>>>>>>>>>>Please respond to
> >>>>>>>>>>>>user-java@ibatis.apache.org
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>               > To
> >>>>>>>>>>>>               user-java@ibatis.apache.org
> >>>>>>>>>>>>cc
> >>>>>>>>>>>>               > Subject
> >>>>>>>>>>>>               junit test
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>               >
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>I go the following error when I did JUnit test:
> >>>>>>>>>>>>
> >>>>>>>>>>>>setUp()----------
> >>>>>>>>>>>>org.springframework.beans.factory.BeanCreationException
> :  Error
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>creating
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>bean with name 'sqlMapClient' defined in file
> >>>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>Initialization  of bean
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>failed; nested exception is
> >>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> >>>>>>>>>>>Error  parsing XML.  > Cause:
> >>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
> parsing
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause:
> >>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>declared for
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>element "sqlMap".
> >>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>"namespace"  is not
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>>>
> >>>>>>>>>>>>However, it works when I run the application.
> >>>>>>>>>>>>
> >>>>>>>>>>>>Here is code for JUNit test:
> >>>>>>>>>>>>
> >>>>>>>>>>>>     org.springframework.context.ApplicationContext ctx =
> null;
> >>>>>>>>>>>>     String[] paths = { "/WEB-INF/test/
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>datasource_beans_test.xml",
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>         "/WEB-INF/authorize-spring.xml",
> >>>>>>>>>>>>         "/WEB-INF/spring-auth.xml",
> >>>>>>>>>>>>         "/WEB-INF/app_beans.xml"};
> >>>>>>>>>>>>     ctx = new FileSystemXmlApplicationContext(paths);
> >>>>>>>>>>>>
> >>>>>>>>>>>>How to make JUnit works?
> >>>>>>>>>>>>
> >>>>>>>>>>>>-Henry
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
>

Re: ibatis 2.1.16

Posted by Henry Lu <zh...@umich.edu>.
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE sqlMap
    PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
    "http://ibatis.apache.org/dtd/sql-map-2.dtd">


and

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


Once again, all web application works just fine with any ibatis and all 
my files and code. Just for JUnit testing, 2.1.6 and 2.1.7 failed.

-Henry


Larry Meadors wrote:

>What DTD are you using?
>
>Larry
>
>
>On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
>  
>
>>There is some confusion here. All ibatis version 2.1.5,2.16.2,1.7 work
>>fine with my web application. I am talking about JUNIT here.
>>
>>When I run JUnit with ibatis, all files, code are working fine for
>>2.1.5, but failed with 2.1.6 and 2.1.7.
>>
>>-Henry
>>
>>P.S. Here is the errors:
>>
>>org.springframework.beans.factory.BeanCreationException: Error  creating
>>bean with name 'sqlMapClient' defined in file [C:\devel
>>\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  failed;
>>nested exception is  com.ibatis.common.exception.NestedRuntimeException:
>>Error  occurred.  Cause: com.ibatis.common.xml.NodeletException: Error
>>parsing XML.  Cause:
>>com.ibatis.common.exception.NestedRuntimeException: Error parsing  XPath
>>'/sqlMapConfig/sqlMap'.  Cause:  com.ibatis.common.xml.NodeletException:
>>Error parsing XML.  Cause:  org.xml.sax.SAXParseException: Attribute
>>"namespace" is not  declared for element "sqlMap".
>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
>>declared for element "sqlMap".
>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.
>>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
>>declared for element "sqlMap".
>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
>>declared for element "sqlMap".
>>Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error
>>parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
>>com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>>org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
>>for element "sqlMap".
>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
>>declared for element "sqlMap".
>>Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.
>>Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
>>declared for element "sqlMap".
>>Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
>>declared for element "sqlMap".
>>
>>P.S. When I switched back to 2.1.5 jars, JUnit works just fine.
>>
>>-Henry
>>
>>Larry Meadors wrote:
>>
>>    
>>
>>>Are you talking about the build?
>>>
>>>If so, look here:
>>>
>>>http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix
>>>
>>>You're losing me here Henry.
>>>
>>>Larry
>>>
>>>
>>>On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
>>>
>>>
>>>      
>>>
>>>>Doesn't work with JUnit!!! 2.1.5 works.
>>>>
>>>>-Henry
>>>>
>>>>Larry Meadors wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>>>
>>>>>IIRC, it was pissed about the lack of a xalan impl but once I put that
>>>>>in devlib it was happy.
>>>>>
>>>>>Larry
>>>>>
>>>>>
>>>>>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>I am using Junit test within the eClipse.
>>>>>>
>>>>>>-Henry
>>>>>>
>>>>>>Nathan Maves wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Your application work because java is backwards compatible.  The
>>>>>>>build script, which includes the unit tests will not run with java
>>>>>>>1.5.  I think there are classloader issues that require you to mess
>>>>>>>with the dependancies.
>>>>>>>
>>>>>>>Just to reiterate there are no know issues with using ibatis on Java
>>>>>>>1.5.  We have been using it for a while now.
>>>>>>>
>>>>>>>Nathan
>>>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>Thanks for your info! Why my application works with jdk 1.5 and
>>>>>>>>JUnit doesn't with with jdk1.5?
>>>>>>>>
>>>>>>>>-Henry
>>>>>>>>
>>>>>>>>Nathan Maves wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>>>If you are asking about the JUnit tests for the ibatis code then
>>>>>>>>>yes  and no :)
>>>>>>>>>
>>>>>>>>>I have tried it and it will not work.  You need to run the unit
>>>>>>>>>tests  with 1.4.  For now the plans looks like we might try to
>>>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>>>>>would be a good  thing for ibatis.
>>>>>>>>>
>>>>>>>>>Nathan
>>>>>>>>>
>>>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>>>>>
>>>>>>>>>>-Henry
>>>>>>>>>>
>>>>>>>>>>AHrakou@iba.by wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>>>what about XML?
>>>>>>>>>>>
>>>>>>>>>>>Cause:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>declared for
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>"namespace"  is not
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>!!!
>>>>>>>>>>>Attribute "namespace" is not declared for
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>C  уважением,
>>>>>>>>>>>             Алексей.
>>>>>>>>>>>mobile: +375-029-708-2168                      email:
>>>>>>>>>>>horal@tut.by
>>>>>>>>>>>
>>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>
>>>>>>>>>>>23.01.2006 17:12
>>>>>>>>>>>Please respond to
>>>>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>  To
>>>>>>>>>>>  user-java@ibatis.apache.org
>>>>>>>>>>>cc
>>>>>>>>>>>  Subject
>>>>>>>>>>>  Re: junit test
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>All correct version. Because it works for the application.
>>>>>>>>>>>
>>>>>>>>>>>ibatis-common-2.jar
>>>>>>>>>>>ibatis-dao-2.jar
>>>>>>>>>>>ibatis-sqlmap-2.jar
>>>>>>>>>>>and spring  1.2.6
>>>>>>>>>>>
>>>>>>>>>>>AHrakou@iba.by wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>Check that you use the correct libraries for spring and ibatis.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>Also check your XML:
>>>>>>>>>>>>
>>>>>>>>>>>>Cause:
>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>declared for
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>"namespace"  is not
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>>>C  уважением,
>>>>>>>>>>>>             Алексей.    >
>>>>>>>>>>>>mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>horal@tut.by      >
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>>>>>
>>>>>>>>>>>>23.01.2006 16:59
>>>>>>>>>>>>Please respond to
>>>>>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>               > To
>>>>>>>>>>>>               user-java@ibatis.apache.org
>>>>>>>>>>>>cc
>>>>>>>>>>>>               > Subject
>>>>>>>>>>>>               junit test
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>               >
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>I go the following error when I did JUnit test:
>>>>>>>>>>>>
>>>>>>>>>>>>setUp()----------
>>>>>>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>creating
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>bean with name 'sqlMapClient' defined in file
>>>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>Initialization  of bean
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>failed; nested exception is
>>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>>>>Error  parsing XML.  > Cause:
>>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
>>>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>declared for
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>element "sqlMap".
>>>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>"namespace"  is not
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>>>
>>>>>>>>>>>>However, it works when I run the application.
>>>>>>>>>>>>
>>>>>>>>>>>>Here is code for JUNit test:
>>>>>>>>>>>>
>>>>>>>>>>>>     org.springframework.context.ApplicationContext ctx = null;
>>>>>>>>>>>>     String[] paths = { "/WEB-INF/test/
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>>>datasource_beans_test.xml",
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>                      
>>>>>>>>>>>
>>>>>>>>>>>>         "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>>>         "/WEB-INF/spring-auth.xml",
>>>>>>>>>>>>         "/WEB-INF/app_beans.xml"};
>>>>>>>>>>>>     ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>>>
>>>>>>>>>>>>How to make JUnit works?
>>>>>>>>>>>>
>>>>>>>>>>>>-Henry
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>                        
>>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>

Re: ibatis 2.1.16

Posted by Larry Meadors <lm...@apache.org>.
What DTD are you using?

Larry


On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> There is some confusion here. All ibatis version 2.1.5,2.16.2,1.7 work
> fine with my web application. I am talking about JUNIT here.
>
> When I run JUnit with ibatis, all files, code are working fine for
> 2.1.5, but failed with 2.1.6 and 2.1.7.
>
> -Henry
>
> P.S. Here is the errors:
>
> org.springframework.beans.factory.BeanCreationException: Error  creating
> bean with name 'sqlMapClient' defined in file [C:\devel
> \webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  failed;
> nested exception is  com.ibatis.common.exception.NestedRuntimeException:
> Error  occurred.  Cause: com.ibatis.common.xml.NodeletException: Error
> parsing XML.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error parsing  XPath
> '/sqlMapConfig/sqlMap'.  Cause:  com.ibatis.common.xml.NodeletException:
> Error parsing XML.  Cause:  org.xml.sax.SAXParseException: Attribute
> "namespace" is not  declared for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> declared for element "sqlMap".
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.
> Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
> declared for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> declared for element "sqlMap".
> Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error
> parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> org.xml.sax.SAXParseException: Attribute "namespace" is not  declared
> for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> declared for element "sqlMap".
> Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.
> Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not
> declared for element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not
> declared for element "sqlMap".
>
> P.S. When I switched back to 2.1.5 jars, JUnit works just fine.
>
> -Henry
>
> Larry Meadors wrote:
>
> >Are you talking about the build?
> >
> >If so, look here:
> >
> >http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix
> >
> >You're losing me here Henry.
> >
> >Larry
> >
> >
> >On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> >
> >
> >>Doesn't work with JUnit!!! 2.1.5 works.
> >>
> >>-Henry
> >>
> >>Larry Meadors wrote:
> >>
> >>
> >>
> >>>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
> >>>
> >>>IIRC, it was pissed about the lack of a xalan impl but once I put that
> >>>in devlib it was happy.
> >>>
> >>>Larry
> >>>
> >>>
> >>>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>I am using Junit test within the eClipse.
> >>>>
> >>>>-Henry
> >>>>
> >>>>Nathan Maves wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>Your application work because java is backwards compatible.  The
> >>>>>build script, which includes the unit tests will not run with java
> >>>>>1.5.  I think there are classloader issues that require you to mess
> >>>>>with the dependancies.
> >>>>>
> >>>>>Just to reiterate there are no know issues with using ibatis on Java
> >>>>>1.5.  We have been using it for a while now.
> >>>>>
> >>>>>Nathan
> >>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Thanks for your info! Why my application works with jdk 1.5 and
> >>>>>>JUnit doesn't with with jdk1.5?
> >>>>>>
> >>>>>>-Henry
> >>>>>>
> >>>>>>Nathan Maves wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>If you are asking about the JUnit tests for the ibatis code then
> >>>>>>>yes  and no :)
> >>>>>>>
> >>>>>>>I have tried it and it will not work.  You need to run the unit
> >>>>>>>tests  with 1.4.  For now the plans looks like we might try to
> >>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
> >>>>>>>would be a good  thing for ibatis.
> >>>>>>>
> >>>>>>>Nathan
> >>>>>>>
> >>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
> >>>>>>>>
> >>>>>>>>-Henry
> >>>>>>>>
> >>>>>>>>AHrakou@iba.by wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>what about XML?
> >>>>>>>>>
> >>>>>>>>>Cause:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>declared for
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>element "sqlMap".
> >>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>"namespace"  is not
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>!!!
> >>>>>>>>>Attribute "namespace" is not declared for
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>element "sqlMap".
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>C  уважением,
> >>>>>>>>>              Алексей.
> >>>>>>>>> mobile: +375-029-708-2168                      email:
> >>>>>>>>>horal@tut.by
> >>>>>>>>>
> >>>>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>>>
> >>>>>>>>>23.01.2006 17:12
> >>>>>>>>>Please respond to
> >>>>>>>>>user-java@ibatis.apache.org
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>   To
> >>>>>>>>>   user-java@ibatis.apache.org
> >>>>>>>>>cc
> >>>>>>>>>   Subject
> >>>>>>>>>   Re: junit test
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>All correct version. Because it works for the application.
> >>>>>>>>>
> >>>>>>>>>ibatis-common-2.jar
> >>>>>>>>>ibatis-dao-2.jar
> >>>>>>>>>ibatis-sqlmap-2.jar
> >>>>>>>>>and spring  1.2.6
> >>>>>>>>>
> >>>>>>>>>AHrakou@iba.by wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>Check that you use the correct libraries for spring and ibatis.
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>Also check your XML:
> >>>>>>>>>>
> >>>>>>>>>>Cause:
> >>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>declared for
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>element "sqlMap".
> >>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>"namespace"  is not
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>
> >>>>>>>>>>C  уважением,
> >>>>>>>>>>              Алексей.    >
> >>>>>>>>>> mobile: +375-029-708-2168                    >   email:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>horal@tut.by      >
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>>>>
> >>>>>>>>>>23.01.2006 16:59
> >>>>>>>>>>Please respond to
> >>>>>>>>>>user-java@ibatis.apache.org
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>                > To
> >>>>>>>>>>                user-java@ibatis.apache.org
> >>>>>>>>>>cc
> >>>>>>>>>>                > Subject
> >>>>>>>>>>                junit test
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>                >
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>I go the following error when I did JUnit test:
> >>>>>>>>>>
> >>>>>>>>>>setUp()----------
> >>>>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>creating
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>bean with name 'sqlMapClient' defined in file
> >>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>Initialization  of bean
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>failed; nested exception is
> >>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> >>>>>>>>>Error  parsing XML.  > Cause:
> >>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
> >>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>declared for
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>element "sqlMap".
> >>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>"namespace"  is not
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>declared for element "sqlMap".
> >>>>>>>>>>
> >>>>>>>>>>However, it works when I run the application.
> >>>>>>>>>>
> >>>>>>>>>>Here is code for JUNit test:
> >>>>>>>>>>
> >>>>>>>>>>      org.springframework.context.ApplicationContext ctx = null;
> >>>>>>>>>>      String[] paths = { "/WEB-INF/test/
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>datasource_beans_test.xml",
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>          "/WEB-INF/authorize-spring.xml",
> >>>>>>>>>>          "/WEB-INF/spring-auth.xml",
> >>>>>>>>>>          "/WEB-INF/app_beans.xml"};
> >>>>>>>>>>      ctx = new FileSystemXmlApplicationContext(paths);
> >>>>>>>>>>
> >>>>>>>>>>How to make JUnit works?
> >>>>>>>>>>
> >>>>>>>>>>-Henry
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>>>
> >>>>>
>

Re: ibatis 2.1.16

Posted by Henry Lu <zh...@umich.edu>.
There is some confusion here. All ibatis version 2.1.5,2.16.2,1.7 work 
fine with my web application. I am talking about JUNIT here.

When I run JUnit with ibatis, all files, code are working fine for 
2.1.5, but failed with 2.1.6 and 2.1.7.

-Henry

P.S. Here is the errors:

org.springframework.beans.factory.BeanCreationException: Error  creating 
bean with name 'sqlMapClient' defined in file [C:\devel 
\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean  failed; 
nested exception is  com.ibatis.common.exception.NestedRuntimeException: 
Error  occurred.  Cause: com.ibatis.common.xml.NodeletException: Error  
parsing XML.  Cause:  
com.ibatis.common.exception.NestedRuntimeException: Error parsing  XPath 
'/sqlMapConfig/sqlMap'.  Cause:  com.ibatis.common.xml.NodeletException: 
Error parsing XML.  Cause:  org.xml.sax.SAXParseException: Attribute 
"namespace" is not  declared for element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not 
declared for element "sqlMap".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.  
Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not 
declared for element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not 
declared for element "sqlMap".
Caused by: com.ibatis.common.exception.NestedRuntimeException:  Error 
parsing XPath '/sqlMapConfig/sqlMap'.  Cause:  
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:  
org.xml.sax.SAXParseException: Attribute "namespace" is not  declared 
for element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not 
declared for element "sqlMap".
Caused by: com.ibatis.common.xml.NodeletException: Error parsing  XML.  
Cause: org.xml.sax.SAXParseException: Attribute "namespace"  is not 
declared for element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is  not 
declared for element "sqlMap".

P.S. When I switched back to 2.1.5 jars, JUnit works just fine.

-Henry

Larry Meadors wrote:

>Are you talking about the build?
>
>If so, look here:
>
>http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix
>
>You're losing me here Henry.
>
>Larry
>
>
>On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
>  
>
>>Doesn't work with JUnit!!! 2.1.5 works.
>>
>>-Henry
>>
>>Larry Meadors wrote:
>>
>>    
>>
>>>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>>>
>>>IIRC, it was pissed about the lack of a xalan impl but once I put that
>>>in devlib it was happy.
>>>
>>>Larry
>>>
>>>
>>>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>>>
>>>
>>>      
>>>
>>>>I am using Junit test within the eClipse.
>>>>
>>>>-Henry
>>>>
>>>>Nathan Maves wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>Your application work because java is backwards compatible.  The
>>>>>build script, which includes the unit tests will not run with java
>>>>>1.5.  I think there are classloader issues that require you to mess
>>>>>with the dependancies.
>>>>>
>>>>>Just to reiterate there are no know issues with using ibatis on Java
>>>>>1.5.  We have been using it for a while now.
>>>>>
>>>>>Nathan
>>>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>Thanks for your info! Why my application works with jdk 1.5 and
>>>>>>JUnit doesn't with with jdk1.5?
>>>>>>
>>>>>>-Henry
>>>>>>
>>>>>>Nathan Maves wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>If you are asking about the JUnit tests for the ibatis code then
>>>>>>>yes  and no :)
>>>>>>>
>>>>>>>I have tried it and it will not work.  You need to run the unit
>>>>>>>tests  with 1.4.  For now the plans looks like we might try to
>>>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>>>would be a good  thing for ibatis.
>>>>>>>
>>>>>>>Nathan
>>>>>>>
>>>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>>>
>>>>>>>>-Henry
>>>>>>>>
>>>>>>>>AHrakou@iba.by wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>>>what about XML?
>>>>>>>>>
>>>>>>>>>Cause:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>declared for
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>element "sqlMap".
>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>"namespace"  is not
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>!!!
>>>>>>>>>Attribute "namespace" is not declared for
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>element "sqlMap".
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>C  уважением,
>>>>>>>>>              Алексей.
>>>>>>>>> mobile: +375-029-708-2168                      email:
>>>>>>>>>horal@tut.by
>>>>>>>>>
>>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>>
>>>>>>>>>23.01.2006 17:12
>>>>>>>>>Please respond to
>>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>   To
>>>>>>>>>   user-java@ibatis.apache.org
>>>>>>>>>cc
>>>>>>>>>   Subject
>>>>>>>>>   Re: junit test
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>All correct version. Because it works for the application.
>>>>>>>>>
>>>>>>>>>ibatis-common-2.jar
>>>>>>>>>ibatis-dao-2.jar
>>>>>>>>>ibatis-sqlmap-2.jar
>>>>>>>>>and spring  1.2.6
>>>>>>>>>
>>>>>>>>>AHrakou@iba.by wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>Check that you use the correct libraries for spring and ibatis.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Also check your XML:
>>>>>>>>>>
>>>>>>>>>>Cause:
>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>declared for
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>element "sqlMap".
>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>"namespace"  is not
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>
>>>>>>>>>>C  уважением,
>>>>>>>>>>              Алексей.    >
>>>>>>>>>> mobile: +375-029-708-2168                    >   email:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>horal@tut.by      >
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>>>
>>>>>>>>>>23.01.2006 16:59
>>>>>>>>>>Please respond to
>>>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                > To
>>>>>>>>>>                user-java@ibatis.apache.org
>>>>>>>>>>cc
>>>>>>>>>>                > Subject
>>>>>>>>>>                junit test
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                >
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>I go the following error when I did JUnit test:
>>>>>>>>>>
>>>>>>>>>>setUp()----------
>>>>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>creating
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>bean with name 'sqlMapClient' defined in file
>>>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>Initialization  of bean
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>failed; nested exception is
>>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>>>Error  parsing XML.  > Cause:
>>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
>>>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>declared for
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>element "sqlMap".
>>>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>"namespace"  is not
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>declared for element "sqlMap".
>>>>>>>>>>
>>>>>>>>>>However, it works when I run the application.
>>>>>>>>>>
>>>>>>>>>>Here is code for JUNit test:
>>>>>>>>>>
>>>>>>>>>>      org.springframework.context.ApplicationContext ctx = null;
>>>>>>>>>>      String[] paths = { "/WEB-INF/test/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>>datasource_beans_test.xml",
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>          "/WEB-INF/authorize-spring.xml",
>>>>>>>>>>          "/WEB-INF/spring-auth.xml",
>>>>>>>>>>          "/WEB-INF/app_beans.xml"};
>>>>>>>>>>      ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>>>
>>>>>>>>>>How to make JUnit works?
>>>>>>>>>>
>>>>>>>>>>-Henry
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>
>>>>>          
>>>>>

Re: ibatis 2.1.16

Posted by Larry Meadors <lm...@apache.org>.
Are you talking about the build?

If so, look here:

http://opensource2.atlassian.com/confluence/oss/display/IBATIS/unix

You're losing me here Henry.

Larry


On 1/24/06, Henry Lu <zh...@umich.edu> wrote:
> Doesn't work with JUnit!!! 2.1.5 works.
>
> -Henry
>
> Larry Meadors wrote:
>
> >I am using, and have built iBATIS with jdk1.5 - unit tests and all.
> >
> >IIRC, it was pissed about the lack of a xalan impl but once I put that
> >in devlib it was happy.
> >
> >Larry
> >
> >
> >On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> >
> >
> >>I am using Junit test within the eClipse.
> >>
> >>-Henry
> >>
> >>Nathan Maves wrote:
> >>
> >>
> >>
> >>>Your application work because java is backwards compatible.  The
> >>>build script, which includes the unit tests will not run with java
> >>>1.5.  I think there are classloader issues that require you to mess
> >>>with the dependancies.
> >>>
> >>>Just to reiterate there are no know issues with using ibatis on Java
> >>>1.5.  We have been using it for a while now.
> >>>
> >>>Nathan
> >>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >>>
> >>>
> >>>
> >>>>Thanks for your info! Why my application works with jdk 1.5 and
> >>>>JUnit doesn't with with jdk1.5?
> >>>>
> >>>>-Henry
> >>>>
> >>>>Nathan Maves wrote:
> >>>>
> >>>>
> >>>>
> >>>>>If you are asking about the JUnit tests for the ibatis code then
> >>>>>yes  and no :)
> >>>>>
> >>>>>I have tried it and it will not work.  You need to run the unit
> >>>>>tests  with 1.4.  For now the plans looks like we might try to
> >>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
> >>>>>would be a good  thing for ibatis.
> >>>>>
> >>>>>Nathan
> >>>>>
> >>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
> >>>>>>
> >>>>>>-Henry
> >>>>>>
> >>>>>>AHrakou@iba.by wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>what about XML?
> >>>>>>>
> >>>>>>> Cause:
> >>>>>>>
> >>>>>>>
> >>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>
> >>>>>>>>
> >>>>>>>declared for
> >>>>>>>
> >>>>>>>
> >>>>>>>>element "sqlMap".
> >>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>
> >>>>>>>>
> >>>>>>>"namespace"  is not
> >>>>>>>
> >>>>>>>
> >>>>>>>>declared for element "sqlMap".
> >>>>>>>>
> >>>>>>>>
> >>>>>>>!!!
> >>>>>>>Attribute "namespace" is not declared for
> >>>>>>>
> >>>>>>>
> >>>>>>>>element "sqlMap".
> >>>>>>>>
> >>>>>>>>
> >>>>>>> C  уважением,
> >>>>>>>               Алексей.
> >>>>>>>  mobile: +375-029-708-2168                      email:
> >>>>>>>horal@tut.by
> >>>>>>>
> >>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>
> >>>>>>>23.01.2006 17:12
> >>>>>>>Please respond to
> >>>>>>>user-java@ibatis.apache.org
> >>>>>>>
> >>>>>>>
> >>>>>>>    To
> >>>>>>>    user-java@ibatis.apache.org
> >>>>>>>cc
> >>>>>>>    Subject
> >>>>>>>    Re: junit test
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>All correct version. Because it works for the application.
> >>>>>>>
> >>>>>>>ibatis-common-2.jar
> >>>>>>>ibatis-dao-2.jar
> >>>>>>>ibatis-sqlmap-2.jar
> >>>>>>>and spring  1.2.6
> >>>>>>>
> >>>>>>>AHrakou@iba.by wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Check that you use the correct libraries for spring and ibatis.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>Also check your XML:
> >>>>>>>>
> >>>>>>>>Cause:
> >>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>
> >>>>>>>>
> >>>>>>>declared for
> >>>>>>>
> >>>>>>>
> >>>>>>>>element "sqlMap".
> >>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>
> >>>>>>>>
> >>>>>>>"namespace"  is not
> >>>>>>>
> >>>>>>>
> >>>>>>>>declared for element "sqlMap".
> >>>>>>>>
> >>>>>>>> C  уважением,
> >>>>>>>>               Алексей.    >
> >>>>>>>>  mobile: +375-029-708-2168                    >   email:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>horal@tut.by      >
> >>>>>>>
> >>>>>>>
> >>>>>>>>*Henry Lu <zh...@umich.edu>*
> >>>>>>>>
> >>>>>>>>23.01.2006 16:59
> >>>>>>>>Please respond to
> >>>>>>>>user-java@ibatis.apache.org
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>                 > To
> >>>>>>>>                 user-java@ibatis.apache.org
> >>>>>>>>cc
> >>>>>>>>                 > Subject
> >>>>>>>>                 junit test
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>                 >
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>I go the following error when I did JUnit test:
> >>>>>>>>
> >>>>>>>>setUp()----------
> >>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
> >>>>>>>>
> >>>>>>>>
> >>>>>>>creating
> >>>>>>>
> >>>>>>>
> >>>>>>>>bean with name 'sqlMapClient' defined in file
> >>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>Initialization  of bean
> >>>>>>>
> >>>>>>>
> >>>>>>>>failed; nested exception is
> >>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>>>>>
> >>>>>>>>
> >>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> >>>>>>>Error  parsing XML.  > Cause:
> >>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
> >>>>>>>
> >>>>>>>
> >>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
> >>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>>>>>
> >>>>>>>>
> >>>>>>>declared for
> >>>>>>>
> >>>>>>>
> >>>>>>>>element "sqlMap".
> >>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>>>>>
> >>>>>>>>
> >>>>>>>"namespace"  is not
> >>>>>>>
> >>>>>>>
> >>>>>>>>declared for element "sqlMap".
> >>>>>>>>
> >>>>>>>>However, it works when I run the application.
> >>>>>>>>
> >>>>>>>>Here is code for JUNit test:
> >>>>>>>>
> >>>>>>>>       org.springframework.context.ApplicationContext ctx = null;
> >>>>>>>>       String[] paths = { "/WEB-INF/test/
> >>>>>>>>
> >>>>>>>>
> >>>>>>>datasource_beans_test.xml",
> >>>>>>>
> >>>>>>>
> >>>>>>>>           "/WEB-INF/authorize-spring.xml",
> >>>>>>>>           "/WEB-INF/spring-auth.xml",
> >>>>>>>>           "/WEB-INF/app_beans.xml"};
> >>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
> >>>>>>>>
> >>>>>>>>How to make JUnit works?
> >>>>>>>>
> >>>>>>>>-Henry
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >>>
>

ibatis 2.1.16

Posted by Henry Lu <zh...@umich.edu>.
Doesn't work with JUnit!!! 2.1.5 works.

-Henry

Larry Meadors wrote:

>I am using, and have built iBATIS with jdk1.5 - unit tests and all.
>
>IIRC, it was pissed about the lack of a xalan impl but once I put that
>in devlib it was happy.
>
>Larry
>
>
>On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
>  
>
>>I am using Junit test within the eClipse.
>>
>>-Henry
>>
>>Nathan Maves wrote:
>>
>>    
>>
>>>Your application work because java is backwards compatible.  The
>>>build script, which includes the unit tests will not run with java
>>>1.5.  I think there are classloader issues that require you to mess
>>>with the dependancies.
>>>
>>>Just to reiterate there are no know issues with using ibatis on Java
>>>1.5.  We have been using it for a while now.
>>>
>>>Nathan
>>>On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>>>
>>>      
>>>
>>>>Thanks for your info! Why my application works with jdk 1.5 and
>>>>JUnit doesn't with with jdk1.5?
>>>>
>>>>-Henry
>>>>
>>>>Nathan Maves wrote:
>>>>
>>>>        
>>>>
>>>>>If you are asking about the JUnit tests for the ibatis code then
>>>>>yes  and no :)
>>>>>
>>>>>I have tried it and it will not work.  You need to run the unit
>>>>>tests  with 1.4.  For now the plans looks like we might try to
>>>>>migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
>>>>>would be a good  thing for ibatis.
>>>>>
>>>>>Nathan
>>>>>
>>>>>On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>>>
>>>>>          
>>>>>
>>>>>>Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>>>
>>>>>>-Henry
>>>>>>
>>>>>>AHrakou@iba.by wrote:
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>what about XML?
>>>>>>>
>>>>>>> Cause:
>>>>>>>              
>>>>>>>
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>                
>>>>>>>>
>>>>>>>!!!
>>>>>>>Attribute "namespace" is not declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>                
>>>>>>>>
>>>>>>> C  уважением,
>>>>>>>               Алексей.
>>>>>>>  mobile: +375-029-708-2168                      email:
>>>>>>>horal@tut.by
>>>>>>>
>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>
>>>>>>>23.01.2006 17:12
>>>>>>>Please respond to
>>>>>>>user-java@ibatis.apache.org
>>>>>>>
>>>>>>>
>>>>>>>    To
>>>>>>>    user-java@ibatis.apache.org
>>>>>>>cc
>>>>>>>    Subject
>>>>>>>    Re: junit test
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>All correct version. Because it works for the application.
>>>>>>>
>>>>>>>ibatis-common-2.jar
>>>>>>>ibatis-dao-2.jar
>>>>>>>ibatis-sqlmap-2.jar
>>>>>>>and spring  1.2.6
>>>>>>>
>>>>>>>AHrakou@iba.by wrote:
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>Check that you use the correct libraries for spring and ibatis.
>>>>>>>>
>>>>>>>>
>>>>>>>>Also check your XML:
>>>>>>>>
>>>>>>>>Cause:
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>
>>>>>>>> C  уважением,
>>>>>>>>               Алексей.    >
>>>>>>>>  mobile: +375-029-708-2168                    >   email:
>>>>>>>>                
>>>>>>>>
>>>>>>>horal@tut.by      >
>>>>>>>              
>>>>>>>
>>>>>>>>*Henry Lu <zh...@umich.edu>*
>>>>>>>>
>>>>>>>>23.01.2006 16:59
>>>>>>>>Please respond to
>>>>>>>>user-java@ibatis.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>                 > To
>>>>>>>>                 user-java@ibatis.apache.org
>>>>>>>>cc
>>>>>>>>                 > Subject
>>>>>>>>                 junit test
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 >
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>I go the following error when I did JUnit test:
>>>>>>>>
>>>>>>>>setUp()----------
>>>>>>>>org.springframework.beans.factory.BeanCreationException:  Error
>>>>>>>>                
>>>>>>>>
>>>>>>>creating
>>>>>>>              
>>>>>>>
>>>>>>>>bean with name 'sqlMapClient' defined in file
>>>>>>>>[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
>>>>>>>>                
>>>>>>>>
>>>>>>>Initialization  of bean
>>>>>>>              
>>>>>>>
>>>>>>>>failed; nested exception is
>>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error
>>>>>>>>                
>>>>>>>>
>>>>>>>occurred.  > Cause: com.ibatis.common.xml.NodeletException:
>>>>>>>Error  parsing XML.  > Cause:
>>>>>>>com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>>>>>>              
>>>>>>>
>>>>>>>>XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>>>>>com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
>>>>>>>>org.xml.sax.SAXParseException: Attribute "namespace" is not
>>>>>>>>                
>>>>>>>>
>>>>>>>declared for
>>>>>>>              
>>>>>>>
>>>>>>>>element "sqlMap".
>>>>>>>>Caused by: org.xml.sax.SAXParseException: Attribute
>>>>>>>>                
>>>>>>>>
>>>>>>>"namespace"  is not
>>>>>>>              
>>>>>>>
>>>>>>>>declared for element "sqlMap".
>>>>>>>>
>>>>>>>>However, it works when I run the application.
>>>>>>>>
>>>>>>>>Here is code for JUNit test:
>>>>>>>>
>>>>>>>>       org.springframework.context.ApplicationContext ctx = null;
>>>>>>>>       String[] paths = { "/WEB-INF/test/
>>>>>>>>                
>>>>>>>>
>>>>>>>datasource_beans_test.xml",
>>>>>>>              
>>>>>>>
>>>>>>>>           "/WEB-INF/authorize-spring.xml",
>>>>>>>>           "/WEB-INF/spring-auth.xml",
>>>>>>>>           "/WEB-INF/app_beans.xml"};
>>>>>>>>       ctx = new FileSystemXmlApplicationContext(paths);
>>>>>>>>
>>>>>>>>How to make JUnit works?
>>>>>>>>
>>>>>>>>-Henry
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>
>>>>>          
>>>>>
>>>
>>>      
>>>

Re: junit test

Posted by Larry Meadors <lm...@apache.org>.
I am using, and have built iBATIS with jdk1.5 - unit tests and all.

IIRC, it was pissed about the lack of a xalan impl but once I put that
in devlib it was happy.

Larry


On 1/23/06, Henry Lu <zh...@umich.edu> wrote:
> I am using Junit test within the eClipse.
>
> -Henry
>
> Nathan Maves wrote:
>
> > Your application work because java is backwards compatible.  The
> > build script, which includes the unit tests will not run with java
> > 1.5.  I think there are classloader issues that require you to mess
> > with the dependancies.
> >
> > Just to reiterate there are no know issues with using ibatis on Java
> > 1.5.  We have been using it for a while now.
> >
> > Nathan
> > On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
> >
> >> Thanks for your info! Why my application works with jdk 1.5 and
> >> JUnit doesn't with with jdk1.5?
> >>
> >> -Henry
> >>
> >> Nathan Maves wrote:
> >>
> >>> If you are asking about the JUnit tests for the ibatis code then
> >>> yes  and no :)
> >>>
> >>> I have tried it and it will not work.  You need to run the unit
> >>> tests  with 1.4.  For now the plans looks like we might try to
> >>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I
> >>> would be a good  thing for ibatis.
> >>>
> >>> Nathan
> >>>
> >>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
> >>>
> >>>> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
> >>>>
> >>>> -Henry
> >>>>
> >>>> AHrakou@iba.by wrote:
> >>>>
> >>>>>
> >>>>> what about XML?
> >>>>>
> >>>>>  Cause:
> >>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>> declared for
> >>>>> > element "sqlMap".
> >>>>> > Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>> "namespace"  is not
> >>>>> > declared for element "sqlMap".
> >>>>>
> >>>>> !!!
> >>>>> Attribute "namespace" is not declared for
> >>>>> > element "sqlMap".
> >>>>>
> >>>>>  C  уважением,
> >>>>>                Алексей.
> >>>>>   mobile: +375-029-708-2168                      email:
> >>>>> horal@tut.by
> >>>>>
> >>>>> *Henry Lu <zh...@umich.edu>*
> >>>>>
> >>>>> 23.01.2006 17:12
> >>>>> Please respond to
> >>>>> user-java@ibatis.apache.org
> >>>>>
> >>>>>
> >>>>>     To
> >>>>>     user-java@ibatis.apache.org
> >>>>> cc
> >>>>>     Subject
> >>>>>     Re: junit test
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> All correct version. Because it works for the application.
> >>>>>
> >>>>> ibatis-common-2.jar
> >>>>> ibatis-dao-2.jar
> >>>>> ibatis-sqlmap-2.jar
> >>>>> and spring  1.2.6
> >>>>>
> >>>>> AHrakou@iba.by wrote:
> >>>>>
> >>>>> >
> >>>>> > Check that you use the correct libraries for spring and ibatis.
> >>>>> >
> >>>>> >
> >>>>> > Also check your XML:
> >>>>> >
> >>>>> > Cause:
> >>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>> declared for
> >>>>> > element "sqlMap".
> >>>>> > Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>> "namespace"  is not
> >>>>> > declared for element "sqlMap".
> >>>>> >
> >>>>> >  C  уважением,
> >>>>> >                Алексей.    >
> >>>>> >   mobile: +375-029-708-2168                    >   email:
> >>>>> horal@tut.by      >
> >>>>> >
> >>>>> > *Henry Lu <zh...@umich.edu>*
> >>>>> >
> >>>>> > 23.01.2006 16:59
> >>>>> > Please respond to
> >>>>> > user-java@ibatis.apache.org
> >>>>> >
> >>>>> >
> >>>>> >                  > To
> >>>>> >                  user-java@ibatis.apache.org
> >>>>> > cc
> >>>>> >                  > Subject
> >>>>> >                  junit test
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> >                  >
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> >
> >>>>> > I go the following error when I did JUnit test:
> >>>>> >
> >>>>> > setUp()----------
> >>>>> > org.springframework.beans.factory.BeanCreationException:  Error
> >>>>> creating
> >>>>> > bean with name 'sqlMapClient' defined in file
> >>>>> > [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:
> >>>>> Initialization  of bean
> >>>>> > failed; nested exception is
> >>>>> > com.ibatis.common.exception.NestedRuntimeException: Error
> >>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:
> >>>>> Error  parsing XML.  > Cause:
> >>>>> com.ibatis.common.exception.NestedRuntimeException: Error parsing
> >>>>> > XPath '/sqlMapConfig/sqlMap'.  Cause:
> >>>>> > com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
> >>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not
> >>>>> declared for
> >>>>> > element "sqlMap".
> >>>>> > Caused by: org.xml.sax.SAXParseException: Attribute
> >>>>> "namespace"  is not
> >>>>> > declared for element "sqlMap".
> >>>>> >
> >>>>> > However, it works when I run the application.
> >>>>> >
> >>>>> > Here is code for JUNit test:
> >>>>> >
> >>>>> >        org.springframework.context.ApplicationContext ctx = null;
> >>>>> >        String[] paths = { "/WEB-INF/test/
> >>>>> datasource_beans_test.xml",
> >>>>> >            "/WEB-INF/authorize-spring.xml",
> >>>>> >            "/WEB-INF/spring-auth.xml",
> >>>>> >            "/WEB-INF/app_beans.xml"};
> >>>>> >        ctx = new FileSystemXmlApplicationContext(paths);
> >>>>> >
> >>>>> > How to make JUnit works?
> >>>>> >
> >>>>> > -Henry
> >>>>> >
> >>>>>
> >>>
> >>>
> >>>
> >
> >
> >
>

Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
I am using Junit test within the eClipse.

-Henry

Nathan Maves wrote:

> Your application work because java is backwards compatible.  The  
> build script, which includes the unit tests will not run with java  
> 1.5.  I think there are classloader issues that require you to mess  
> with the dependancies.
>
> Just to reiterate there are no know issues with using ibatis on Java  
> 1.5.  We have been using it for a while now.
>
> Nathan
> On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:
>
>> Thanks for your info! Why my application works with jdk 1.5 and  
>> JUnit doesn't with with jdk1.5?
>>
>> -Henry
>>
>> Nathan Maves wrote:
>>
>>> If you are asking about the JUnit tests for the ibatis code then  
>>> yes  and no :)
>>>
>>> I have tried it and it will not work.  You need to run the unit  
>>> tests  with 1.4.  For now the plans looks like we might try to  
>>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I  
>>> would be a good  thing for ibatis.
>>>
>>> Nathan
>>>
>>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>>
>>>> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>>
>>>> -Henry
>>>>
>>>> AHrakou@iba.by wrote:
>>>>
>>>>>
>>>>> what about XML?
>>>>>
>>>>>  Cause:
>>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not   
>>>>> declared for
>>>>> > element "sqlMap".
>>>>> > Caused by: org.xml.sax.SAXParseException: Attribute  
>>>>> "namespace"  is not
>>>>> > declared for element "sqlMap".
>>>>>
>>>>> !!!
>>>>> Attribute "namespace" is not declared for
>>>>> > element "sqlMap".
>>>>>
>>>>>  C  уважением,
>>>>>                Алексей.
>>>>>   mobile: +375-029-708-2168                      email:     
>>>>> horal@tut.by
>>>>>
>>>>> *Henry Lu <zh...@umich.edu>*
>>>>>
>>>>> 23.01.2006 17:12
>>>>> Please respond to
>>>>> user-java@ibatis.apache.org
>>>>>
>>>>>
>>>>>     To
>>>>>     user-java@ibatis.apache.org
>>>>> cc
>>>>>     Subject
>>>>>     Re: junit test
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> All correct version. Because it works for the application.
>>>>>
>>>>> ibatis-common-2.jar
>>>>> ibatis-dao-2.jar
>>>>> ibatis-sqlmap-2.jar
>>>>> and spring  1.2.6
>>>>>
>>>>> AHrakou@iba.by wrote:
>>>>>
>>>>> >
>>>>> > Check that you use the correct libraries for spring and ibatis.
>>>>> >
>>>>> >
>>>>> > Also check your XML:
>>>>> >
>>>>> > Cause:
>>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not   
>>>>> declared for
>>>>> > element "sqlMap".
>>>>> > Caused by: org.xml.sax.SAXParseException: Attribute  
>>>>> "namespace"  is not
>>>>> > declared for element "sqlMap".
>>>>> >
>>>>> >  C  уважением,
>>>>> >                Алексей.    >
>>>>> >   mobile: +375-029-708-2168                    >   email:     
>>>>> horal@tut.by      >
>>>>> >
>>>>> > *Henry Lu <zh...@umich.edu>*
>>>>> >
>>>>> > 23.01.2006 16:59
>>>>> > Please respond to
>>>>> > user-java@ibatis.apache.org
>>>>> >
>>>>> >
>>>>> >                  > To
>>>>> >                  user-java@ibatis.apache.org
>>>>> > cc
>>>>> >                  > Subject
>>>>> >                  junit test
>>>>> >
>>>>> >
>>>>> >
>>>>> >                  >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > I go the following error when I did JUnit test:
>>>>> >
>>>>> > setUp()----------
>>>>> > org.springframework.beans.factory.BeanCreationException:  Error  
>>>>> creating
>>>>> > bean with name 'sqlMapClient' defined in file
>>>>> > [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:  
>>>>> Initialization  of bean
>>>>> > failed; nested exception is
>>>>> > com.ibatis.common.exception.NestedRuntimeException: Error   
>>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:  
>>>>> Error  parsing XML.  > Cause:   
>>>>> com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>>>> > XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>>> > com.ibatis.common.xml.NodeletException: Error parsing XML.   Cause:
>>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not   
>>>>> declared for
>>>>> > element "sqlMap".
>>>>> > Caused by: org.xml.sax.SAXParseException: Attribute  
>>>>> "namespace"  is not
>>>>> > declared for element "sqlMap".
>>>>> >
>>>>> > However, it works when I run the application.
>>>>> >
>>>>> > Here is code for JUNit test:
>>>>> >
>>>>> >        org.springframework.context.ApplicationContext ctx = null;
>>>>> >        String[] paths = { "/WEB-INF/test/  
>>>>> datasource_beans_test.xml",
>>>>> >            "/WEB-INF/authorize-spring.xml",
>>>>> >            "/WEB-INF/spring-auth.xml",
>>>>> >            "/WEB-INF/app_beans.xml"};
>>>>> >        ctx = new FileSystemXmlApplicationContext(paths);
>>>>> >
>>>>> > How to make JUnit works?
>>>>> >
>>>>> > -Henry
>>>>> >
>>>>>
>>>
>>>
>>>
>
>
>

Re: junit test

Posted by Nathan Maves <Na...@Sun.COM>.
Your application work because java is backwards compatible.  The  
build script, which includes the unit tests will not run with java  
1.5.  I think there are classloader issues that require you to mess  
with the dependancies.

Just to reiterate there are no know issues with using ibatis on Java  
1.5.  We have been using it for a while now.

Nathan
On Jan 23, 2006, at 1:04 PM, Henry Lu wrote:

> Thanks for your info! Why my application works with jdk 1.5 and  
> JUnit doesn't with with jdk1.5?
>
> -Henry
>
> Nathan Maves wrote:
>
>> If you are asking about the JUnit tests for the ibatis code then  
>> yes  and no :)
>>
>> I have tried it and it will not work.  You need to run the unit  
>> tests  with 1.4.  For now the plans looks like we might try to  
>> migrate to  1.5 when 1.6 comes out.  Don't quote me on this but I  
>> would be a good  thing for ibatis.
>>
>> Nathan
>>
>> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>>
>>> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>>
>>> -Henry
>>>
>>> AHrakou@iba.by wrote:
>>>
>>>>
>>>> what about XML?
>>>>
>>>>  Cause:
>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not   
>>>> declared for
>>>> > element "sqlMap".
>>>> > Caused by: org.xml.sax.SAXParseException: Attribute  
>>>> "namespace"  is not
>>>> > declared for element "sqlMap".
>>>>
>>>> !!!
>>>> Attribute "namespace" is not declared for
>>>> > element "sqlMap".
>>>>
>>>>  C  уважением,
>>>>                Алексей.
>>>>   mobile: +375-029-708-2168                      email:     
>>>> horal@tut.by
>>>>
>>>> *Henry Lu <zh...@umich.edu>*
>>>>
>>>> 23.01.2006 17:12
>>>> Please respond to
>>>> user-java@ibatis.apache.org
>>>>
>>>>
>>>>     To
>>>>     user-java@ibatis.apache.org
>>>> cc
>>>>     Subject
>>>>     Re: junit test
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> All correct version. Because it works for the application.
>>>>
>>>> ibatis-common-2.jar
>>>> ibatis-dao-2.jar
>>>> ibatis-sqlmap-2.jar
>>>> and spring  1.2.6
>>>>
>>>> AHrakou@iba.by wrote:
>>>>
>>>> >
>>>> > Check that you use the correct libraries for spring and ibatis.
>>>> >
>>>> >
>>>> > Also check your XML:
>>>> >
>>>> > Cause:
>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not   
>>>> declared for
>>>> > element "sqlMap".
>>>> > Caused by: org.xml.sax.SAXParseException: Attribute  
>>>> "namespace"  is not
>>>> > declared for element "sqlMap".
>>>> >
>>>> >  C  уважением,
>>>> >                Алексей.    >
>>>> >   mobile: +375-029-708-2168                    >   email:     
>>>> horal@tut.by      >
>>>> >
>>>> > *Henry Lu <zh...@umich.edu>*
>>>> >
>>>> > 23.01.2006 16:59
>>>> > Please respond to
>>>> > user-java@ibatis.apache.org
>>>> >
>>>> >
>>>> >                  > To
>>>> >                  user-java@ibatis.apache.org
>>>> > cc
>>>> >                  > Subject
>>>> >                  junit test
>>>> >
>>>> >
>>>> >
>>>> >                  >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > I go the following error when I did JUnit test:
>>>> >
>>>> > setUp()----------
>>>> > org.springframework.beans.factory.BeanCreationException:  
>>>> Error  creating
>>>> > bean with name 'sqlMapClient' defined in file
>>>> > [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]:  
>>>> Initialization  of bean
>>>> > failed; nested exception is
>>>> > com.ibatis.common.exception.NestedRuntimeException: Error   
>>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException:  
>>>> Error  parsing XML.  > Cause:   
>>>> com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>>> > XPath '/sqlMapConfig/sqlMap'.  Cause:
>>>> > com.ibatis.common.xml.NodeletException: Error parsing XML.   
>>>> Cause:
>>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not   
>>>> declared for
>>>> > element "sqlMap".
>>>> > Caused by: org.xml.sax.SAXParseException: Attribute  
>>>> "namespace"  is not
>>>> > declared for element "sqlMap".
>>>> >
>>>> > However, it works when I run the application.
>>>> >
>>>> > Here is code for JUNit test:
>>>> >
>>>> >        org.springframework.context.ApplicationContext ctx = null;
>>>> >        String[] paths = { "/WEB-INF/test/  
>>>> datasource_beans_test.xml",
>>>> >            "/WEB-INF/authorize-spring.xml",
>>>> >            "/WEB-INF/spring-auth.xml",
>>>> >            "/WEB-INF/app_beans.xml"};
>>>> >        ctx = new FileSystemXmlApplicationContext(paths);
>>>> >
>>>> > How to make JUnit works?
>>>> >
>>>> > -Henry
>>>> >
>>>>
>>
>>
>>


Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
Thanks for your info! Why my application works with jdk 1.5 and JUnit 
doesn't with with jdk1.5?

-Henry

Nathan Maves wrote:

> If you are asking about the JUnit tests for the ibatis code then yes  
> and no :)
>
> I have tried it and it will not work.  You need to run the unit tests  
> with 1.4.  For now the plans looks like we might try to migrate to  
> 1.5 when 1.6 comes out.  Don't quote me on this but I would be a good  
> thing for ibatis.
>
> Nathan
>
> On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:
>
>> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>>
>> -Henry
>>
>> AHrakou@iba.by wrote:
>>
>>>
>>> what about XML?
>>>
>>>  Cause:
>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not  
>>> declared for
>>> > element "sqlMap".
>>> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace"  
>>> is not
>>> > declared for element "sqlMap".
>>>
>>> !!!
>>> Attribute "namespace" is not declared for
>>> > element "sqlMap".
>>>
>>>  C  уважением,
>>>                Алексей.
>>>   mobile: +375-029-708-2168                      email:    horal@tut.by
>>>
>>> *Henry Lu <zh...@umich.edu>*
>>>
>>> 23.01.2006 17:12
>>> Please respond to
>>> user-java@ibatis.apache.org
>>>
>>>
>>>     
>>> To
>>>     user-java@ibatis.apache.org
>>> cc
>>>     
>>> Subject
>>>     Re: junit test
>>>
>>>
>>>
>>>     
>>>
>>>
>>>
>>>
>>>
>>> All correct version. Because it works for the application.
>>>
>>> ibatis-common-2.jar
>>> ibatis-dao-2.jar
>>> ibatis-sqlmap-2.jar
>>> and spring  1.2.6
>>>
>>> AHrakou@iba.by wrote:
>>>
>>> >
>>> > Check that you use the correct libraries for spring and ibatis.
>>> >
>>> >
>>> > Also check your XML:
>>> >
>>> > Cause:
>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not  
>>> declared for
>>> > element "sqlMap".
>>> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace"  
>>> is not
>>> > declared for element "sqlMap".
>>> >
>>> >  C  уважением,
>>> >                Алексей.    >
>>> >   mobile: +375-029-708-2168                    >   email:    
>>> horal@tut.by      >
>>> >
>>> > *Henry Lu <zh...@umich.edu>*
>>> >
>>> > 23.01.2006 16:59
>>> > Please respond to
>>> > user-java@ibatis.apache.org
>>> >
>>> >
>>> >                  > To
>>> >                  user-java@ibatis.apache.org
>>> > cc
>>> >                  > Subject
>>> >                  junit test
>>> >
>>> >
>>> >
>>> >                  >
>>> >
>>> >
>>> >
>>> >
>>> > I go the following error when I did JUnit test:
>>> >
>>> > setUp()----------
>>> > org.springframework.beans.factory.BeanCreationException: Error  
>>> creating
>>> > bean with name 'sqlMapClient' defined in file
>>> > [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization  
>>> of bean
>>> > failed; nested exception is
>>> > com.ibatis.common.exception.NestedRuntimeException: Error  
>>> occurred.  > Cause: com.ibatis.common.xml.NodeletException: Error  
>>> parsing XML.  > Cause:  
>>> com.ibatis.common.exception.NestedRuntimeException: Error parsing
>>> > XPath '/sqlMapConfig/sqlMap'.  Cause:
>>> > com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>>> > org.xml.sax.SAXParseException: Attribute "namespace" is not  
>>> declared for
>>> > element "sqlMap".
>>> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace"  
>>> is not
>>> > declared for element "sqlMap".
>>> >
>>> > However, it works when I run the application.
>>> >
>>> > Here is code for JUNit test:
>>> >
>>> >        org.springframework.context.ApplicationContext ctx = null;
>>> >        String[] paths = { "/WEB-INF/test/ datasource_beans_test.xml",
>>> >            "/WEB-INF/authorize-spring.xml",
>>> >            "/WEB-INF/spring-auth.xml",
>>> >            "/WEB-INF/app_beans.xml"};
>>> >        ctx = new FileSystemXmlApplicationContext(paths);
>>> >
>>> > How to make JUnit works?
>>> >
>>> > -Henry
>>> >
>>>
>
>
>

Re: junit test

Posted by Nathan Maves <Na...@Sun.COM>.
If you are asking about the JUnit tests for the ibatis code then yes  
and no :)

I have tried it and it will not work.  You need to run the unit tests  
with 1.4.  For now the plans looks like we might try to migrate to  
1.5 when 1.6 comes out.  Don't quote me on this but I would be a good  
thing for ibatis.

Nathan

On Jan 23, 2006, at 12:46 PM, Henry Lu wrote:

> Is there anyone who are using jdk 1.5 and JUnit test for ibatis?
>
> -Henry
>
> AHrakou@iba.by wrote:
>
>>
>> what about XML?
>>
>>  Cause:
>> > org.xml.sax.SAXParseException: Attribute "namespace" is not  
>> declared for
>> > element "sqlMap".
>> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace"  
>> is not
>> > declared for element "sqlMap".
>>
>> !!!
>> Attribute "namespace" is not declared for
>> > element "sqlMap".
>>
>>  C  уважением,
>>                Алексей.
>>   mobile: +375-029-708-2168                      email:    
>> horal@tut.by
>>
>> *Henry Lu <zh...@umich.edu>*
>>
>> 23.01.2006 17:12
>> Please respond to
>> user-java@ibatis.apache.org
>>
>>
>> 	
>> To
>> 	user-java@ibatis.apache.org
>> cc
>> 	
>> Subject
>> 	Re: junit test
>>
>>
>>
>> 	
>>
>>
>>
>>
>>
>> All correct version. Because it works for the application.
>>
>> ibatis-common-2.jar
>> ibatis-dao-2.jar
>> ibatis-sqlmap-2.jar
>> and spring  1.2.6
>>
>> AHrakou@iba.by wrote:
>>
>> >
>> > Check that you use the correct libraries for spring and ibatis.
>> >
>> >
>> > Also check your XML:
>> >
>> > Cause:
>> > org.xml.sax.SAXParseException: Attribute "namespace" is not  
>> declared for
>> > element "sqlMap".
>> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace"  
>> is not
>> > declared for element "sqlMap".
>> >
>> >  C  уважением,
>> >                Алексей.    >
>> >   mobile: +375-029-708-2168                    >   email:    
>> horal@tut.by      >
>> >
>> > *Henry Lu <zh...@umich.edu>*
>> >
>> > 23.01.2006 16:59
>> > Please respond to
>> > user-java@ibatis.apache.org
>> >
>> >
>> >                  > To
>> >                  user-java@ibatis.apache.org
>> > cc
>> >                  > Subject
>> >                  junit test
>> >
>> >
>> >
>> >                  >
>> >
>> >
>> >
>> >
>> > I go the following error when I did JUnit test:
>> >
>> > setUp()----------
>> > org.springframework.beans.factory.BeanCreationException: Error  
>> creating
>> > bean with name 'sqlMapClient' defined in file
>> > [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization  
>> of bean
>> > failed; nested exception is
>> > com.ibatis.common.exception.NestedRuntimeException: Error  
>> occurred.  > Cause: com.ibatis.common.xml.NodeletException: Error  
>> parsing XML.  > Cause:  
>> com.ibatis.common.exception.NestedRuntimeException: Error parsing
>> > XPath '/sqlMapConfig/sqlMap'.  Cause:
>> > com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
>> > org.xml.sax.SAXParseException: Attribute "namespace" is not  
>> declared for
>> > element "sqlMap".
>> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace"  
>> is not
>> > declared for element "sqlMap".
>> >
>> > However, it works when I run the application.
>> >
>> > Here is code for JUNit test:
>> >
>> >        org.springframework.context.ApplicationContext ctx = null;
>> >        String[] paths = { "/WEB-INF/test/ 
>> datasource_beans_test.xml",
>> >            "/WEB-INF/authorize-spring.xml",
>> >            "/WEB-INF/spring-auth.xml",
>> >            "/WEB-INF/app_beans.xml"};
>> >        ctx = new FileSystemXmlApplicationContext(paths);
>> >
>> > How to make JUnit works?
>> >
>> > -Henry
>> >
>>


Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
Is there anyone who are using jdk 1.5 and JUnit test for ibatis?

-Henry

AHrakou@iba.by wrote:

>
> what about XML?
>
>  Cause:
> > org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> > element "sqlMap".
> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> > declared for element "sqlMap".
>
> !!!
> Attribute "namespace" is not declared for
> > element "sqlMap".
>
>  C  уважением,
>                Алексей.    
>
>   mobile: +375-029-708-2168                    
>   email:   horal@tut.by      
>
>
> *Henry Lu <zh...@umich.edu>*
>
> 23.01.2006 17:12
> Please respond to
> user-java@ibatis.apache.org
>
>
> 	
> To
> 	user-java@ibatis.apache.org
> cc
> 	
> Subject
> 	Re: junit test
>
>
>
> 	
>
>
>
>
>
> All correct version. Because it works for the application.
>
> ibatis-common-2.jar
> ibatis-dao-2.jar
> ibatis-sqlmap-2.jar
> and spring  1.2.6
>
> AHrakou@iba.by wrote:
>
> >
> > Check that you use the correct libraries for spring and ibatis.
> >
> >
> > Also check your XML:
> >
> > Cause:
> > org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> > element "sqlMap".
> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> > declared for element "sqlMap".
> >
> >  C  уважением,
> >                Алексей.    
> >
> >   mobile: +375-029-708-2168                    
> >   email:   horal@tut.by      
> >
> >
> > *Henry Lu <zh...@umich.edu>*
> >
> > 23.01.2006 16:59
> > Please respond to
> > user-java@ibatis.apache.org
> >
> >
> >                  
> > To
> >                  user-java@ibatis.apache.org
> > cc
> >                  
> > Subject
> >                  junit test
> >
> >
> >
> >                  
> >
> >
> >
> >
> >
> > I go the following error when I did JUnit test:
> >
> > setUp()----------
> > org.springframework.beans.factory.BeanCreationException: Error creating
> > bean with name 'sqlMapClient' defined in file
> > [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
> > failed; nested exception is
> > com.ibatis.common.exception.NestedRuntimeException: Error occurred.  
> > Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  
> > Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
> > XPath '/sqlMapConfig/sqlMap'.  Cause:
> > com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> > org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> > element "sqlMap".
> > Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> > declared for element "sqlMap".
> >
> > However, it works when I run the application.
> >
> > Here is code for JUNit test:
> >
> >        org.springframework.context.ApplicationContext ctx = null;
> >        String[] paths = { "/WEB-INF/test/datasource_beans_test.xml",
> >            "/WEB-INF/authorize-spring.xml",
> >            "/WEB-INF/spring-auth.xml",
> >            "/WEB-INF/app_beans.xml"};
> >        ctx = new FileSystemXmlApplicationContext(paths);
> >
> > How to make JUnit works?
> >
> > -Henry
> >
>

Re: junit test

Posted by AH...@iba.by.
what about XML? 

 Cause:
> org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> declared for element "sqlMap".

!!! 
Attribute "namespace" is not declared for
> element "sqlMap".

  C  уважением,
                Алексей. 

   mobile: +375-029-708-2168 
   email:   horal@tut.by 



Henry Lu <zh...@umich.edu> 
23.01.2006 17:12
Please respond to
user-java@ibatis.apache.org


To
user-java@ibatis.apache.org
cc

Subject
Re: junit test






All correct version. Because it works for the application.

ibatis-common-2.jar
ibatis-dao-2.jar
ibatis-sqlmap-2.jar
and spring  1.2.6

AHrakou@iba.by wrote:

>
> Check that you use the correct libraries for spring and ibatis.
>
>
> Also check your XML:
>
> Cause:
> org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> declared for element "sqlMap".
>
>  C  уважением,
>                Алексей. 
>
>   mobile: +375-029-708-2168 
>   email:   horal@tut.by 
>
>
> *Henry Lu <zh...@umich.edu>*
>
> 23.01.2006 16:59
> Please respond to
> user-java@ibatis.apache.org
>
>
> 
> To
>                user-java@ibatis.apache.org
> cc
> 
> Subject
>                junit test
>
>
>
> 
>
>
>
>
>
> I go the following error when I did JUnit test:
>
> setUp()----------
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'sqlMapClient' defined in file
> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
> failed; nested exception is
> com.ibatis.common.exception.NestedRuntimeException: Error occurred. 
> Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. 
> Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
> XPath '/sqlMapConfig/sqlMap'.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> declared for element "sqlMap".
>
> However, it works when I run the application.
>
> Here is code for JUNit test:
>
>        org.springframework.context.ApplicationContext ctx = null;
>        String[] paths = { "/WEB-INF/test/datasource_beans_test.xml",
>            "/WEB-INF/authorize-spring.xml",
>            "/WEB-INF/spring-auth.xml",
>            "/WEB-INF/app_beans.xml"};
>        ctx = new FileSystemXmlApplicationContext(paths);
>
> How to make JUnit works?
>
> -Henry
>



Re: junit test

Posted by Henry Lu <zh...@umich.edu>.
All correct version. Because it works for the application.

ibatis-common-2.jar
ibatis-dao-2.jar
ibatis-sqlmap-2.jar
and spring  1.2.6

AHrakou@iba.by wrote:

>
> Check that you use the correct libraries for spring and ibatis.
>
>
> Also check your XML:
>
> Cause:
> org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> declared for element "sqlMap".
>
>  C  уважением,
>                Алексей.    
>
>   mobile: +375-029-708-2168                    
>   email:   horal@tut.by      
>
>
> *Henry Lu <zh...@umich.edu>*
>
> 23.01.2006 16:59
> Please respond to
> user-java@ibatis.apache.org
>
>
> 	
> To
> 	user-java@ibatis.apache.org
> cc
> 	
> Subject
> 	junit test
>
>
>
> 	
>
>
>
>
>
> I go the following error when I did JUnit test:
>
> setUp()----------
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'sqlMapClient' defined in file
> [C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean
> failed; nested exception is
> com.ibatis.common.exception.NestedRuntimeException: Error occurred.  
> Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  
> Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing
> XPath '/sqlMapConfig/sqlMap'.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause:
> org.xml.sax.SAXParseException: Attribute "namespace" is not declared for
> element "sqlMap".
> Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not
> declared for element "sqlMap".
>
> However, it works when I run the application.
>
> Here is code for JUNit test:
>
>        org.springframework.context.ApplicationContext ctx = null;
>        String[] paths = { "/WEB-INF/test/datasource_beans_test.xml",
>            "/WEB-INF/authorize-spring.xml",
>            "/WEB-INF/spring-auth.xml",
>            "/WEB-INF/app_beans.xml"};
>        ctx = new FileSystemXmlApplicationContext(paths);
>
> How to make JUnit works?
>
> -Henry
>

Re: junit test

Posted by AH...@iba.by.
Check that you use the correct libraries for spring and ibatis. 


Also check your XML: 

Cause: 
org.xml.sax.SAXParseException: Attribute "namespace" is not declared for 
element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".

  C  уважением,
                Алексей. 

   mobile: +375-029-708-2168 
   email:   horal@tut.by 



Henry Lu <zh...@umich.edu> 
23.01.2006 16:59
Please respond to
user-java@ibatis.apache.org


To
user-java@ibatis.apache.org
cc

Subject
junit test






I go the following error when I did JUnit test:

setUp()----------
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'sqlMapClient' defined in file 
[C:\devel\webapps\coreyp\WEB-INF\app_beans.xml]: Initialization of bean 
failed; nested exception is 
com.ibatis.common.exception.NestedRuntimeException: Error occurred. 
Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. 
Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing 
XPath '/sqlMapConfig/sqlMap'.  Cause: 
com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: 
org.xml.sax.SAXParseException: Attribute "namespace" is not declared for 
element "sqlMap".
Caused by: org.xml.sax.SAXParseException: Attribute "namespace" is not 
declared for element "sqlMap".

However, it works when I run the application.

Here is code for JUNit test:

        org.springframework.context.ApplicationContext ctx = null;
        String[] paths = { "/WEB-INF/test/datasource_beans_test.xml",
            "/WEB-INF/authorize-spring.xml",
            "/WEB-INF/spring-auth.xml",
            "/WEB-INF/app_beans.xml"};
        ctx = new FileSystemXmlApplicationContext(paths);

How to make JUnit works?

-Henry