db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ribi Roland <Roland.R...@braunvieh.ch>
Subject RE: Tomcat 5.0, JNDI-DataSource and Blobs
Date Thu, 16 Jun 2005 13:18:57 GMT
I found a solution:

Installed OJB 1.0.3 instead of 1.0.1


> -----Original Message-----
> From: Ribi Roland [mailto:Roland.Ribi@braunvieh.ch]
> Sent: Thursday, June 16, 2005 11:11 AM
> To: 'ojb-user@db.apache.org'
> Subject: Tomcat 5.0, JNDI-DataSource and Blobs
> 
> 
> Hi
> 
> Since I moved the config of the connection pool from repository.xml to
> server.xml and get the connection via JNDI-lookup the broker 
> throws the
> following Exception:
> 
> ch.braunvieh.dbutils.DirectoryImageUploadVisitor -
> org.apache.ojb.broker.PersistenceBrokerSQLException: SQL failure while
> insert object data for 
> class ch.braunvieh.ojb.argus.TFotoMitOrig, ..... [Oracle thin 
> driver cannot
> update BLOB values with length>2000. (Consider using Oracle9i as OJB
> platform.)]
> ....
> 
> Any hints? I did'nt change the JDBC-Driver classes or any 
> other Property...
> 
> The old config in repository.xml was:
> <jdbc-connection-descriptor
>     jcd-alias="argus"
>     default-connection="true"
>     platform="Oracle9i"
>     jdbc-level="3.0"
>     driver="oracle.jdbc.driver.OracleDriver"
>     protocol="jdbc"
>     subprotocol="oracle"
>  
> dbalias="thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=T
> CP)(HOST=satur
> n.braunvieh.ch)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=AR01.s
> aturn.braunvie
> h.ch)(SERVER=DEDICATED)))" 
>     initsql="ALTER SESSION USING SCHEMA GESTHO"
>     username="xxxxx"
>     password="xxxxx"
>     ignoreAutoCommitExceptions="true"
>     useAutoCommit="0">
> 	<attribute attribute-name="initsql" 
> attribute-value="ALTER SESSION
> SET NLS_NUMERIC_CHARACTERS='.,'" />
> 	    <connection-pool 
>           maxActive="50"
>           maxIdle="20"
>           maxWait="5000"
>           whenExhaustedAction="1"
>           testOnBorrow="true"
>           testOnReturn="true"
>           testWhileIdle="false"
>           timeBetweenEvictionRunsMillis="3600000"
>           minEvictableIdleTimeMillis="1800000"
>           numTestsPerEvictionRun="20"
>           validationQuery="SELECT PA_ANI.nGetAniID('US 
> 184087.2') FROM DUAL"
> 					 />
>     <sequence-manager
> className="org.apache.ojb.broker.util.sequence.SequenceManager
> NextValImpl"
> />
>   </jdbc-connection-descriptor>
> 
> And now it is:
> 
>    <jdbc-connection-descriptor
>     jcd-alias="argus"
>     jndi-datasource-name="java:/comp/env/jdbc/argus"
>     default-connection="true"
>     platform="Oracle9i"
>     jdbc-level="3.0"
>     ignoreAutoCommitExceptions="true"
>     useAutoCommit="0"
>     driver="oracle.jdbc.driver.OracleDriver">
>     	<attribute attribute-name="initsql" 
> attribute-value="ALTER SESSION
> SET NLS_NUMERIC_CHARACTERS='.,'" />
>     <sequence-manager
> className="org.apache.ojb.broker.util.sequence.SequenceManager
> NextValImpl"
> />
>   </jdbc-connection-descriptor>
> 
> 
> 
> The Connection-Pool is defined as follows in the server.xml:
> 
> 
>     <Resource name="argus" auth="Container"
>     	      type="javax.sql.DataSource"/> 
>     
>     <ResourceParams name="argus">
>       <parameter>
>         <name>factory</name>
>         <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>       </parameter>
>       <parameter>
>         <name>driverClassName</name>
>         <value>oracle.jdbc.driver.OracleDriver</value>
>       </parameter>
>       <parameter>
>         <name>url</name>
>  
> <value>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(
> PROTOCOL=TCP)(
> HOST=saturn.braunvieh.ch)(PORT=1521)))(CONNECT_DATA=(SERVICE_N
> AME=AR01.satur
> n.braunvieh.ch)(SERVER=DEDICATED)))</value>
>       </parameter>
>       <parameter>
>         <name>username</name>
>         <value>xxxxx</value>
>       </parameter>
>       <parameter>
>         <name>password</name>
>         <value>xxxxx</value>
>       </parameter>
>       <parameter>
>         <name>initialSize</name>
>         <value>1</value>
>       </parameter>
>       <parameter>
>         <name>maxActive</name>
>         <value>5</value>
>       </parameter>
>       <parameter>
>         <name>maxIdle</name>
>         <value>2</value>
>       </parameter>
>       <parameter>
>         <name>minIdle</name>
>         <value>1</value>
>       </parameter>
>       <parameter>
>         <name>maxWait</name>
>         <value>-1</value>
>       </parameter>
>       <parameter>
>         <name>validationQuery</name>
>         <value>SELECT PA_ANI.nGetAniID('US 184087.2') FROM 
> DUAL</value>
>       </parameter>
>       <parameter>
>         <name>testOnBorrow</name>
>         <value>true</value>
>       </parameter>
>       <parameter>
>         <name>testOnReturn</name>
>         <value>true</value>
>       </parameter>
>       <parameter>
>         <name>testWhileIdle</name>
>         <value>false</value>
>       </parameter>
>       <parameter>
>         <name>timeBetweenEvictionRunsMillis</name>
>         <value>3600000</value>
>       </parameter>
>       <parameter>
>         <name>numTestsPerEvictionRun</name>
>         <value>5</value>
>       </parameter>
>       <parameter>
>         <name>minEvictableIdleTimeMillis</name>
>         <value>1800000</value>
>       </parameter>
>       <parameter>
>         <name>whenExhaustedAction</name>
>         <value>2</value>
>       </parameter>
> 
>     </ResourceParams>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Mime
View raw message