problem occured when deploy application in weblogic platform
I deploy my application both in tomcat 5.0 and weblogic 8.0 .
In tomcat platform it is ok for everything.But in weblogic platform , I got many problem in it . Especially in applicaion-context files.
When I deploy my applcation at weblogic ,there are some problem
occured in my way.
Code:
<2005-6-30 上午09时25分50秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.Co
ntextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sess
ionFactory' defined in resource [/WEB-INF/applicationContext-all.xml] of ServletContext: Initialization of bean failed;
nested exception is java.io.FileNotFoundException: Could not open class path resource [WEB-INF/config/hibernate/com/some/model/SomeDevice.hbm.xml].>
There is the ComicDevice.hbm.xml file avaliable in the /WEB-INF/config/hibernate/com/some/model/ directory.
There is the block of my applicationContext-all.xml
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="mappingResources">
<list>
<value>WEB-INF/config/hibernate/com/some/model/SomeDevice.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">net.sf.hibernate.dialect.OracleDialect</prop>
</props>
</property>
</bean>
There are the other strange problem in this file .When I use
Code:
<property name="mappingJarLocations">
<list>
<value>/WEB-INF/lib/some-dao.jar</value>
</list>
</property>
(some-dao.jar contain some hbm configure files)
weblogic platform log told me some exception when I deploy the application.
Code:
<2005-6-30 上午10时37分37秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.Co
ntextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sess
ionFactory' defined in resource [/WEB-INF/applicationContext-all.xml] of ServletContext: Initialization of bean failed;
nested exception is java.io.FileNotFoundException: resource [/WEB-INF/lib/some-dao.jar] of ServletContext cannot be res
olved to absolute file path - web application archive not expanded?.>
I have no idea about these problem because in tomcat it is ok .
pls some one help me .
Re: problem occured when deploy application in weblogic plat
Quote:
Originally Posted by hk2000c
Code:
<property name="mappingResources">
<list>
<value>WEB-INF/config/hibernate/com/some/model/SomeDevice.hbm.xml</value>
</list>
</property>
Try placing a slash (/) before WEB-INF:
/WEB-INF/config/hibernate/com/some/model/SomeDevice.hbm.xml
Regards,
Andreas