我用的是weblogic9.2
有两个项目,用相同的ssh架构,单独放在weblogic下面启动没有问题,但同时将两个项目部署时,weblogic就会抛异常。
两个项目中有相同的hbm.xml文件,名称及映射都相同。我不明白的是为什么weblogic启动时,两个项目会互相检查各自的hbm.xml文件,而引起重复引用mapping的错误?
下面是后台打出的异常
####<2009-3-12 下午04时38分50秒 CST> <Info> <ServletContext-/ckba> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847130937> <000000> <Set web app root system property: 'ckba.root' = [C:\bea\user_projects\domains\base_domain\autodeploy\ckba\]>
####<2009-3-12 下午04时38分51秒 CST> <Info> <ServletContext-/ckba> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847131187> <000000> <Initializing Log4J from [C:\bea\user_projects\domains\base_domain\autodeploy\ckba\WEB-INF\classes\Log4j.properties]>
####<2009-3-12 下午04时38分51秒 CST> <Info> <ServletContext-/ckba> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847131218> <000000> <Loading Spring root WebApplicationContext>
####<2009-3-12 下午04时38分54秒 CST> <Warning> <HTTP> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847134750> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.business.baoan.service.IBaoanService' defined in ServletContext resource [/WEB-INF/classes/applicationContext-baoan.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/classes/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/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.business.baoan.service.IBaoanService' defined in ServletContext resource [/WEB-INF/classes/applicationContext-baoan.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/classes/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/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/classes/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/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.business.admin.domain.view.LimitsView
有两个项目,用相同的ssh架构,单独放在weblogic下面启动没有问题,但同时将两个项目部署时,weblogic就会抛异常。
两个项目中有相同的hbm.xml文件,名称及映射都相同。我不明白的是为什么weblogic启动时,两个项目会互相检查各自的hbm.xml文件,而引起重复引用mapping的错误?
下面是后台打出的异常
####<2009-3-12 下午04时38分50秒 CST> <Info> <ServletContext-/ckba> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847130937> <000000> <Set web app root system property: 'ckba.root' = [C:\bea\user_projects\domains\base_domain\autodeploy\ckba\]>
####<2009-3-12 下午04时38分51秒 CST> <Info> <ServletContext-/ckba> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847131187> <000000> <Initializing Log4J from [C:\bea\user_projects\domains\base_domain\autodeploy\ckba\WEB-INF\classes\Log4j.properties]>
####<2009-3-12 下午04时38分51秒 CST> <Info> <ServletContext-/ckba> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847131218> <000000> <Loading Spring root WebApplicationContext>
####<2009-3-12 下午04时38分54秒 CST> <Warning> <HTTP> <zlt-hjy> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236847134750> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.business.baoan.service.IBaoanService' defined in ServletContext resource [/WEB-INF/classes/applicationContext-baoan.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/classes/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/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.business.baoan.service.IBaoanService' defined in ServletContext resource [/WEB-INF/classes/applicationContext-baoan.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/classes/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/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/classes/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/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\bea\user_projects\domains\base_domain\autodeploy\yccd\WEB-INF\classes\com\business\admin\domain\query\adminSqlQuery.hbm.xml
org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.business.admin.domain.view.LimitsView
解决方案 »
- document.getElementById('param').value='<%=pp%>';有问题
- 用setProperty设置的乱码问题,请人指点一下谢谢
- onClick="javascript:document.all.a.submit();"是什么意思?如果在页面把表格的内容生成一个execl,该怎么做?
- 如何给 form中的action参数赋变量
- ajax4jsf让我很失望,大家来看看吧
- sun服务器出现这个情况,
- 学会发帖
- 请问:sun.net.ftp.ftpclient能在jsp/servlet中使用吗?
- 为什么graphicsmagick比imagemagick慢
- java web开发兼职
- jsp的表达式问题
- iframe
spring 那个xml在domain下是全局的!
weblogic9.2修改端口号。
\bea9\user_projects\domains\base_domain\config\config.xml
该文件默认端口号7001的情况没有<listen-port>标签。
如要修改为其他端口号,需要加上类似的<listen-port>7003</listen-port>语句即可。