- 浏览: 472967 次
- 性别:
- 来自: 上海转北京
文章分类
最新评论
-
fendou123321:
又仔细看了下,如果设置周日为每周的第一天,应该是正确的,如果把 ...
已知起始日期,求两日期之间共有多少自然周 -
fendou123321:
开始日期2016-12-19结束日期2017-02-05只用博 ...
已知起始日期,求两日期之间共有多少自然周 -
江奇缘:
郁闷了半天,看了文章才知道连错库了!!想揍自己一顿
今天很郁闷java.sql.SQLException: ORA-00904:标识符无效 -
zbs506:
太感谢了,
今天很郁闷java.sql.SQLException: ORA-00904:标识符无效 -
那可不就是我嘛:
幸亏我看了十分钟就来搜了,感谢楼主。
今天很郁闷java.sql.SQLException: ORA-00904:标识符无效
今天遇到了一个异常,困扰的时间比较长,觉得挺郁闷的,开始以为是哪里的配置文件被修改错了。后来才发现,原来是我的sql-map中的某个语句写的有问题。将sql语句改正确后就ok了。标记一下。
异常信息如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in class path resource [config/spring/spring-application.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/ibatis/sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/ibatis/sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:342) at org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:292) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 30 more Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62) at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62) at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:55) at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:339) ... 33 more Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60) ... 36 more Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62) at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:44) at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$10.process(SqlMapConfigParser.java:257) at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121) ... 40 more Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60) ... 43 more Caused by: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.getParameterMap(SqlMapExecutorDelegate.java:327) at com.ibatis.sqlmap.engine.config.MappedStatementConfig.<init>(MappedStatementConfig.java:52) at com.ibatis.sqlmap.engine.config.SqlMapConfiguration.newMappedStatementConfig(SqlMapConfiguration.java:159) at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:73) at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$21.process(SqlMapParser.java:362) at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121) ... 47 more 2010-10-21 14:54:02 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in class path resource [config/spring/spring-application.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/ibatis/sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/ibatis/sqlmap-config.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:342) at org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:292) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) ... 30 more Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62) at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62) at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:55) at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:339) ... 33 more Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/select'. Cause: com.ibatis.sqlmap.client.SqlMapException: There is no parameter map named java.util.HashMap in this SqlMap. at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84) at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72) at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60) ... 36 more
评论
2 楼
远去的渡口
2011-10-19
jiangjingxiaoxuan 写道
能说明一下写错的语句是什么吗?今天下午出现的问题,很烦啊~~~
是一个很明显的sql语句错误吧,现在也忘记具体怎么错的了,出现这个bug其实都是比较低级的错误,细心点就不会了。
1 楼
jiangjingxiaoxuan
2011-10-19
能说明一下写错的语句是什么吗?今天下午出现的问题,很烦啊~~~
发表评论
-
Ibatis中求上个月最后一天的实例sql语句
2011-01-27 17:53 2194在做会员管理模块的时候,有这样一个需求,预存分为 ... -
Ibatis错误 The error happened while setting a property on the result object解决方法
2010-11-09 10:55 4295今天遇到了一个问题,用Ibatis查询时,总是出现这个错误。对 ... -
Ibatis错误com.ibatis.common.jdbc.exception.NestedSQLException
2010-11-01 17:25 6920今天遇到一个问题,Ibatis查询时,同样的配置,当返回的数据 ...
相关推荐
Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'。这种错误是由于SqlMapConfig.xml文件的配置不正确引起的。 4. IBatis的Namespace 在IBatis中,Namespace是用于区分不同的...
DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> ``` 这样,XML解析器就能够识别并验证配置文件的结构,确保其遵循Ibatis的规范...
标题中的“ibatis 连接字符串 SqlMapConfig.xml”指的是使用iBATIS(一个轻量级的Java持久层框架)时,配置数据库连接的关键文件——SqlMapConfig.xml。这个文件是iBATIS的核心配置文件,它包含了数据源、事务管理器...
接着,使用IBatis.DataAccess的SqlMap实例,加载配置文件,通过接口调用执行SQL,例如: ```csharp ISqlMap sqlMap = SqlMap.GetInstance(); sqlMap.Configure("SqlMap.config"); List<MyObject> objects = sqlMap....
应用框架 ibatis. <?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"> ...
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="Account"> <typeAlias alias="Account" type="Account"/> ...
ibatis的dtd约束,版本2,xml文件中标签提示,网址:http://ibatis.apache.org/dtd/sql-map-2.dtd
Reader reader = com.ibatis.common.resources.Resources.getResourceAsReader("com/itcast/SqlMapConfig.xml"); sqlMapClient = com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(reader); ...
《深入解析iBatis-SQLMap 2.3.4.726源码》 在Java开发领域,iBatis作为一个优秀的持久层框架,深受广大开发者喜爱。它将SQL语句与Java代码分离,提高了代码的可读性和可维护性。本篇将围绕iBatis-SQLMap 2.3.4.726...
所谓“半自动化”,可能理解上有点生涩。纵观目前主流的 ORM(对象关系映射),无论 Hibernate还是Apache OJB,都对数据库结构提供了较为完整的封装,提供了从POJO到数据库表的全套映射机制。程序员往往只需定义好了...
DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap> <typeAlias alias="Users" type="com.ibatis.Users"/> select * from users ...
SqlMapConfig.xml文件是Ibatis-SqlMap的核心配置,包含了数据源、事务管理器等重要设置。 二、版本差异 1. ibatis-sqlmap_2.3.4.jar:这是Ibatis-SqlMap的一个稳定版本,包含了一些bug修复和性能优化。2.3.4版本...
`org.apache.ibatis.annotations.Param`是MyBatis中的一个重要注解,用于处理方法参数映射。 `@Param`注解主要用于SQL查询中的动态参数绑定,尤其是在动态SQL语句中。在MyBatis的映射文件或者Mapper接口中,当我们...
1.每个实体类需要配置各自的“SqlMap.config”在“config/SysConfig.xml”中,SqlMap,db1.Db1SqlMap就是“ibatis/db1/Db1SqlMap.config”,不同的db将分配不同的mapper类。 2.数据库链接统一放在“config/ibatis/...
SqlMap的配置是iBatis中应用的核心。这部分任务占据了iBatis开发的...Sql Map配置文件是iBatis配置的核心,从数据库连接到执行SQL时使用的sqlMap文件都是通过此文件中的配置提供给框架的,它通常命名为sqlMapConfig.xml
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <value>classpath:SqlMapConfig.xml</value> </property> </bean> <bean id="dao" class="org.springframework....
DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"> <sqlMapConfig> <!-- 配置ibatis框架的连接数据库资源文件 --> ...
PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> <sqlMapConfig> cacheModelsEnabled="true" enhancementEnabled="true" lazyLoadingEnabled=...