katepassaro Posted June 22, 2012 Share Posted June 22, 2012 Hello - I am familiar with Jasper for non-Hibernate data sources, but this is giving me a lot of trouble. I cannot get the connection to test successfully from within ireport, even though the configuration data is correct within the application. Here are the steps I've taken. Added Jars Added Classpath of configuration file to classpathWhat am I missing here? Did I add too many jars? I am receiving the following error: org.springframework.jdbc.datasource.DriverManagerDataSource cannot be cast to org.hibernate.SessionFactoryHere are the jars I've added: hibernate-annotations-3.4.0.ga.jar hibernate-commons-annotations-3.1.0.GA.jar hibernate-core-3.3.2.GA.jar hibernate-validator-3.1.0.GA.JAR spring-aop-3.0.5.jar spring-asm-3.0.5.jar spring-beans-3.0.5.jar spring-context-3.0.5.jar spring-core-3.0.5.jar spring-expression -3.0.5.jar spring-hibernate3-2.0.1.jar spring-jdbc-3.0.5.RELEASE.jar spring-jms -3.0.5.jar spring-orm -3.0.5.jar spring-tx -3.0.5.jar spring-web -3.0.5.jarAnd here is the text from my xml file (de-identified)I appreciate any help you can provide. Code:<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> <bean id="DataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> <property name="url" value="jdbc:oracle:thin:@ip.ip.ip.ip:port:dbname" /> <property name="username" value="username" /> <property name="password" value="password" /> </bean> <bean id="SessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="DataSource" /> <property name="annotatedClasses"> <list> <value>ourplace.model.Applicant</value> <value>ourplace.model.Person</value> <value>ourplace.model.Agency</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> </bean></beans> Link to comment Share on other sites More sharing options...
marcos.junqueira Posted March 20, 2013 Share Posted March 20, 2013 Same problem here, you found a solution? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now