Hello Chris,

so we running from Eclipse on Tomcat.
In Tomcat server.xml we specify datasource:

<Resource auth="Container" driverClassName="oracle.jdbc.OracleDriver" 
maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/someName" 
password="somePassword" type="javax.sql.DataSource" 
url="jdbc:oracle:thin:@host:port:dbname" username="someUsername"/>

And here is main database configuration xml:

<beans>

        <bean id="dataSource_Name"
                class="org.springframework.jndi.JndiObjectFactoryBean">
                <property name="jndiName">
                        <value>java:comp/env/jdbc/someName</value>
                </property>
        </bean>


        <bean id="hibernateTemplate_Name"
                class="org.springframework.orm.hibernate3.HibernateTemplate">
                <property name="sessionFactory">
                        <ref bean="sessionFactory_Name" />
                </property>
        </bean>


        <bean id="transactionManager_Name"
                
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
                <property name="sessionFactory">
                        <ref local="sessionFactory_XXX" />
                </property>
        </bean>


        <bean id="sessionFactory_Name"
                
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
                <property name="dataSource">
                        <ref bean="dataSource_Name" />
                </property>
                <property name="mappingResources">
                        <list>
        .... some values mappind DB tables......
                        </list>
                </property>
                <property name="hibernateProperties">
                        <props>
                                <prop key="hibernate.dialect">
                                        org.hibernate.dialect.Oracle10gDialect
                                </prop>
                                <prop key="hibernate.connection.release_mode">
                                        auto
                                </prop>
                        </props>
                </property>
                <property name="lobHandler"><ref 
local="oracleLobHandler_Name"/></property>
        </bean>

        <bean id="oracleLobHandler_Name"  
class="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init="true">
                <property name="nativeJdbcExtractor">
                        <ref local="nativeJdbcExtractor_Name" />
                </property>
        </bean>

        <bean id="nativeJdbcExtractor_Name" 
class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor" 
lazy-init="true"/>

</beans>

Best Regards

Peter Busfy
3 Portal

Hutchison 3G Austria GmbH
Gasometer C
Guglgasse 12/10/3
1110 Vienna
Mobil: +43-660-7313346
mailto:peter.bu...@drei.com
http://www.drei.at





-----Original Message-----
From: cjder...@gmail.com [mailto:cjder...@gmail.com] On Behalf Of chris derham
Sent: Thursday, August 16, 2012 4:59 PM
To: Tomcat Users List
Subject: Re: tomcat and DB oracle problem - only in higher versions

>
> I found following problem when java application is trying save xml
> data into xml column to database. ****
>
> I found a problem with tomcat which is happening in the version 6.0.32
> and
> 6.0.35 (maybe also in other version), but working really fine with
> version
> 6.0.26.****
>
> ** **
>
> My configuration:****
>
> ** **
>
> OS: windows 7 enterprise****
>
> IDE: Eclipse EE 3.7.1****
>
> Java: 1.6.0_33****
>
> Tomcat: 6.0.26, 6.0.32, 6.0.35****
>
> DB: Oracle Database 11g Enterprise Edition 11.2.0.3.0****
>
> Other technologies: Spring 3.1.1 + Hibernate 3 + Struts 1.1****
>
>
>
Can you provide details of how you create your connection to the database?
Config file or code? This should shed some light on the issue. I recall that I 
hit this in the past, and it is to do with how the connection pool is setup. 
Perhaps with the details, it might ring some bells for me or somebody else.

Thanks

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to