nested exception is org.hibernate.InvalidMappingException: Could not parse mappi
2011-1-28 18:19:41 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 'userDao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
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:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
在applicationContext.xml 對映檔案中,我忘記寫Mapping對映檔案了. 導致..
出現此錯誤..
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value></value> <!--需要加上Hibernate 對映檔案-->
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
</props>
</property>
</bean>
所以,每次搭建框架的時候,一定要小心.. 才能避免這些錯誤的出現..
相關文章
- nested exception is IncompleteElementException: Could not find parameter mapException
- nested exception is java.lang.NoSuchMethodException: 實體類.()ExceptionJava
- Initialization of bean failed; nested exception is java.lang.StackOverflowErrorBeanAIExceptionJavaError
- nested exception is java.lang.NoSuchFieldError: FAIL_ON_SYMBOL_HASH_OVERFLOWExceptionJavaErrorAISymbol
- { “code”: “-1”, “msg”: “nested exception is org.apache.ibatis.exceptions.TooManyResultsException: ExExceptionApacheBATOOM
- 報錯:nested exception is java.lang.NoClassDefFoundError: org/fusesource/hawtbuf/UTF8BufferExceptionJavaError
- nested exception is javax.validation.ValidationException錯誤解決思路ExceptionJava
- org.hibernate.exception.SQLGrammarException: could not extract ResultSet解決方案ExceptionSQL
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGramHTTPAIExceptionSpringFrameworkJDBCSQL
- nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379ExceptionRedislocalhost
- spring No default constructor found; nested exception is java.lang.NoSuchMethodException: com.slj.moSpringStructExceptionJava
- IO Exception: The Network Adapter Could Not Establish a Connection_604155.1ExceptionAPT
- Unknown column ‘name‘ in ‘field list‘ ; bad SQL grammar []; nested exception is com.mysql.jdbc.excepExceptionMySqlJDBC
- n [Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoAIExceptionRPC
- Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpException
- mysql從庫伺服器down機報錯Could not parse relay log event entryMySql伺服器
- fast parse,soft parse,hard parse的區別!AST
- dubbo和spring結合報錯 Invocation of init method failed; nested exception is java.lang.IllegalArgumentExceSpringAIExceptionJava
- org.hibernate.InvalidMappingException:APPException
- 解決bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00911: 無效字元SQLExceptionJavaError字元
- ; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00909: 引數個數無效SQLExceptionJavaError
- nested loop心得OOP
- Parse CPU to Parse Elapsd %: 指標太低指標
- soft parse(軟解析),hard parse(硬解析)
- ExceptionException
- ElasticSearch多層nested查詢、nested過濾排除非結果內容Elasticsearch
- JavaScript Date.parse()JavaScript
- parse-jsonJSON
- Execute to Parse 指標指標
- 小議解析parse
- Parse CSV file with Groovy
- dbms_sql.parseSQL
- python parse timePython
- Oracle exceptionOracleException
- Java——ExceptionJavaException
- 【sql調優之執行計劃】nested loops join and nested loop join outerSQLOOP
- PHP函式之parse_str()和parse_url()函式PHP函式
- 資料庫表--nested table資料庫