We have a web application in production that uses:
a) jboss 4.2.1
b) spring 2.5.1
c) hibernate 3.2
We use ContextLoaderListener to bootstrap our application context and our app is heavily dependent on spring (bean creation, transaction management, dao classes use hibernatedaosupport, pojo based service classses) and we don't use ejb.
We want to migrate to jdk 1.6 and jboss 5.1. While doing that, our application has stopped loading because of jboss5 vfsfile protocol. I went through JBSPRING-4 and SPR-5120 and added the jboss5-spring integration jars attached therein in my WEB-INF/lib. I also added the following to my web.xml based on the recommendation in JBSPRING-4 :
Despite doing all the above, I am still getting this exception:Code:<context-param> <param-name>contextClass</param-name> <param-value>org.jboss.spring.factory.VFSXmlWebApplicationContext</param-value> </context-param>
caused by:HTML Code:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring/ds-hibernate/applicationContext-jtads-hibernate.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [hibernate/com/dataobject] cannot be resolved to absolute file path because it does not reside in the file system: vfsfile:/D:/Programs/jboss-5.1.0/jboss-5.1.0.GA/server/default/deploy/myapp.war/WEB-INF/classes/hibernate/com/dataobject/ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at
Snippet from spring applicationcontext-jta-ds.xml:Code:Caused by: java.io.FileNotFoundException: class path resource [hibernate/com/dataobject] cannot be resolved to absolute file path because it does not reside in the file system: vfsfile:/D:/Programs/jboss-5.1.0/jboss-5.1.0.GA/server/default/deploy/myapp.war/WEB-INF/classes/hibernate/com/dataobject/ at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:201) at org.springframework.core.io.ClassPathResource.getFile(ClassPathResource.java:175) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:660) at
I even tried upgrading to spring 2.5.6 but no luck. I am beginning to get annoyed with jboss 5 for having broken portability with such an important component such as spring. We also use struts-2/xwork and I suspect we are going to find a similar problem there (but before i get there, i should be able to load my spring app context firstCode:<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="mappingDirectoryLocations"> <list> <value> classpath:hibernate/com/dataobject </value>)
Am I missing anything? I am sure we are not the only ones who use spring webapplication context moving to jboss 5? I searched the spring forum and didn't find a single post where this problem has been reported.:o Even on jboss forums, a few posts report this problem, but from the context of an ejb deployment.


)
Reply With Quote
