读书人

jboss6中发布工程报错及解决办法

发布时间: 2013-09-11 17:27:29 作者: rapoo

jboss6中发布工程报错及解决方法
?1、java.lang.UnsupportedClassVersionError: Bad version number in .class file
? ? 上面的错误报的是版本错误,一种可能的原因是你工程用的jdk版本和jboss本身编译时用的jdk版本不一致。
? ? 解决:在myeclipse环境中,定位到“window--Preferences--MyEclipse--Servers--JBoss--JBoss 6.x--JDK”,把这个jdk设置成与你工程所用的jdk版本一样即可。

2、org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext-Contact.xml]; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
? ?原因:包冲突
? ?解决:删掉工程中“xml-apis.jar”包

3、org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ContactDao' defined in ServletContext resource [/WEB-INF/applicationContext-Contact.xml]: Cannot resolve reference to bean 'Dao_HqlImp' while setting bean property 'daoHql'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Dao_HqlImp' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'mySessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.jboss.resource.adapter.jdbc.WrapperDataSource] to required type [javax.sql.DataSource] for property 'dataSource'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.jboss.resource.adapter.jdbc.WrapperDataSource] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
? ???原因:包冲突
? ???解决:删掉工程中“jta.jar和jdbc2_0-stdext.jar”包
我的异常网推荐解决方案:org.springframework.beans.factory.BeanCreationException:,http://www.myexception.cn/j2ee/10759.html

读书人网 >操作系统

热点推荐