-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: DB2-JDBC-Properties konfigurieren
PostPosted: Wed Jun 01, 2011 9:47 am 
Beginner
Beginner

Joined: Fri Nov 14, 2008 7:11 am
Posts: 31
Hallo zusammen,

ich bekomme in meiner Anwendung beim Versuche größere LOBs aus DB2 zu laden folgende Fehlermeldung:

Code:
Es wurde versucht, LOB-Daten vollständig zu speichern, die für die JVM zu groß sind.
Inaktivieren Sie das Datenquellenmerkmal "fullyMaterializeLobData" für die querverweisbasierte LOB-Implementierung. ERRORCODE=-4499, SQLSTATE=null


Nun würde ich gerne die entsprechende Property setzen, weiß aber nicht wie und wo. In meiner persistence.xml habe ich versucht, die Parameter direkt an die JDBC-Url zu hängen oder in den hibernateProperties anzugeben (siehe Kommentarzeilen im Code):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:context="http://www.springframework.org/schema/context"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring-context-2.5.xsd
   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

   <!-- JDBC-DataSource -->
   <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
      destroy-method="close">
      <property name="driverClass" value="${db.driverClass}" />
      <property name="jdbcUrl" value="jdbc\:db2\://localhost\:50000/MyDB" />
                // <<< Direkt an der JDBC-URL >>>
      // <property name="jdbcUrl" value="jdbc\:db2\://localhost\:50000/MyDB:fullyMaterializeLobData=false;" />
      <property name="user" value="${db.user}" />
      <property name="password" value="${db.password}" />
      <property name="minPoolSize" value="${minPoolSize}"/>
        <property name="initialPoolSize" value="${initialPoolSize}"/>
        <property name="maxPoolSize" value="${maxPoolSize}"/>
        <property name="acquireIncrement" value="${acquireIncrement}"/>
        <property name="maxIdleTime" value="${maxIdleTime}"/>
        <property name="maxIdleTimeExcessConnections" value="${maxIdleTimeExcessConnections}"/>
        <property name="checkoutTimeout" value="${checkoutTimeout}"/>
        <property name="idleConnectionTestPeriod" value="${idleConnectionTestPeriod}"/>
   </bean>

   <bean id="securityInterceptor" class="de.engram.ekms.security.SecurityEntityInterceptor" />

   <bean id="chainedInterceptor" class="de.engram.ekms.backend.base.ChainedInterceptor">
      <property name="interceptors">
         <list>
            <ref bean="securityInterceptor"/>
         </list>
      </property>
   </bean>
   
   <!--  Session Factory -->
   <bean id="sessionFactory"
      class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
      <property name="entityInterceptor" ref="chainedInterceptor" />
      <property name="packagesToScan">
            <list>
              <value>de.engram.ekms.backend.domain</value>
            </list>
       </property>
      <property name="dataSource" ref="dataSource" />
      
      <property name="hibernateProperties">
         <props>
            <prop key="hibernate.dialect">${db.dialect}</prop>            
            <prop key="hibernate.connection.useUnicode">true</prop>
                       <prop key="hibernate.connection.characterEncoding">UTF8</prop>
                                // <<< Als Hibernate Property >>>
                       <prop key="hibernate.connection.fullyMaterializeLobData">false</prop>
                      <prop key="hibernate.hbm2ddl.auto">${hbm2ddl.auto}</prop>
            <prop key="hibernate.jdbc.batch_size">0</prop>
            <prop key="hibernate.show_sql">false</prop>
            <prop key="hibernate.format_sql">false</prop>
            <prop key="hibernate.use_sql_comments">false</prop>            
         </props>
      </property>
      <property name="lobHandler" ref="lobHandler"/>
   </bean>

   <bean id="lobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler">
   </bean>

   <!-- Transaction manager -->
   <bean id="transactionManager"
      class="org.springframework.orm.hibernate3.HibernateTransactionManager">
      <property name="sessionFactory" ref="sessionFactory" />
   </bean>
   <!--
      enable the configuration of transactional behavior based on
      annotations
   -->
   <tx:annotation-driven transaction-manager="transactionManager" />
</beans>



Mache ich grundsätzlich etwas falsch oder kann man diese Property nicht beeinflussen, weil sie z.B. durch den DefaultLobHandler von Spring überschrieben wird?


Top
 Profile  
 
 Post subject: Re: DB2-JDBC-Properties konfigurieren
PostPosted: Wed Jul 13, 2011 6:14 am 
Newbie

Joined: Wed Jul 13, 2011 6:12 am
Posts: 1
The program focuses on small independent eateries featuring traditional American-style cuisine such as barbecue, smoked meat, hamburgers.











diners drive-ins and dives


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.