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/24 17:01:11 UTC
ibatis 2.1.16
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>.
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
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >>>
>