Seam - Spring - Hibernate inteagration problem
camicase82 Apr 6, 2011 10:03 PMHI there, its been already 8 hours i was triyong to find/understand fix a problem, but now im stuck in a dead end:
The situation si the next...i have a seam generated project integrated with spring hibernate and jBPM, eveithings is fine but the packagesToScan atribute on AnnotationSessionFactoryBean doesn't work, i make a deep debug on the application, and the problem is that the class loader when called through method getClassLoader().getResources(path); return a resurce which points to a vfsfile protocol. so when the code gets into
Enumeration resourceUrls = getClassLoader().getResources(path);
with a correct PATH variable, it returns a
[URL [vfsfile:******]]
object....and the when the code gets back to spring ResourceUtils class, on method getFile its fails...because its specting a 'file' protocol instead of a vfsfile....
Im really stuck with this...a triyed to put some of the anotated classes and it works fine ( but i cannot do it for all of them...is a migration project and are like 1000 or more domain objects...:s)
Next i put the significant parts for my config files....
springContext.xml
<bean id="hibernateSessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="applicationDataSource" />
<property name="annotatedPackages">
<list>
<value>co.com.adv.salarix.auditoria.domain</value>
</list>
</property>
<property name="packagesToScan">
<list>
<value>co.com.adv.salarix.advalorhum.domain</value>
<value>co.com.adv.salarix.interfaces.domain</value>
<value>co.com.adv.salarix.parametrizacion.domain</value>
</list>
</property>
<property name="hibernateProperties">
<value>
hibernate.dialect=${hibernate.dialect}
hibernate.show_sql=${hibernate.show_sql}
hibernate.transaction.flush_before_completion=true
hibernate.connection.release_mode=after_transaction
hibernate.cache.use_second_level_cache=true
hibernate.cache.use_second_level_cache=true
hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
</value>
</property>
<!-- hibernate.hbm2ddl.auto=update -->
<property name="useTransactionAwareDataSource" value="false" />
componets.xml
<!-- use the power of Spring transactions -->
<spring:context-loader
config-locations="/WEB-INF/springConfig/springComponent.xml" />
<spring:spring-transaction
platform-transaction-manager-name="localTransactionManager" />
<persistence:managed-hibernate-session
name="hibernateSession" auto-create="true" session-factory="#{hibernateSessionFactory}" />
appart from that...donw have anithing unusual...
Pdta: Sorry for my bad typing...im really tired and a little bit desperate