You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by OharaSu <Oh...@via.com.tw> on 2004/11/18 04:57:09 UTC

Oracle BLOB + DBCP connection pool

Hi

I have an curious problem.
I want to use oracle blob insert with ojb 1.0.1
I make ojb to use
org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl
and it works very well.
But when I change ojb to use
org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
it has errors as follows :
Oracle thin driver cannot update BLOB values with length>2000. (Consider
using Oracle9i as OJB platform.)

I think PlatformOracle9iImpl already solved oracle blob problem but
why DBCP make this error happen.

Anybody know why ?


ohara

==========================================================================

my configuration is

<jdbc-connection-descriptor
  jcd-alias="ojb"
  default-connection="false"
  useAutoCommit="1"
  platform="Oracle9i"
  jdbc-level="2.0"
  driver="oracle.jdbc.OracleDriver"
     protocol="jdbc"
     subprotocol="oracle:thin"
     dbalias="@x.x.x.x:1521:BF"
     username="aaa"
     password="aaa">
  <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
   <attribute attribute-name="grabSize" attribute-value="1"/>
   <attribute attribute-name="globalSequenceId" attribute-value="false"/>
      <attribute attribute-name="globalSequenceStart" attribute-value="1"/>
   <attribute attribute-name="autoNaming" attribute-value="true"/>
  </sequence-manager>
 </jdbc-connection-descriptor>

class is
/**
 * @ojb.class
 *   table = "BaseFile"
 *   include-inherited  = "false"
 */
public class BaseFile {

    /**
  * @ojb.field
  *   id="1"
  *   autoincrement="ojb"
  *   jdbc-type="INTEGER"
  *   primarykey="true"
  */
    private int id;

    /**
  * @ojb.field
  *   id = "2"
  *   length = "254"
  *   jdbc-type = "VARCHAR"
  *   nullable = "false"
  */
    private String name;

    /**
  * @ojb.field
  *   id = "3"
  *   length = "254"
  *   jdbc-type = "VARCHAR"
  *   nullable = "true"
  */
    private String type;

    /**
  * @ojb.field
  *   id = "4"
  *   length = "254"
  *   jdbc-type = "VARCHAR"
  *   nullable = "true"
  */
    private String repository;

    /**
  * @ojb.field
  *   id = "6"
  *   jdbc-type = "BLOB"
  *   nullable = "true"
  */
    private byte[] fileContent;

    /**
     *
     */
    public BaseFile() {
        super();
        // Auto-generated constructor stub
    }




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