ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin" <brandon.goo...@gmail.com>
Subject Re: Namespaces not working
Date Thu, 23 Feb 2006 13:51:33 GMT
Do you have namespace enabled?

<sqlMapConfig>
...
<settings useStatementNamespaces="true" />
...
</sqlMapConfig>

Brandon

On 2/23/06, Paul Carr <Paul.Carr@express-gifts.co.uk> wrote:
>
>
>
> Can someone tell me why my xml namespaces aren't working..
>
>
>
> I have used abator to generate my SQLmaps and DAOS.
>
> The generated SQLmap and DAO for my manufacture_request table are attached.
>
> When I run my test code ( to do an insert ) I get :-
>
> com.ibatis.sqlmap.client.SqlMapException: There is no
> statement named
> upca_manufacture_request.abatorgenerated_insert in this
> SqlMap.
>
> If I remove the namespace (upca_manufacture_request) from the daoImpl, it
> works fine.
>
>
>
> Also when abator initially generated my SQLMap it was referencing
> 'abatorgenerated_Example_Where_Clause' from within the SQL
> map as being qualified by the namespace… (upca_manufacture_request) which
> was causing the exeption at the bottom. I had to remove the namespace
> manually from the sql map to get it to run.
>
>
>
> Any suggestions ?
>
>
>
> I am using eclipse 3.1.1 and JDK 1.3
>
>
>
>
>
>
>
> Error while configuring DaoManager.  Cause:
> 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: com.ibatis.common.exception.NestedRuntimeException:
> Error parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by: com.ibatis.common.xml.NodeletException: Error
> parsing XML.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause: com.ibatis.common.exception.NestedRuntimeException:
> Error parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by: com.ibatis.common.xml.NodeletException: Error
> parsing XML.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by: 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: com.ibatis.common.exception.NestedRuntimeException:
> Error parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by: com.ibatis.common.xml.NodeletException: Error
> parsing XML.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMapConfig/sqlMap'.  Cause:
> com.ibatis.common.xml.NodeletException: Error parsing XML.
> Cause: com.ibatis.common.exception.NestedRuntimeException:
> Error parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by: com.ibatis.common.xml.NodeletException: Error
> parsing XML.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Error
> parsing XPath '/sqlMap/select'.  Cause:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
> Caused by:
> com.ibatis.common.exception.NestedRuntimeException: Could
> not find SQL statement to include with refid
> 'upca_manufacture_request.abatorgenerated_Example_Where_Clause'
>
>
>
> -----Original Message-----
>  From: Jeff Butler [mailto:jeffgbutler@gmail.com]
>  Sent: 22 February 2006 20:25
>  To: user-java@ibatis.apache.org
>  Subject: Re: abator for eclipse generates *Examples classes
>
>
>
>
> The example class is used in the selectByExample and deleteByExample methods
> - it's used to implement "query by example" functionality.  There's another
> recent thread on this list where I show an example of using these methods.
>
>
>
>
>
> In a stand alone (or any) app, you'll need to do these things:
>
>
>
>
>
> 1. Create an SqlMapConfig.xml file that references the generated SqlMap
> files
>
>
> 2. Create a dao.xml file that references the SqlMapConfig.xml and declares
> all the generated DAOs
>
>
> 3. Initialize the DaoManager
>
>
> 4. Use the DAOs
>
>
>
>
>
> This information is all covered in the regular iBATIS documentation for the
> Sql Map framework and the DAO framework.  Step 1 would be in the SqlMap
> documentation, steps 2-4 are in the DAO documentation.  Any tutorial on
> iBATIS would also cover these steps.
>
>
>
>
>
> Jeff Butler
>
>
>
>
>
>
> On 2/22/06, Paul Carr <Paul.Carr@express-gifts.co.uk > wrote:
>
>
> Hi , newb to ibatis , Just used abator for eclipse to generate DAO's for a
> simple table and I got :-
>
>
>
> TableSQLmap                - the sqlMap
>
> Table.java                      - the value object
>
> TableExample.java         - some class with the same data as the value
> object, but everythings an int, This is where I'm getting confused
>
> TableDAO interface        - the DAO interface
>
> TableDAOImpl               -  implements the above interface, but doesn't
> use the generated value objects…. Uses the value object Examples ???
>
>
>
> Has anyone got a good example of how all these hang together in a stand
> alone java app ?  In particular, what you do with the TableExample classes
> ?
>
>
>
> Cheers
>
> Paul
>
>
>
>
>
>
>

Mime
View raw message