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 Bruno CROS <br...@gmail.com> on 2006/02/03 11:44:01 UTC

Migrating to 1.0.4

Following the Armin's advice, i'm currently migrating from 1.0.1 to 1.0.4

I started with the 1.0.4 ojb-blank.jar to replace all files. jar of course,
and configuration ones too.

I stop with Torque (to generate Oracle 9i database) with an
UnkonwnHostException

In 1.0.1 i was targeting with this ( and it used to work fine):
torque.database.createUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
torque.database.buildUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}

and in 1.0.4, i tried the original one (with database) and the old one
torque.database.createUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
and
torque.database.buildUrl=${torque.database.createUrl} (apprently the same)

Did someone reach to work with torque and Oracle 9i ?

Big thanks.



On 2/2/06, Armin Waibel <ar...@apache.org> wrote:
>
> Hi Bruno,
>
> in OJB 1.0.2 we fixed a bug with partially materialized objects under
> heavy load. Assume that this bug cause your problem.
> http://db.apache.org/ojb/release-notes.txt
>
> I would recommend the migration to OJB 1.0.4.
> But take care of changes between 1.0.1 and 1.0.4 (e.g. complete
> refactoring of odmg implementation done in 1.0.2/3, changed auto-xxx
> settings for odmg, ...) it's listed in the release-notes and in the docs
> (Caching, Inheritance, ...).
> Strongly recommended:
> http://db.apache.org/ojb/docu/guides/odmg-guide.html
>
> regards,
> Armin
>
>
> Bruno CROS wrote:
> >  Hello,
> >
> > I now have spent a lot of time debugging 2 batch processing.
> > First processing creates a simple 1-n couple of object (consider that
> class
> > UnityCar refers a class Unity with 1-n relation) . Creation is done like
> > this :
> >
> > - tx.begin()
> > - Unity u = new Unity()
> > - tx.lock(u, Transaction.WRITE);
> > - UnityCar uc = new UnityCar();
> > - uc.setUnity(u);
> > - tx.lock(uc, Transaction.WRITE);
> > - tx.commit();
> >
> > Note that we have wrotten a lot a code working perfectly like this one.
> > Chance !
> >
> > My problem occurs when a second processing read a Unity class. With the
> > auto-retrieve of the collection ( we need cache speed),  OJB should send
> me
> > a collection of 1 UnityCar, but it do this only a good while after first
> > processing !! Immediately after first processing, I have
> > NullPointerException getting the collection unityCars. I known that my
> > object is bad-loaded (no collection on unity.getUnityCars() ) and if a
> wait
> > ( a probably cache expiration ) , that same objet is right loaded, with
> the
> > good collection !!
> >
> > I tried a lot of solutions :
> > - mark first created object dirty with markDirty. No way.
> > - reload object (with getByIdentity)  after materialization. No way.
> > - checkpoint and reload. No way.
> > - restart. Yes of corse it works. But i definitely can't !!
> >
> > -hum, does i have severals objects, many as Transactions !!? after
> commit ,
> > no ??
> >
> > Working with OJB Version 1.0.1. I known it's old, but it works not so
> bad
> > for all we all have done at this day.
> >
> > Does someone can explain that ? Help !!
> > Migration to 1.0.3 ? to 1.0.4 ?! Which one ? what is supposed to be
> > rewrotten ?
> >
> > Thanks a lot to help me.
> >
> >
> > Sorry for my poor bad english.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
Trace is working now.

May be i have i start of explanation. I saw that 1:n relations are all read
( checked ) , even if no getter (getCollections) exists on mapped object.
That's because my process is running slower i think.

I don't known why this occurs. I guess you're going to tell me that i have
to check all my auto-retrieve !!

...




On 2/6/06, Bruno CROS <br...@gmail.com> wrote:
>
>
> Well, step by step, i hope that anything will be fine soon.
>
> DB Connections are well mounted, thank you very much again.
>
> So, I tested  my batch processes and i noted that log4j trace disappeared.
> I think it's no so hard to resolve (just redirect to my  commons logging
> setup). But the most worrying is that my first process (creation of 400
> records qith 400 others each linked) canno't end, crashing in a outofmemory
> error most of the time. Note that this processes is the simplest i have.
>
> According to the notes, i modified auto-update to none. auto-delete were
> already at none.
> My repository have been regenerated by xdoclet Ant task. Should i consider
> new repository description (that i miss) in my described collections (or
> references)?
>
> I known there something wrong. It looks like there exponential reads. But
> i don't forget that i 'm creating objects from scratch. So, i get rid an
> infinite read loop.
>
> Processes were working without any trouble in 1.0.1. Except the none read
> 1.N relations  during  heavy load i related you last week.
>
> I'm looking at documentation about well configuring OJB.properties, for
> little batch processes and multiples objects transaction.
>
> My setup is the one who came with ojb_blank. I'm asking me if it's
>
> Note that my second connections (in 1.0.1 schema ) just serves me to read
> only (no update, no creation). so i get rid of a problem of locking with
> 1.0.4 and a 1.0.1 db core.
>
> I guess that my case is not an isolated one.
>
> Best regards
>
>
>
> On 2/4/06, Armin Waibel < arminw@apache.org> wrote:
> >
> > Hi Bruno,
> >
> > Bruno CROS wrote:
> > > i already have patch torque3.1.1.jar. thanks for advice. I've done
> > since
> > > start with the build.xml of ojb-blank.jar (so torque).
> > >
> > > I have the right database generated now. That's a good point and i
> > thank you
> > > all.
> > >
> > > On the other hand, i have 2 database connections and it seems they do
> > not
> > > work anymore. Of course, i can't see any errors. I d'ont known how to
> > spy DB
> > > connections !!? shame, i known.
> > >
> >
> > you can use p6spy
> > http://db.apache.org/ojb/docu/faq.html#traceProfileSQL
> >
> >
> > > The particularity of one of these connections is that the database has
> > been
> > > made with 1.0.1 OJB release.  Understand that this database is
> > accessed by
> > > my application, and by another one (bigger). So upgrading this DB is
> > not so
> > > suitable.
> > >
> > > nevertheless, understand too, that my application need to be connected
> > to
> > > those two databses, mine in 1.0.4 and the big one in 1.0.1. At the
> > same time
> > > of course.
> > >
> > > My doubts are about the repository_internal.xml ( describing OJB
> > tables). If
> > > these tables are not the same in the 2 DB. How could it work ??
> > >
> >
> > Seems that the "default" connection doesn't require any of the internal
> > OJB tables (if you don't use odmg named objects or the specific List/Map
> > implementations).
> >
> > "rushDb" use SequenceManagerHighLowImpl. In this case table OJB_HL_SEQ
> > is mandatory. The metadata mapping of this object/table changed between
> > 1.0.1 and 1.0.4 but not the column names (one column was removed between
> > 1.0.1 and 1.0.4). Thus you could try to use the "old" table with the
> > 1.0.4 mapping. If this doesn't work you could drop and recreate table
> > OJB_HL_SEQ (OJB will automatically take care of existing id's and
> > re-populate the table).
> >
> > In "rushDb" you are using useAutoCommit="0". In this case it's mandatory
> >
> > that the jdbc-driver/DB disable the connection autoCommit property (else
> > you will run into problems with tx-rollback).
> >
> > regards,
> > Armin
> >
> >
> > > You understand what i mean when you see my repository.xml file. and
> > the 2
> > > next files, parts of it.
> > >
> > > ==================
> > > my repository.xml file
> > > =====================
> > >
> > > <!ENTITY databaseMathieu SYSTEM "repository_database_mathieu.xml">
> > > <!ENTITY databaseRushDb SYSTEM "repository_database_rushDb.xml">
> > > <!ENTITY internal SYSTEM "repository_internal.xml">
> > > <!ENTITY user SYSTEM "repository_user.xml">
> > > <!ENTITY rushDb SYSTEM "repository_rushDb.xml">
> > > ]>
> > >
> > >
> > > <descriptor-repository version="1.0"
> > >                       isolation-level="read-uncommitted"
> > >                       proxy-prefetching-limit="50">
> > >
> > >
> > >    <!-- connection Mathieu -->
> > >    &databaseMathieu;
> > >    <!-- connection rushDB -->
> > >    &databaseRushDb;
> > >
> > >    <!-- include ojb internal mappings here; comment this if you don't
> > need
> > > them -->
> > >    &internal;
> > >
> > >    <!-- mapping Mathieu -->
> > >    &user;
> > >
> > >    <!-- mapping RushDb -->
> > >    &rushDb;
> > >
> > >
> > > ==================================
> > > repository_database_mathieu.xml
> > > ===================================
> > >
> > >    <!-- This connection is used as the default one within OJB -->
> > >    <jdbc-connection-descriptor
> > >     jcd-alias="default"
> > >     default-connection="true"
> > >     platform="Oracle9i"
> > >     jdbc-level="2.0"
> > >     driver=" oracle.jdbc.driver.OracleDriver"
> > >     protocol="jdbc"
> > >     subprotocol="oracle"
> > >     dbalias="thin:@P615-5:1521:MATHIEU"
> > >     username="xxx"
> > >     password="xxxx"
> > >     batch-mode="false"
> > >        useAutoCommit="1"
> > >        ignoreAutoCommitExceptions="false"
> > >     >
> > >
> > >
> > >
> > >        <!--
> > >            On initialization of connections the ConnectionFactory
> > change
> > > the 'autoCommit'
> > >            state dependent of the used 'useAutoCommit' setting. This
> > > doesn't work in all
> > >            situations/environments, thus for useAutoCommit="1" the
> > > ConnectionFactory does
> > >            no longer set autoCommit to true on connection creation.
> > >            To use the old behavior (OJB version 1.0.3 or earlier) set
> > this
> > > property
> > >            to 'true', then OJB change the autoCommit state (if needed)
> > of
> > >            new obtained connections at connection initialization to
> > 'true'.
> > >            If 'false' or this property is removed, OJB don't try to
> > change
> > > connection
> > >            autoCommit state at connection initialization.
> > >        -->
> > >        <attribute attribute-name="initializationCheck"
> > > attribute-value="false" />
> > >
> > >        <!-- alternative cache implementations, see docs section
> > > "Caching" -->
> > >        <object-cache
> > > class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
> > >            <!-- meaning of attributes, please see docs section
> > > "Caching" -->
> > >            <!-- common attributes -->
> > >            <attribute attribute-name="cacheExcludes"
> > attribute-value=""/>
> > >
> > >            <!-- ObjectCacheTwoLevelImpl attributes -->
> > >            <attribute attribute-name="applicationCache"
> > > attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
> > >            <attribute attribute-name="copyStrategy"
> > > attribute-value="
> > org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> > > ategyImpl"/>
> > >            <attribute attribute-name="forceProxies"
> > > attribute-value="false"/>
> > >
> > >            <!-- ObjectCacheDefaultImpl attributes -->
> > >            <attribute attribute-name="timeout" attribute-value="900"/>
> > >            <attribute attribute-name="autoSync"
> > attribute-value="true"/>
> > >            <attribute attribute-name="cachingKeyType"
> > attribute-value="0"/>
> > >            <attribute attribute-name="useSoftReferences"
> > > attribute-value="true"/>
> > >        </object-cache>
> > >
> > >        <!-- For more info, see section "Connection Handling" in docs
> > -->
> > >        <connection-pool
> > >            maxActive="30"
> > >            validationQuery=""
> > >            testOnBorrow="true"
> > >            testOnReturn="false"
> > >            whenExhaustedAction="0"
> > >            maxWait="10000">
> > >
> > >            <!-- Set fetchSize to 0 to use driver's default. -->
> > >            <attribute attribute-name="fetchSize" attribute-value="0"/>
> > >
> > >            <!-- Attributes with name prefix "jdbc." are passed
> > directly to
> > > the JDBC driver. -->
> > >            <!-- Example setting (used by Oracle driver when Statement
> > > batching is enabled) -->
> > >            <attribute attribute-name="jdbc.defaultBatchValue "
> > > attribute-value="5"/>
> > >
> > >            <!-- Attributes determining if ConnectionFactoryDBCPImpl
> > >                 should also pool PreparedStatement. This is
> > > programmatically disabled
> > >                 when using platform=Oracle9i since Oracle statement
> > caching
> > > will conflict
> > >                 with DBCP ObjectPool-based PreparepdStatement caching
> > (ie
> > > setting true
> > >                 here has no effect for Oracle9i platform). -->
> > >            <attribute attribute-name="dbcp.poolPreparedStatements"
> > > attribute-value="false"/>
> > >            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> > > attribute-value="10"/>
> > >            <!-- Attribute determining if the Commons DBCP connection
> > > wrapper will allow
> > >                 access to the underlying concrete Connection instance
> > from
> > > the JDBC-driver
> > >                 (normally this is not allowed, like in J2EE-containers
> > > using wrappers). -->
> > >            <attribute
> > > attribute-name="dbcp.accessToUnderlyingConnectionAllowed "
> > > attribute-value="false"/>
> > >        </connection-pool>
> > >
> > >  <sequence-manager
> > > className="
> > org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
> > >  <attribute attribute-name="autoNaming" attribute-value="true"/>
> > >  </sequence-manager>
> > >
> > >   </jdbc-connection-descriptor>
> > >
> > >   <!-- Datasource example -->
> > >    <!-- jdbc-connection-descriptor
> > >        jcd-alias="default"
> > >        default-connection="true"
> > >     platform="Hsqldb"
> > >     jdbc-level="2.0"
> > >     jndi-datasource-name="java:DefaultDS"
> > >     username="sa"
> > >     password=""
> > >        batch-mode="false"
> > >        useAutoCommit="0"
> > >        ignoreAutoCommitExceptions="false"
> > >   >
> > >        Add the other elements like object-cache, connection-pool,
> > > sequence-manager here.
> > >
> > >   </jdbc-connection-descriptor -->
> > >
> > > ==============================================
> > > repository_database_rushDb.xml
> > > ==============================================
> > >
> > >
> > >    <!-- This connection is used as the default one within OJB -->
> > >    <jdbc-connection-descriptor
> > >     jcd-alias="rushDb"
> > >     default-connection="false"
> > >     platform="MsSQLServer"
> > >     jdbc-level="2.0"
> > >     driver=" com.microsoft.jdbc.sqlserver.SQLServerDriver"
> > >     protocol="JDBC"
> > >     subprotocol="microsoft:sqlserver"
> > >     dbalias="//xxx.x.x.x:xxxx"
> > >     username="xxx"
> > >     password="xxxx"
> > >     batch-mode="true"
> > >        useAutoCommit="0"
> > >        ignoreAutoCommitExceptions="true"
> > >     >
> > >
> > >        <!--
> > >            On initialization of connections the ConnectionFactory
> > change
> > > the 'autoCommit'
> > >            state dependent of the used 'useAutoCommit' setting. This
> > > doesn't work in all
> > >            situations/environments, thus for useAutoCommit="1" the
> > > ConnectionFactory does
> > >            no longer set autoCommit to true on connection creation.
> > >            To use the old behavior (OJB version 1.0.3 or earlier) set
> > this
> > > property
> > >            to 'true', then OJB change the autoCommit state (if needed)
> > of
> > >            new obtained connections at connection initialization to
> > 'true'.
> > >            If 'false' or this property is removed, OJB don't try to
> > change
> > > connection
> > >            autoCommit state at connection initialization.
> > >        -->
> > >        <attribute attribute-name="initializationCheck"
> > > attribute-value="false" />
> > >
> > >        <!-- alternative cache implementations, see docs section
> > > "Caching" -->
> > >        <object-cache
> > > class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
> > >            <!-- meaning of attributes, please see docs section
> > > "Caching" -->
> > >            <!-- common attributes -->
> > >            <attribute attribute-name="cacheExcludes"
> > attribute-value=""/>
> > >
> > >            <!-- ObjectCacheTwoLevelImpl attributes -->
> > >            <attribute attribute-name="applicationCache"
> > > attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
> > >            <attribute attribute-name="copyStrategy"
> > > attribute-value="
> > org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> > > ategyImpl"/>
> > >            <attribute attribute-name="forceProxies"
> > > attribute-value="false"/>
> > >
> > >            <!-- ObjectCacheDefaultImpl attributes -->
> > >            <attribute attribute-name="timeout" attribute-value="900"/>
> > >            <attribute attribute-name="autoSync"
> > attribute-value="true"/>
> > >            <attribute attribute-name="cachingKeyType"
> > attribute-value="0"/>
> > >            <attribute attribute-name="useSoftReferences"
> > > attribute-value="true"/>
> > >        </object-cache>
> > >
> > >        <!-- For more info, see section "Connection Handling" in docs
> > -->
> > >        <connection-pool
> > >            maxActive="30"
> > >            validationQuery=""
> > >            testOnBorrow="true"
> > >            testOnReturn="false"
> > >            whenExhaustedAction="0"
> > >            maxWait="10000">
> > >
> > >            <!-- Set fetchSize to 0 to use driver's default. -->
> > >            <attribute attribute-name="fetchSize" attribute-value="0"/>
> > >
> > >            <!-- Attributes with name prefix "jdbc." are passed
> > directly to
> > > the JDBC driver. -->
> > >            <!-- Example setting (used by Oracle driver when Statement
> > > batching is enabled) -->
> > >            <attribute attribute-name="jdbc.defaultBatchValue "
> > > attribute-value="5"/>
> > >
> > >            <!-- Attributes determining if ConnectionFactoryDBCPImpl
> > >                 should also pool PreparedStatement. This is
> > > programmatically disabled
> > >                 when using platform=Oracle9i since Oracle statement
> > caching
> > > will conflict
> > >                 with DBCP ObjectPool-based PreparepdStatement caching
> > (ie
> > > setting true
> > >                 here has no effect for Oracle9i platform). -->
> > >            <attribute attribute-name="dbcp.poolPreparedStatements"
> > > attribute-value="false"/>
> > >            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> > > attribute-value="10"/>
> > >            <!-- Attribute determining if the Commons DBCP connection
> > > wrapper will allow
> > >                 access to the underlying concrete Connection instance
> > from
> > > the JDBC-driver
> > >                 (normally this is not allowed, like in J2EE-containers
> > > using wrappers). -->
> > >            <attribute
> > > attribute-name="dbcp.accessToUnderlyingConnectionAllowed "
> > > attribute-value="false"/>
> > >        </connection-pool>
> > >
> > >        <!-- alternative sequence manager implementations, see
> > "Sequence
> > > Manager" guide -->
> > >        <sequence-manager
> > > className="
> > org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
> > >            <!-- attributes supported by SequenceManagerHighLowImpl,
> > >            SequenceManagerInMemoryImpl, SequenceManagerNextValImpl
> > >            please see "Sequence Manager" guide or/and javadoc of class
> > for
> > > more information -->
> > >            <attribute attribute-name="seq.start"
> > attribute-value="200000"/>
> > >            <attribute attribute-name="autoNaming"
> > attribute-value="true"/>
> > >
> > >            <!-- attributes supported by SequenceManagerHighLowImpl
> > >            please see "Sequence Manager" guide or/and javadoc of
> > classes
> > > for more information -->
> > >            <attribute attribute-name="grabSize" attribute-value="20"/>
> > >
> > >            <!-- optional attributes supported by
> > SequenceManagerNextValImpl
> > > (support depends
> > >            on the used database), please see "Sequence Manager" guide
> > > or/and javadoc of
> > >            classes for more information -->
> > >            <!-- attribute attribute-name=" seq.as"
> > > attribute-value="INTEGER"/ -->
> > >            <!-- attribute attribute-name="seq.incrementBy"
> > > attribute-value="1"/ -->
> > >            <!-- attribute attribute-name="seq.maxValue"
> > > attribute-value="999999999999999999999999999"/ -->
> > >            <!-- attribute attribute-name="seq.minValue"
> > > attribute-value="1"/ -->
> > >            <!-- attribute attribute-name="seq.cycle"
> > > attribute-value="false"/ -->
> > >            <!-- attribute attribute-name=" seq.cache"
> > > attribute-value="20"/ -->
> > >            <!-- attribute attribute-name="seq.order"
> > > attribute-value="false"/ -->
> > >
> > >        </sequence-manager>
> > >   </jdbc-connection-descriptor>
> > >
> > >   <!-- Datasource example -->
> > >    <!-- jdbc-connection-descriptor
> > >        jcd-alias="default"
> > >        default-connection="true"
> > >     platform="Hsqldb"
> > >     jdbc-level="2.0"
> > >     jndi-datasource-name="java:DefaultDS"
> > >     username="sa"
> > >     password=""
> > >        batch-mode="false"
> > >        useAutoCommit="0"
> > >        ignoreAutoCommitExceptions="false"
> > >   >
> > >        Add the other elements like object-cache, connection-pool,
> > > sequence-manager here.
> > >
> > >   </jdbc-connection-descriptor -->
> > >
> > >
> > >
> > >
> > > On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
> > >> On 2/3/06, Bruno CROS < bruno.cros@gmail.com> wrote:
> > >>
> > >>> i 'm afraid i need to repatch distributed torque-gen-3.1.1.jar
> >   to  have
> > >>> TIMESTAMP  jdbc type created for   java.sql.Date and
> > java.sql.timestampas i
> > >>> wrote in an old old post. (specific to oracle 9i and older )
> > >> You might want to try DdlUtils (http://db.apache.org/ddlutils )
> > instead
> > >> of Torque, it uses the same schema format and contains an Oracle9
> > (and
> > >> an Oracle10 one) platform that can use TIMESTAMP.
> > >>
> > >> Tom
> > >>
> > >> ---------------------------------------------------------------------
> >
> > >> 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
> >
> >
>

Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
Well, step by step, i hope that anything will be fine soon.

DB Connections are well mounted, thank you very much again.

So, I tested  my batch processes and i noted that log4j trace disappeared. I
think it's no so hard to resolve (just redirect to my  commons logging
setup). But the most worrying is that my first process (creation of 400
records qith 400 others each linked) canno't end, crashing in a outofmemory
error most of the time. Note that this processes is the simplest i have.

According to the notes, i modified auto-update to none. auto-delete were
already at none.
My repository have been regenerated by xdoclet Ant task. Should i consider
new repository description (that i miss) in my described collections (or
references)?

I known there something wrong. It looks like there exponential reads. But i
don't forget that i 'm creating objects from scratch. So, i get rid an
infinite read loop.

Processes were working without any trouble in 1.0.1. Except the none read
1.N relations  during  heavy load i related you last week.

I'm looking at documentation about well configuring OJB.properties, for
little batch processes and multiples objects transaction.

My setup is the one who came with ojb_blank. I'm asking me if it's

Note that my second connections (in 1.0.1 schema ) just serves me to read
only (no update, no creation). so i get rid of a problem of locking with
1.0.4 and a 1.0.1 db core.

I guess that my case is not an isolated one.

Best regards



On 2/4/06, Armin Waibel <ar...@apache.org> wrote:
>
> Hi Bruno,
>
> Bruno CROS wrote:
> > i already have patch torque3.1.1.jar. thanks for advice. I've done since
> > start with the build.xml of ojb-blank.jar (so torque).
> >
> > I have the right database generated now. That's a good point and i thank
> you
> > all.
> >
> > On the other hand, i have 2 database connections and it seems they do
> not
> > work anymore. Of course, i can't see any errors. I d'ont known how to
> spy DB
> > connections !!? shame, i known.
> >
>
> you can use p6spy
> http://db.apache.org/ojb/docu/faq.html#traceProfileSQL
>
>
> > The particularity of one of these connections is that the database has
> been
> > made with 1.0.1 OJB release.  Understand that this database is accessed
> by
> > my application, and by another one (bigger). So upgrading this DB is not
> so
> > suitable.
> >
> > nevertheless, understand too, that my application need to be connected
> to
> > those two databses, mine in 1.0.4 and the big one in 1.0.1. At the same
> time
> > of course.
> >
> > My doubts are about the repository_internal.xml ( describing OJB
> tables). If
> > these tables are not the same in the 2 DB. How could it work ??
> >
>
> Seems that the "default" connection doesn't require any of the internal
> OJB tables (if you don't use odmg named objects or the specific List/Map
> implementations).
>
> "rushDb" use SequenceManagerHighLowImpl. In this case table OJB_HL_SEQ
> is mandatory. The metadata mapping of this object/table changed between
> 1.0.1 and 1.0.4 but not the column names (one column was removed between
> 1.0.1 and 1.0.4). Thus you could try to use the "old" table with the
> 1.0.4 mapping. If this doesn't work you could drop and recreate table
> OJB_HL_SEQ (OJB will automatically take care of existing id's and
> re-populate the table).
>
> In "rushDb" you are using useAutoCommit="0". In this case it's mandatory
> that the jdbc-driver/DB disable the connection autoCommit property (else
> you will run into problems with tx-rollback).
>
> regards,
> Armin
>
>
> > You understand what i mean when you see my repository.xml file. and the
> 2
> > next files, parts of it.
> >
> > ==================
> > my repository.xml file
> > =====================
> >
> > <!ENTITY databaseMathieu SYSTEM "repository_database_mathieu.xml">
> > <!ENTITY databaseRushDb SYSTEM "repository_database_rushDb.xml">
> > <!ENTITY internal SYSTEM "repository_internal.xml">
> > <!ENTITY user SYSTEM "repository_user.xml">
> > <!ENTITY rushDb SYSTEM "repository_rushDb.xml">
> > ]>
> >
> >
> > <descriptor-repository version="1.0"
> >                       isolation-level="read-uncommitted"
> >                       proxy-prefetching-limit="50">
> >
> >
> >    <!-- connection Mathieu -->
> >    &databaseMathieu;
> >    <!-- connection rushDB -->
> >    &databaseRushDb;
> >
> >    <!-- include ojb internal mappings here; comment this if you don't
> need
> > them -->
> >    &internal;
> >
> >    <!-- mapping Mathieu -->
> >    &user;
> >
> >    <!-- mapping RushDb -->
> >    &rushDb;
> >
> >
> > ==================================
> > repository_database_mathieu.xml
> > ===================================
> >
> >    <!-- This connection is used as the default one within OJB -->
> >    <jdbc-connection-descriptor
> >     jcd-alias="default"
> >     default-connection="true"
> >     platform="Oracle9i"
> >     jdbc-level="2.0"
> >     driver="oracle.jdbc.driver.OracleDriver"
> >     protocol="jdbc"
> >     subprotocol="oracle"
> >     dbalias="thin:@P615-5:1521:MATHIEU"
> >     username="xxx"
> >     password="xxxx"
> >     batch-mode="false"
> >        useAutoCommit="1"
> >        ignoreAutoCommitExceptions="false"
> >     >
> >
> >
> >
> >        <!--
> >            On initialization of connections the ConnectionFactory change
> > the 'autoCommit'
> >            state dependent of the used 'useAutoCommit' setting. This
> > doesn't work in all
> >            situations/environments, thus for useAutoCommit="1" the
> > ConnectionFactory does
> >            no longer set autoCommit to true on connection creation.
> >            To use the old behavior (OJB version 1.0.3 or earlier) set
> this
> > property
> >            to 'true', then OJB change the autoCommit state (if needed)
> of
> >            new obtained connections at connection initialization to
> 'true'.
> >            If 'false' or this property is removed, OJB don't try to
> change
> > connection
> >            autoCommit state at connection initialization.
> >        -->
> >        <attribute attribute-name="initializationCheck"
> > attribute-value="false" />
> >
> >        <!-- alternative cache implementations, see docs section
> > "Caching" -->
> >        <object-cache
> > class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
> >            <!-- meaning of attributes, please see docs section
> > "Caching" -->
> >            <!-- common attributes -->
> >            <attribute attribute-name="cacheExcludes"
> attribute-value=""/>
> >
> >            <!-- ObjectCacheTwoLevelImpl attributes -->
> >            <attribute attribute-name="applicationCache"
> > attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
> >            <attribute attribute-name="copyStrategy"
> > attribute-value="
> org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> > ategyImpl"/>
> >            <attribute attribute-name="forceProxies"
> > attribute-value="false"/>
> >
> >            <!-- ObjectCacheDefaultImpl attributes -->
> >            <attribute attribute-name="timeout" attribute-value="900"/>
> >            <attribute attribute-name="autoSync" attribute-value="true"/>
> >            <attribute attribute-name="cachingKeyType"
> attribute-value="0"/>
> >            <attribute attribute-name="useSoftReferences"
> > attribute-value="true"/>
> >        </object-cache>
> >
> >        <!-- For more info, see section "Connection Handling" in docs -->
> >        <connection-pool
> >            maxActive="30"
> >            validationQuery=""
> >            testOnBorrow="true"
> >            testOnReturn="false"
> >            whenExhaustedAction="0"
> >            maxWait="10000">
> >
> >            <!-- Set fetchSize to 0 to use driver's default. -->
> >            <attribute attribute-name="fetchSize" attribute-value="0"/>
> >
> >            <!-- Attributes with name prefix "jdbc." are passed directly
> to
> > the JDBC driver. -->
> >            <!-- Example setting (used by Oracle driver when Statement
> > batching is enabled) -->
> >            <attribute attribute-name="jdbc.defaultBatchValue"
> > attribute-value="5"/>
> >
> >            <!-- Attributes determining if ConnectionFactoryDBCPImpl
> >                 should also pool PreparedStatement. This is
> > programmatically disabled
> >                 when using platform=Oracle9i since Oracle statement
> caching
> > will conflict
> >                 with DBCP ObjectPool-based PreparepdStatement caching
> (ie
> > setting true
> >                 here has no effect for Oracle9i platform). -->
> >            <attribute attribute-name="dbcp.poolPreparedStatements"
> > attribute-value="false"/>
> >            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> > attribute-value="10"/>
> >            <!-- Attribute determining if the Commons DBCP connection
> > wrapper will allow
> >                 access to the underlying concrete Connection instance
> from
> > the JDBC-driver
> >                 (normally this is not allowed, like in J2EE-containers
> > using wrappers). -->
> >            <attribute
> > attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
> > attribute-value="false"/>
> >        </connection-pool>
> >
> >  <sequence-manager
> > className="
> org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
> >  <attribute attribute-name="autoNaming" attribute-value="true"/>
> >  </sequence-manager>
> >
> >   </jdbc-connection-descriptor>
> >
> >   <!-- Datasource example -->
> >    <!-- jdbc-connection-descriptor
> >        jcd-alias="default"
> >        default-connection="true"
> >     platform="Hsqldb"
> >     jdbc-level="2.0"
> >     jndi-datasource-name="java:DefaultDS"
> >     username="sa"
> >     password=""
> >        batch-mode="false"
> >        useAutoCommit="0"
> >        ignoreAutoCommitExceptions="false"
> >   >
> >        Add the other elements like object-cache, connection-pool,
> > sequence-manager here.
> >
> >   </jdbc-connection-descriptor -->
> >
> > ==============================================
> > repository_database_rushDb.xml
> > ==============================================
> >
> >
> >    <!-- This connection is used as the default one within OJB -->
> >    <jdbc-connection-descriptor
> >     jcd-alias="rushDb"
> >     default-connection="false"
> >     platform="MsSQLServer"
> >     jdbc-level="2.0"
> >     driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
> >     protocol="JDBC"
> >     subprotocol="microsoft:sqlserver"
> >     dbalias="//xxx.x.x.x:xxxx"
> >     username="xxx"
> >     password="xxxx"
> >     batch-mode="true"
> >        useAutoCommit="0"
> >        ignoreAutoCommitExceptions="true"
> >     >
> >
> >        <!--
> >            On initialization of connections the ConnectionFactory change
> > the 'autoCommit'
> >            state dependent of the used 'useAutoCommit' setting. This
> > doesn't work in all
> >            situations/environments, thus for useAutoCommit="1" the
> > ConnectionFactory does
> >            no longer set autoCommit to true on connection creation.
> >            To use the old behavior (OJB version 1.0.3 or earlier) set
> this
> > property
> >            to 'true', then OJB change the autoCommit state (if needed)
> of
> >            new obtained connections at connection initialization to
> 'true'.
> >            If 'false' or this property is removed, OJB don't try to
> change
> > connection
> >            autoCommit state at connection initialization.
> >        -->
> >        <attribute attribute-name="initializationCheck"
> > attribute-value="false" />
> >
> >        <!-- alternative cache implementations, see docs section
> > "Caching" -->
> >        <object-cache
> > class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
> >            <!-- meaning of attributes, please see docs section
> > "Caching" -->
> >            <!-- common attributes -->
> >            <attribute attribute-name="cacheExcludes"
> attribute-value=""/>
> >
> >            <!-- ObjectCacheTwoLevelImpl attributes -->
> >            <attribute attribute-name="applicationCache"
> > attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
> >            <attribute attribute-name="copyStrategy"
> > attribute-value="
> org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> > ategyImpl"/>
> >            <attribute attribute-name="forceProxies"
> > attribute-value="false"/>
> >
> >            <!-- ObjectCacheDefaultImpl attributes -->
> >            <attribute attribute-name="timeout" attribute-value="900"/>
> >            <attribute attribute-name="autoSync" attribute-value="true"/>
> >            <attribute attribute-name="cachingKeyType"
> attribute-value="0"/>
> >            <attribute attribute-name="useSoftReferences"
> > attribute-value="true"/>
> >        </object-cache>
> >
> >        <!-- For more info, see section "Connection Handling" in docs -->
> >        <connection-pool
> >            maxActive="30"
> >            validationQuery=""
> >            testOnBorrow="true"
> >            testOnReturn="false"
> >            whenExhaustedAction="0"
> >            maxWait="10000">
> >
> >            <!-- Set fetchSize to 0 to use driver's default. -->
> >            <attribute attribute-name="fetchSize" attribute-value="0"/>
> >
> >            <!-- Attributes with name prefix "jdbc." are passed directly
> to
> > the JDBC driver. -->
> >            <!-- Example setting (used by Oracle driver when Statement
> > batching is enabled) -->
> >            <attribute attribute-name="jdbc.defaultBatchValue"
> > attribute-value="5"/>
> >
> >            <!-- Attributes determining if ConnectionFactoryDBCPImpl
> >                 should also pool PreparedStatement. This is
> > programmatically disabled
> >                 when using platform=Oracle9i since Oracle statement
> caching
> > will conflict
> >                 with DBCP ObjectPool-based PreparepdStatement caching
> (ie
> > setting true
> >                 here has no effect for Oracle9i platform). -->
> >            <attribute attribute-name="dbcp.poolPreparedStatements"
> > attribute-value="false"/>
> >            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> > attribute-value="10"/>
> >            <!-- Attribute determining if the Commons DBCP connection
> > wrapper will allow
> >                 access to the underlying concrete Connection instance
> from
> > the JDBC-driver
> >                 (normally this is not allowed, like in J2EE-containers
> > using wrappers). -->
> >            <attribute
> > attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
> > attribute-value="false"/>
> >        </connection-pool>
> >
> >        <!-- alternative sequence manager implementations, see "Sequence
> > Manager" guide -->
> >        <sequence-manager
> > className="
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
> >            <!-- attributes supported by SequenceManagerHighLowImpl,
> >            SequenceManagerInMemoryImpl, SequenceManagerNextValImpl
> >            please see "Sequence Manager" guide or/and javadoc of class
> for
> > more information -->
> >            <attribute attribute-name="seq.start"
> attribute-value="200000"/>
> >            <attribute attribute-name="autoNaming"
> attribute-value="true"/>
> >
> >            <!-- attributes supported by SequenceManagerHighLowImpl
> >            please see "Sequence Manager" guide or/and javadoc of classes
> > for more information -->
> >            <attribute attribute-name="grabSize" attribute-value="20"/>
> >
> >            <!-- optional attributes supported by
> SequenceManagerNextValImpl
> > (support depends
> >            on the used database), please see "Sequence Manager" guide
> > or/and javadoc of
> >            classes for more information -->
> >            <!-- attribute attribute-name="seq.as"
> > attribute-value="INTEGER"/ -->
> >            <!-- attribute attribute-name="seq.incrementBy"
> > attribute-value="1"/ -->
> >            <!-- attribute attribute-name="seq.maxValue"
> > attribute-value="999999999999999999999999999"/ -->
> >            <!-- attribute attribute-name="seq.minValue"
> > attribute-value="1"/ -->
> >            <!-- attribute attribute-name="seq.cycle"
> > attribute-value="false"/ -->
> >            <!-- attribute attribute-name="seq.cache"
> > attribute-value="20"/ -->
> >            <!-- attribute attribute-name="seq.order"
> > attribute-value="false"/ -->
> >
> >        </sequence-manager>
> >   </jdbc-connection-descriptor>
> >
> >   <!-- Datasource example -->
> >    <!-- jdbc-connection-descriptor
> >        jcd-alias="default"
> >        default-connection="true"
> >     platform="Hsqldb"
> >     jdbc-level="2.0"
> >     jndi-datasource-name="java:DefaultDS"
> >     username="sa"
> >     password=""
> >        batch-mode="false"
> >        useAutoCommit="0"
> >        ignoreAutoCommitExceptions="false"
> >   >
> >        Add the other elements like object-cache, connection-pool,
> > sequence-manager here.
> >
> >   </jdbc-connection-descriptor -->
> >
> >
> >
> >
> > On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
> >> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
> >>
> >>> i 'm afraid i need to repatch distributed torque-gen-3.1.1.jar
>   to  have
> >>> TIMESTAMP  jdbc type created for   java.sql.Date and
> java.sql.timestampas i
> >>> wrote in an old old post. (specific to oracle 9i and older )
> >> You might want to try DdlUtils (http://db.apache.org/ddlutils ) instead
> >> of Torque, it uses the same schema format and contains an Oracle9 (and
> >> an Oracle10 one) platform that can use TIMESTAMP.
> >>
> >> Tom
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>

Re: Migrating to 1.0.4

Posted by Armin Waibel <ar...@apache.org>.
Hi Bruno,

Bruno CROS wrote:
> i already have patch torque3.1.1.jar. thanks for advice. I've done since
> start with the build.xml of ojb-blank.jar (so torque).
> 
> I have the right database generated now. That's a good point and i thank you
> all.
> 
> On the other hand, i have 2 database connections and it seems they do not
> work anymore. Of course, i can't see any errors. I d'ont known how to spy DB
> connections !!? shame, i known.
> 

you can use p6spy
http://db.apache.org/ojb/docu/faq.html#traceProfileSQL


> The particularity of one of these connections is that the database has been
> made with 1.0.1 OJB release.  Understand that this database is accessed by
> my application, and by another one (bigger). So upgrading this DB is not so
> suitable.
> 
> nevertheless, understand too, that my application need to be connected to
> those two databses, mine in 1.0.4 and the big one in 1.0.1. At the same time
> of course.
> 
> My doubts are about the repository_internal.xml ( describing OJB tables). If
> these tables are not the same in the 2 DB. How could it work ??
>

Seems that the "default" connection doesn't require any of the internal 
OJB tables (if you don't use odmg named objects or the specific List/Map 
implementations).

"rushDb" use SequenceManagerHighLowImpl. In this case table OJB_HL_SEQ 
is mandatory. The metadata mapping of this object/table changed between 
1.0.1 and 1.0.4 but not the column names (one column was removed between 
1.0.1 and 1.0.4). Thus you could try to use the "old" table with the 
1.0.4 mapping. If this doesn't work you could drop and recreate table 
OJB_HL_SEQ (OJB will automatically take care of existing id's and 
re-populate the table).

In "rushDb" you are using useAutoCommit="0". In this case it's mandatory 
that the jdbc-driver/DB disable the connection autoCommit property (else 
you will run into problems with tx-rollback).

regards,
Armin


> You understand what i mean when you see my repository.xml file. and the 2
> next files, parts of it.
> 
> ==================
> my repository.xml file
> =====================
> 
> <!ENTITY databaseMathieu SYSTEM "repository_database_mathieu.xml">
> <!ENTITY databaseRushDb SYSTEM "repository_database_rushDb.xml">
> <!ENTITY internal SYSTEM "repository_internal.xml">
> <!ENTITY user SYSTEM "repository_user.xml">
> <!ENTITY rushDb SYSTEM "repository_rushDb.xml">
> ]>
> 
> 
> <descriptor-repository version="1.0"
>                       isolation-level="read-uncommitted"
>                       proxy-prefetching-limit="50">
> 
> 
>    <!-- connection Mathieu -->
>    &databaseMathieu;
>    <!-- connection rushDB -->
>    &databaseRushDb;
> 
>    <!-- include ojb internal mappings here; comment this if you don't need
> them -->
>    &internal;
> 
>    <!-- mapping Mathieu -->
>    &user;
> 
>    <!-- mapping RushDb -->
>    &rushDb;
> 
> 
> ==================================
> repository_database_mathieu.xml
> ===================================
> 
>    <!-- This connection is used as the default one within OJB -->
>    <jdbc-connection-descriptor
>     jcd-alias="default"
>     default-connection="true"
>     platform="Oracle9i"
>     jdbc-level="2.0"
>     driver="oracle.jdbc.driver.OracleDriver"
>     protocol="jdbc"
>     subprotocol="oracle"
>     dbalias="thin:@P615-5:1521:MATHIEU"
>     username="xxx"
>     password="xxxx"
>     batch-mode="false"
>        useAutoCommit="1"
>        ignoreAutoCommitExceptions="false"
>     >
> 
> 
> 
>        <!--
>            On initialization of connections the ConnectionFactory change
> the 'autoCommit'
>            state dependent of the used 'useAutoCommit' setting. This
> doesn't work in all
>            situations/environments, thus for useAutoCommit="1" the
> ConnectionFactory does
>            no longer set autoCommit to true on connection creation.
>            To use the old behavior (OJB version 1.0.3 or earlier) set this
> property
>            to 'true', then OJB change the autoCommit state (if needed) of
>            new obtained connections at connection initialization to 'true'.
>            If 'false' or this property is removed, OJB don't try to change
> connection
>            autoCommit state at connection initialization.
>        -->
>        <attribute attribute-name="initializationCheck"
> attribute-value="false" />
> 
>        <!-- alternative cache implementations, see docs section
> "Caching" -->
>        <object-cache
> class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
>            <!-- meaning of attributes, please see docs section
> "Caching" -->
>            <!-- common attributes -->
>            <attribute attribute-name="cacheExcludes" attribute-value=""/>
> 
>            <!-- ObjectCacheTwoLevelImpl attributes -->
>            <attribute attribute-name="applicationCache"
> attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
>            <attribute attribute-name="copyStrategy"
> attribute-value="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> ategyImpl"/>
>            <attribute attribute-name="forceProxies"
> attribute-value="false"/>
> 
>            <!-- ObjectCacheDefaultImpl attributes -->
>            <attribute attribute-name="timeout" attribute-value="900"/>
>            <attribute attribute-name="autoSync" attribute-value="true"/>
>            <attribute attribute-name="cachingKeyType" attribute-value="0"/>
>            <attribute attribute-name="useSoftReferences"
> attribute-value="true"/>
>        </object-cache>
> 
>        <!-- For more info, see section "Connection Handling" in docs -->
>        <connection-pool
>            maxActive="30"
>            validationQuery=""
>            testOnBorrow="true"
>            testOnReturn="false"
>            whenExhaustedAction="0"
>            maxWait="10000">
> 
>            <!-- Set fetchSize to 0 to use driver's default. -->
>            <attribute attribute-name="fetchSize" attribute-value="0"/>
> 
>            <!-- Attributes with name prefix "jdbc." are passed directly to
> the JDBC driver. -->
>            <!-- Example setting (used by Oracle driver when Statement
> batching is enabled) -->
>            <attribute attribute-name="jdbc.defaultBatchValue"
> attribute-value="5"/>
> 
>            <!-- Attributes determining if ConnectionFactoryDBCPImpl
>                 should also pool PreparedStatement. This is
> programmatically disabled
>                 when using platform=Oracle9i since Oracle statement caching
> will conflict
>                 with DBCP ObjectPool-based PreparepdStatement caching (ie
> setting true
>                 here has no effect for Oracle9i platform). -->
>            <attribute attribute-name="dbcp.poolPreparedStatements"
> attribute-value="false"/>
>            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> attribute-value="10"/>
>            <!-- Attribute determining if the Commons DBCP connection
> wrapper will allow
>                 access to the underlying concrete Connection instance from
> the JDBC-driver
>                 (normally this is not allowed, like in J2EE-containers
> using wrappers). -->
>            <attribute
> attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
> attribute-value="false"/>
>        </connection-pool>
> 
>  <sequence-manager
> className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
>  <attribute attribute-name="autoNaming" attribute-value="true"/>
>  </sequence-manager>
> 
>   </jdbc-connection-descriptor>
> 
>   <!-- Datasource example -->
>    <!-- jdbc-connection-descriptor
>        jcd-alias="default"
>        default-connection="true"
>     platform="Hsqldb"
>     jdbc-level="2.0"
>     jndi-datasource-name="java:DefaultDS"
>     username="sa"
>     password=""
>        batch-mode="false"
>        useAutoCommit="0"
>        ignoreAutoCommitExceptions="false"
>   >
>        Add the other elements like object-cache, connection-pool,
> sequence-manager here.
> 
>   </jdbc-connection-descriptor -->
> 
> ==============================================
> repository_database_rushDb.xml
> ==============================================
> 
> 
>    <!-- This connection is used as the default one within OJB -->
>    <jdbc-connection-descriptor
>     jcd-alias="rushDb"
>     default-connection="false"
>     platform="MsSQLServer"
>     jdbc-level="2.0"
>     driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
>     protocol="JDBC"
>     subprotocol="microsoft:sqlserver"
>     dbalias="//xxx.x.x.x:xxxx"
>     username="xxx"
>     password="xxxx"
>     batch-mode="true"
>        useAutoCommit="0"
>        ignoreAutoCommitExceptions="true"
>     >
> 
>        <!--
>            On initialization of connections the ConnectionFactory change
> the 'autoCommit'
>            state dependent of the used 'useAutoCommit' setting. This
> doesn't work in all
>            situations/environments, thus for useAutoCommit="1" the
> ConnectionFactory does
>            no longer set autoCommit to true on connection creation.
>            To use the old behavior (OJB version 1.0.3 or earlier) set this
> property
>            to 'true', then OJB change the autoCommit state (if needed) of
>            new obtained connections at connection initialization to 'true'.
>            If 'false' or this property is removed, OJB don't try to change
> connection
>            autoCommit state at connection initialization.
>        -->
>        <attribute attribute-name="initializationCheck"
> attribute-value="false" />
> 
>        <!-- alternative cache implementations, see docs section
> "Caching" -->
>        <object-cache
> class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
>            <!-- meaning of attributes, please see docs section
> "Caching" -->
>            <!-- common attributes -->
>            <attribute attribute-name="cacheExcludes" attribute-value=""/>
> 
>            <!-- ObjectCacheTwoLevelImpl attributes -->
>            <attribute attribute-name="applicationCache"
> attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
>            <attribute attribute-name="copyStrategy"
> attribute-value="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> ategyImpl"/>
>            <attribute attribute-name="forceProxies"
> attribute-value="false"/>
> 
>            <!-- ObjectCacheDefaultImpl attributes -->
>            <attribute attribute-name="timeout" attribute-value="900"/>
>            <attribute attribute-name="autoSync" attribute-value="true"/>
>            <attribute attribute-name="cachingKeyType" attribute-value="0"/>
>            <attribute attribute-name="useSoftReferences"
> attribute-value="true"/>
>        </object-cache>
> 
>        <!-- For more info, see section "Connection Handling" in docs -->
>        <connection-pool
>            maxActive="30"
>            validationQuery=""
>            testOnBorrow="true"
>            testOnReturn="false"
>            whenExhaustedAction="0"
>            maxWait="10000">
> 
>            <!-- Set fetchSize to 0 to use driver's default. -->
>            <attribute attribute-name="fetchSize" attribute-value="0"/>
> 
>            <!-- Attributes with name prefix "jdbc." are passed directly to
> the JDBC driver. -->
>            <!-- Example setting (used by Oracle driver when Statement
> batching is enabled) -->
>            <attribute attribute-name="jdbc.defaultBatchValue"
> attribute-value="5"/>
> 
>            <!-- Attributes determining if ConnectionFactoryDBCPImpl
>                 should also pool PreparedStatement. This is
> programmatically disabled
>                 when using platform=Oracle9i since Oracle statement caching
> will conflict
>                 with DBCP ObjectPool-based PreparepdStatement caching (ie
> setting true
>                 here has no effect for Oracle9i platform). -->
>            <attribute attribute-name="dbcp.poolPreparedStatements"
> attribute-value="false"/>
>            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> attribute-value="10"/>
>            <!-- Attribute determining if the Commons DBCP connection
> wrapper will allow
>                 access to the underlying concrete Connection instance from
> the JDBC-driver
>                 (normally this is not allowed, like in J2EE-containers
> using wrappers). -->
>            <attribute
> attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
> attribute-value="false"/>
>        </connection-pool>
> 
>        <!-- alternative sequence manager implementations, see "Sequence
> Manager" guide -->
>        <sequence-manager
> className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
>            <!-- attributes supported by SequenceManagerHighLowImpl,
>            SequenceManagerInMemoryImpl, SequenceManagerNextValImpl
>            please see "Sequence Manager" guide or/and javadoc of class for
> more information -->
>            <attribute attribute-name="seq.start" attribute-value="200000"/>
>            <attribute attribute-name="autoNaming" attribute-value="true"/>
> 
>            <!-- attributes supported by SequenceManagerHighLowImpl
>            please see "Sequence Manager" guide or/and javadoc of classes
> for more information -->
>            <attribute attribute-name="grabSize" attribute-value="20"/>
> 
>            <!-- optional attributes supported by SequenceManagerNextValImpl
> (support depends
>            on the used database), please see "Sequence Manager" guide
> or/and javadoc of
>            classes for more information -->
>            <!-- attribute attribute-name="seq.as"
> attribute-value="INTEGER"/ -->
>            <!-- attribute attribute-name="seq.incrementBy"
> attribute-value="1"/ -->
>            <!-- attribute attribute-name="seq.maxValue"
> attribute-value="999999999999999999999999999"/ -->
>            <!-- attribute attribute-name="seq.minValue"
> attribute-value="1"/ -->
>            <!-- attribute attribute-name="seq.cycle"
> attribute-value="false"/ -->
>            <!-- attribute attribute-name="seq.cache"
> attribute-value="20"/ -->
>            <!-- attribute attribute-name="seq.order"
> attribute-value="false"/ -->
> 
>        </sequence-manager>
>   </jdbc-connection-descriptor>
> 
>   <!-- Datasource example -->
>    <!-- jdbc-connection-descriptor
>        jcd-alias="default"
>        default-connection="true"
>     platform="Hsqldb"
>     jdbc-level="2.0"
>     jndi-datasource-name="java:DefaultDS"
>     username="sa"
>     password=""
>        batch-mode="false"
>        useAutoCommit="0"
>        ignoreAutoCommitExceptions="false"
>   >
>        Add the other elements like object-cache, connection-pool,
> sequence-manager here.
> 
>   </jdbc-connection-descriptor -->
> 
> 
> 
> 
> On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
>> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
>>
>>> i 'm afraid i need to repatch distributed torque-gen-3.1.1.jar  to  have
>>> TIMESTAMP  jdbc type created for   java.sql.Date and java.sql.timestampas i
>>> wrote in an old old post. (specific to oracle 9i and older )
>> You might want to try DdlUtils (http://db.apache.org/ddlutils ) instead
>> of Torque, it uses the same schema format and contains an Oracle9 (and
>> an Oracle10 one) platform that can use TIMESTAMP.
>>
>> Tom
>>
>> ---------------------------------------------------------------------
>> 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


Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
Note that my OJB_DMAP_ENTRIES has not been created !!



On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
>
> i already have patch torque3.1.1.jar. thanks for advice. I've done since
> start with the build.xml of ojb-blank.jar (so torque).
>
> I have the right database generated now. That's a good point and i thank
> you all.
>
> On the other hand, i have 2 database connections and it seems they do not
> work anymore. Of course, i can't see any errors. I d'ont known how to spy DB
> connections !!? shame, i known.
>
> The particularity of one of these connections is that the database has
> been made with 1.0.1 OJB release.  Understand that this database is
> accessed by my application, and by another one (bigger). So upgrading this
> DB is not so suitable.
>
> nevertheless, understand too, that my application need to be connected to
> those two databses, mine in 1.0.4 and the big one in 1.0.1. At the same
> time of course.
>
> My doubts are about the repository_internal.xml ( describing OJB tables).
> If these tables are not the same in the 2 DB. How could it work ??
>
> You understand what i mean when you see my repository.xml file. and the 2
> next files, parts of it.
>
> ==================
> my repository.xml file
> =====================
>
> <!ENTITY databaseMathieu SYSTEM "repository_database_mathieu.xml">
> <!ENTITY databaseRushDb SYSTEM "repository_database_rushDb.xml">
> <!ENTITY internal SYSTEM "repository_internal.xml">
> <!ENTITY user SYSTEM "repository_user.xml">
> <!ENTITY rushDb SYSTEM "repository_rushDb.xml">
> ]>
>
>
> <descriptor-repository version="1.0"
>                       isolation-level="read-uncommitted"
>                       proxy-prefetching-limit="50">
>
>
>    <!-- connection Mathieu -->
>    &databaseMathieu;
>    <!-- connection rushDB -->
>    &databaseRushDb;
>
>    <!-- include ojb internal mappings here; comment this if you don't need
> them -->
>    &internal;
>
>    <!-- mapping Mathieu -->
>    &user;
>
>    <!-- mapping RushDb -->
>    &rushDb;
>
>
> ==================================
> repository_database_mathieu.xml
> ===================================
>
>    <!-- This connection is used as the default one within OJB -->
>    <jdbc-connection-descriptor
>     jcd-alias="default"
>     default-connection="true"
>     platform="Oracle9i"
>     jdbc-level="2.0"
>     driver="oracle.jdbc.driver.OracleDriver"
>     protocol="jdbc"
>     subprotocol="oracle"
>     dbalias="thin:@P615-5:1521:MATHIEU"
>     username="xxx"
>     password="xxxx"
>     batch-mode="false"
>        useAutoCommit="1"
>        ignoreAutoCommitExceptions="false"
>     >
>
>
>
>        <!--
>            On initialization of connections the ConnectionFactory change
> the 'autoCommit'
>            state dependent of the used 'useAutoCommit' setting. This
> doesn't work in all
>            situations/environments, thus for useAutoCommit="1" the
> ConnectionFactory does
>            no longer set autoCommit to true on connection creation.
>            To use the old behavior (OJB version 1.0.3 or earlier) set this
> property
>            to 'true', then OJB change the autoCommit state (if needed) of
>            new obtained connections at connection initialization to
> 'true'.
>            If 'false' or this property is removed, OJB don't try to change
>
> connection
>            autoCommit state at connection initialization.
>        -->
>        <attribute attribute-name="initializationCheck"
> attribute-value="false" />
>
>        <!-- alternative cache implementations, see docs section
> "Caching" -->
>        <object-cache
> class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
>            <!-- meaning of attributes, please see docs section
> "Caching" -->
>            <!-- common attributes -->
>            <attribute attribute-name="cacheExcludes" attribute-value=""/>
>
>            <!-- ObjectCacheTwoLevelImpl attributes -->
>            <attribute attribute-name="applicationCache"
> attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
>            <attribute attribute-name="copyStrategy"
> attribute-value="
> org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> ategyImpl"/>
>            <attribute attribute-name="forceProxies"
> attribute-value="false"/>
>
>            <!-- ObjectCacheDefaultImpl attributes -->
>            <attribute attribute-name="timeout" attribute-value="900"/>
>            <attribute attribute-name="autoSync" attribute-value="true"/>
>            <attribute attribute-name="cachingKeyType"
> attribute-value="0"/>
>            <attribute attribute-name="useSoftReferences"
> attribute-value="true"/>
>        </object-cache>
>
>        <!-- For more info, see section "Connection Handling" in docs -->
>        <connection-pool
>            maxActive="30"
>            validationQuery=""
>            testOnBorrow="true"
>            testOnReturn="false"
>            whenExhaustedAction="0"
>            maxWait="10000">
>
>            <!-- Set fetchSize to 0 to use driver's default. -->
>            <attribute attribute-name="fetchSize" attribute-value="0"/>
>
>            <!-- Attributes with name prefix "jdbc." are passed directly to
> the JDBC driver. -->
>            <!-- Example setting (used by Oracle driver when Statement
> batching is enabled) -->
>            <attribute attribute-name="jdbc.defaultBatchValue"
> attribute-value="5"/>
>
>            <!-- Attributes determining if ConnectionFactoryDBCPImpl
>                 should also pool PreparedStatement. This is
> programmatically disabled
>                 when using platform=Oracle9i since Oracle statement
> caching
> will conflict
>                 with DBCP ObjectPool-based PreparepdStatement caching (ie
> setting true
>                 here has no effect for Oracle9i platform). -->
>            <attribute attribute-name=" dbcp.poolPreparedStatements"
> attribute-value="false"/>
>            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> attribute-value="10"/>
>            <!-- Attribute determining if the Commons DBCP connection
> wrapper will allow
>                 access to the underlying concrete Connection instance from
> the JDBC-driver
>                 (normally this is not allowed, like in J2EE-containers
> using wrappers). -->
>            <attribute
> attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
> attribute-value="false"/>
>        </connection-pool>
>
>  <sequence-manager
> className=" org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl
> ">
>  <attribute attribute-name="autoNaming" attribute-value="true"/>
>  </sequence-manager>
>
>   </jdbc-connection-descriptor>
>
>   <!-- Datasource example -->
>    <!-- jdbc-connection-descriptor
>        jcd-alias="default"
>        default-connection="true"
>     platform="Hsqldb"
>     jdbc-level=" 2.0"
>     jndi-datasource-name="java:DefaultDS"
>     username="sa"
>     password=""
>        batch-mode="false"
>        useAutoCommit="0"
>        ignoreAutoCommitExceptions="false"
>   >
>        Add the other elements like object-cache, connection-pool,
> sequence-manager here.
>
>   </jdbc-connection-descriptor -->
>
> ==============================================
> repository_database_rushDb.xml
> ==============================================
>
>
>    <!-- This connection is used as the default one within OJB -->
>    <jdbc-connection-descriptor
>     jcd-alias="rushDb"
>     default-connection="false"
>     platform="MsSQLServer"
>     jdbc-level="2.0"
>     driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
>     protocol="JDBC"
>     subprotocol="microsoft:sqlserver"
>     dbalias="//xxx.x.x.x:xxxx"
>     username="xxx"
>     password="xxxx"
>     batch-mode="true"
>        useAutoCommit="0"
>        ignoreAutoCommitExceptions="true"
>     >
>
>        <!--
>            On initialization of connections the ConnectionFactory change
> the 'autoCommit'
>            state dependent of the used 'useAutoCommit' setting. This
> doesn't work in all
>            situations/environments, thus for useAutoCommit="1" the
> ConnectionFactory does
>            no longer set autoCommit to true on connection creation.
>            To use the old behavior (OJB version 1.0.3 or earlier) set this
> property
>            to 'true', then OJB change the autoCommit state (if needed) of
>            new obtained connections at connection initialization to
> 'true'.
>            If 'false' or this property is removed, OJB don't try to change
>
> connection
>            autoCommit state at connection initialization.
>        -->
>        <attribute attribute-name="initializationCheck"
> attribute-value="false" />
>
>        <!-- alternative cache implementations, see docs section
> "Caching" -->
>        <object-cache
> class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
>            <!-- meaning of attributes, please see docs section
> "Caching" -->
>            <!-- common attributes -->
>            <attribute attribute-name="cacheExcludes" attribute-value=""/>
>
>            <!-- ObjectCacheTwoLevelImpl attributes -->
>            <attribute attribute-name="applicationCache"
> attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
>            <attribute attribute-name="copyStrategy"
> attribute-value="
> org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
> ategyImpl"/>
>            <attribute attribute-name="forceProxies"
> attribute-value="false"/>
>
>            <!-- ObjectCacheDefaultImpl attributes -->
>            <attribute attribute-name="timeout" attribute-value="900"/>
>            <attribute attribute-name="autoSync" attribute-value="true"/>
>            <attribute attribute-name="cachingKeyType"
> attribute-value="0"/>
>            <attribute attribute-name="useSoftReferences"
> attribute-value="true"/>
>        </object-cache>
>
>        <!-- For more info, see section "Connection Handling" in docs -->
>        <connection-pool
>            maxActive="30"
>            validationQuery=""
>            testOnBorrow="true"
>            testOnReturn="false"
>            whenExhaustedAction="0"
>            maxWait="10000">
>
>            <!-- Set fetchSize to 0 to use driver's default. -->
>            <attribute attribute-name="fetchSize" attribute-value="0"/>
>
>            <!-- Attributes with name prefix "jdbc." are passed directly to
> the JDBC driver. -->
>            <!-- Example setting (used by Oracle driver when Statement
> batching is enabled) -->
>            <attribute attribute-name="jdbc.defaultBatchValue"
> attribute-value="5"/>
>
>            <!-- Attributes determining if ConnectionFactoryDBCPImpl
>                 should also pool PreparedStatement. This is
> programmatically disabled
>                 when using platform=Oracle9i since Oracle statement
> caching
> will conflict
>                 with DBCP ObjectPool-based PreparepdStatement caching (ie
> setting true
>                 here has no effect for Oracle9i platform). -->
>            <attribute attribute-name=" dbcp.poolPreparedStatements"
> attribute-value="false"/>
>            <attribute attribute-name="dbcp.maxOpenPreparedStatements"
> attribute-value="10"/>
>            <!-- Attribute determining if the Commons DBCP connection
> wrapper will allow
>                 access to the underlying concrete Connection instance from
> the JDBC-driver
>                 (normally this is not allowed, like in J2EE-containers
> using wrappers). -->
>            <attribute
> attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
> attribute-value="false"/>
>        </connection-pool>
>
>        <!-- alternative sequence manager implementations, see "Sequence
> Manager" guide -->
>        <sequence-manager
> className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl
> ">
>            <!-- attributes supported by SequenceManagerHighLowImpl,
>            SequenceManagerInMemoryImpl, SequenceManagerNextValImpl
>            please see "Sequence Manager" guide or/and javadoc of class for
> more information -->
>            <attribute attribute-name=" seq.start"
> attribute-value="200000"/>
>            <attribute attribute-name="autoNaming" attribute-value="true"/>
>
>            <!-- attributes supported by SequenceManagerHighLowImpl
>            please see "Sequence Manager" guide or/and javadoc of classes
> for more information -->
>            <attribute attribute-name="grabSize" attribute-value="20"/>
>
>            <!-- optional attributes supported by
> SequenceManagerNextValImpl
> (support depends
>            on the used database), please see "Sequence Manager" guide
> or/and javadoc of
>            classes for more information -->
>            <!-- attribute attribute-name="seq.as"
> attribute-value="INTEGER"/ -->
>            <!-- attribute attribute-name=" seq.incrementBy"
> attribute-value="1"/ -->
>            <!-- attribute attribute-name="seq.maxValue"
> attribute-value="999999999999999999999999999"/ -->
>            <!-- attribute attribute-name=" seq.minValue"
> attribute-value="1"/ -->
>            <!-- attribute attribute-name="seq.cycle"
> attribute-value="false"/ -->
>            <!-- attribute attribute-name=" seq.cache"
> attribute-value="20"/ -->
>            <!-- attribute attribute-name="seq.order"
> attribute-value="false"/ -->
>
>        </sequence-manager>
>   </jdbc-connection-descriptor>
>
>   <!-- Datasource example -->
>    <!-- jdbc-connection-descriptor
>        jcd-alias="default"
>        default-connection="true"
>     platform="Hsqldb"
>     jdbc-level=" 2.0"
>     jndi-datasource-name="java:DefaultDS"
>     username="sa"
>     password=""
>        batch-mode="false"
>        useAutoCommit="0"
>        ignoreAutoCommitExceptions="false"
>   >
>        Add the other elements like object-cache, connection-pool,
> sequence-manager here.
>
>   </jdbc-connection-descriptor -->
>
>
>
>
> On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
> >
> > On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
> >
> > > i 'm afraid i need to repatch distributed torque-gen-3.1.1.jar
> >   to  have
> > > TIMESTAMP  jdbc type created for   java.sql.Date and
> > java.sql.timestamp as i
> > > wrote in an old old post. (specific to oracle 9i and older )
> >
> > You might want to try DdlUtils ( http://db.apache.org/ddlutils ) instead
> > of Torque, it uses the same schema format and contains an Oracle9 (and
> > an Oracle10 one) platform that can use TIMESTAMP.
> >
> > Tom
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
>

Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
i already have patch torque3.1.1.jar. thanks for advice. I've done since
start with the build.xml of ojb-blank.jar (so torque).

I have the right database generated now. That's a good point and i thank you
all.

On the other hand, i have 2 database connections and it seems they do not
work anymore. Of course, i can't see any errors. I d'ont known how to spy DB
connections !!? shame, i known.

The particularity of one of these connections is that the database has been
made with 1.0.1 OJB release.  Understand that this database is accessed by
my application, and by another one (bigger). So upgrading this DB is not so
suitable.

nevertheless, understand too, that my application need to be connected to
those two databses, mine in 1.0.4 and the big one in 1.0.1. At the same time
of course.

My doubts are about the repository_internal.xml ( describing OJB tables). If
these tables are not the same in the 2 DB. How could it work ??

You understand what i mean when you see my repository.xml file. and the 2
next files, parts of it.

==================
my repository.xml file
=====================

<!ENTITY databaseMathieu SYSTEM "repository_database_mathieu.xml">
<!ENTITY databaseRushDb SYSTEM "repository_database_rushDb.xml">
<!ENTITY internal SYSTEM "repository_internal.xml">
<!ENTITY user SYSTEM "repository_user.xml">
<!ENTITY rushDb SYSTEM "repository_rushDb.xml">
]>


<descriptor-repository version="1.0"
                      isolation-level="read-uncommitted"
                      proxy-prefetching-limit="50">


   <!-- connection Mathieu -->
   &databaseMathieu;
   <!-- connection rushDB -->
   &databaseRushDb;

   <!-- include ojb internal mappings here; comment this if you don't need
them -->
   &internal;

   <!-- mapping Mathieu -->
   &user;

   <!-- mapping RushDb -->
   &rushDb;


==================================
repository_database_mathieu.xml
===================================

   <!-- This connection is used as the default one within OJB -->
   <jdbc-connection-descriptor
    jcd-alias="default"
    default-connection="true"
    platform="Oracle9i"
    jdbc-level="2.0"
    driver="oracle.jdbc.driver.OracleDriver"
    protocol="jdbc"
    subprotocol="oracle"
    dbalias="thin:@P615-5:1521:MATHIEU"
    username="xxx"
    password="xxxx"
    batch-mode="false"
       useAutoCommit="1"
       ignoreAutoCommitExceptions="false"
    >



       <!--
           On initialization of connections the ConnectionFactory change
the 'autoCommit'
           state dependent of the used 'useAutoCommit' setting. This
doesn't work in all
           situations/environments, thus for useAutoCommit="1" the
ConnectionFactory does
           no longer set autoCommit to true on connection creation.
           To use the old behavior (OJB version 1.0.3 or earlier) set this
property
           to 'true', then OJB change the autoCommit state (if needed) of
           new obtained connections at connection initialization to 'true'.
           If 'false' or this property is removed, OJB don't try to change
connection
           autoCommit state at connection initialization.
       -->
       <attribute attribute-name="initializationCheck"
attribute-value="false" />

       <!-- alternative cache implementations, see docs section
"Caching" -->
       <object-cache
class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
           <!-- meaning of attributes, please see docs section
"Caching" -->
           <!-- common attributes -->
           <attribute attribute-name="cacheExcludes" attribute-value=""/>

           <!-- ObjectCacheTwoLevelImpl attributes -->
           <attribute attribute-name="applicationCache"
attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
           <attribute attribute-name="copyStrategy"
attribute-value="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
ategyImpl"/>
           <attribute attribute-name="forceProxies"
attribute-value="false"/>

           <!-- ObjectCacheDefaultImpl attributes -->
           <attribute attribute-name="timeout" attribute-value="900"/>
           <attribute attribute-name="autoSync" attribute-value="true"/>
           <attribute attribute-name="cachingKeyType" attribute-value="0"/>
           <attribute attribute-name="useSoftReferences"
attribute-value="true"/>
       </object-cache>

       <!-- For more info, see section "Connection Handling" in docs -->
       <connection-pool
           maxActive="30"
           validationQuery=""
           testOnBorrow="true"
           testOnReturn="false"
           whenExhaustedAction="0"
           maxWait="10000">

           <!-- Set fetchSize to 0 to use driver's default. -->
           <attribute attribute-name="fetchSize" attribute-value="0"/>

           <!-- Attributes with name prefix "jdbc." are passed directly to
the JDBC driver. -->
           <!-- Example setting (used by Oracle driver when Statement
batching is enabled) -->
           <attribute attribute-name="jdbc.defaultBatchValue"
attribute-value="5"/>

           <!-- Attributes determining if ConnectionFactoryDBCPImpl
                should also pool PreparedStatement. This is
programmatically disabled
                when using platform=Oracle9i since Oracle statement caching
will conflict
                with DBCP ObjectPool-based PreparepdStatement caching (ie
setting true
                here has no effect for Oracle9i platform). -->
           <attribute attribute-name="dbcp.poolPreparedStatements"
attribute-value="false"/>
           <attribute attribute-name="dbcp.maxOpenPreparedStatements"
attribute-value="10"/>
           <!-- Attribute determining if the Commons DBCP connection
wrapper will allow
                access to the underlying concrete Connection instance from
the JDBC-driver
                (normally this is not allowed, like in J2EE-containers
using wrappers). -->
           <attribute
attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
attribute-value="false"/>
       </connection-pool>

 <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
 <attribute attribute-name="autoNaming" attribute-value="true"/>
 </sequence-manager>

  </jdbc-connection-descriptor>

  <!-- Datasource example -->
   <!-- jdbc-connection-descriptor
       jcd-alias="default"
       default-connection="true"
    platform="Hsqldb"
    jdbc-level="2.0"
    jndi-datasource-name="java:DefaultDS"
    username="sa"
    password=""
       batch-mode="false"
       useAutoCommit="0"
       ignoreAutoCommitExceptions="false"
  >
       Add the other elements like object-cache, connection-pool,
sequence-manager here.

  </jdbc-connection-descriptor -->

==============================================
repository_database_rushDb.xml
==============================================


   <!-- This connection is used as the default one within OJB -->
   <jdbc-connection-descriptor
    jcd-alias="rushDb"
    default-connection="false"
    platform="MsSQLServer"
    jdbc-level="2.0"
    driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    protocol="JDBC"
    subprotocol="microsoft:sqlserver"
    dbalias="//xxx.x.x.x:xxxx"
    username="xxx"
    password="xxxx"
    batch-mode="true"
       useAutoCommit="0"
       ignoreAutoCommitExceptions="true"
    >

       <!--
           On initialization of connections the ConnectionFactory change
the 'autoCommit'
           state dependent of the used 'useAutoCommit' setting. This
doesn't work in all
           situations/environments, thus for useAutoCommit="1" the
ConnectionFactory does
           no longer set autoCommit to true on connection creation.
           To use the old behavior (OJB version 1.0.3 or earlier) set this
property
           to 'true', then OJB change the autoCommit state (if needed) of
           new obtained connections at connection initialization to 'true'.
           If 'false' or this property is removed, OJB don't try to change
connection
           autoCommit state at connection initialization.
       -->
       <attribute attribute-name="initializationCheck"
attribute-value="false" />

       <!-- alternative cache implementations, see docs section
"Caching" -->
       <object-cache
class="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl">
           <!-- meaning of attributes, please see docs section
"Caching" -->
           <!-- common attributes -->
           <attribute attribute-name="cacheExcludes" attribute-value=""/>

           <!-- ObjectCacheTwoLevelImpl attributes -->
           <attribute attribute-name="applicationCache"
attribute-value="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"/>
           <attribute attribute-name="copyStrategy"
attribute-value="org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl$CopyStr
ategyImpl"/>
           <attribute attribute-name="forceProxies"
attribute-value="false"/>

           <!-- ObjectCacheDefaultImpl attributes -->
           <attribute attribute-name="timeout" attribute-value="900"/>
           <attribute attribute-name="autoSync" attribute-value="true"/>
           <attribute attribute-name="cachingKeyType" attribute-value="0"/>
           <attribute attribute-name="useSoftReferences"
attribute-value="true"/>
       </object-cache>

       <!-- For more info, see section "Connection Handling" in docs -->
       <connection-pool
           maxActive="30"
           validationQuery=""
           testOnBorrow="true"
           testOnReturn="false"
           whenExhaustedAction="0"
           maxWait="10000">

           <!-- Set fetchSize to 0 to use driver's default. -->
           <attribute attribute-name="fetchSize" attribute-value="0"/>

           <!-- Attributes with name prefix "jdbc." are passed directly to
the JDBC driver. -->
           <!-- Example setting (used by Oracle driver when Statement
batching is enabled) -->
           <attribute attribute-name="jdbc.defaultBatchValue"
attribute-value="5"/>

           <!-- Attributes determining if ConnectionFactoryDBCPImpl
                should also pool PreparedStatement. This is
programmatically disabled
                when using platform=Oracle9i since Oracle statement caching
will conflict
                with DBCP ObjectPool-based PreparepdStatement caching (ie
setting true
                here has no effect for Oracle9i platform). -->
           <attribute attribute-name="dbcp.poolPreparedStatements"
attribute-value="false"/>
           <attribute attribute-name="dbcp.maxOpenPreparedStatements"
attribute-value="10"/>
           <!-- Attribute determining if the Commons DBCP connection
wrapper will allow
                access to the underlying concrete Connection instance from
the JDBC-driver
                (normally this is not allowed, like in J2EE-containers
using wrappers). -->
           <attribute
attribute-name="dbcp.accessToUnderlyingConnectionAllowed"
attribute-value="false"/>
       </connection-pool>

       <!-- alternative sequence manager implementations, see "Sequence
Manager" guide -->
       <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
           <!-- attributes supported by SequenceManagerHighLowImpl,
           SequenceManagerInMemoryImpl, SequenceManagerNextValImpl
           please see "Sequence Manager" guide or/and javadoc of class for
more information -->
           <attribute attribute-name="seq.start" attribute-value="200000"/>
           <attribute attribute-name="autoNaming" attribute-value="true"/>

           <!-- attributes supported by SequenceManagerHighLowImpl
           please see "Sequence Manager" guide or/and javadoc of classes
for more information -->
           <attribute attribute-name="grabSize" attribute-value="20"/>

           <!-- optional attributes supported by SequenceManagerNextValImpl
(support depends
           on the used database), please see "Sequence Manager" guide
or/and javadoc of
           classes for more information -->
           <!-- attribute attribute-name="seq.as"
attribute-value="INTEGER"/ -->
           <!-- attribute attribute-name="seq.incrementBy"
attribute-value="1"/ -->
           <!-- attribute attribute-name="seq.maxValue"
attribute-value="999999999999999999999999999"/ -->
           <!-- attribute attribute-name="seq.minValue"
attribute-value="1"/ -->
           <!-- attribute attribute-name="seq.cycle"
attribute-value="false"/ -->
           <!-- attribute attribute-name="seq.cache"
attribute-value="20"/ -->
           <!-- attribute attribute-name="seq.order"
attribute-value="false"/ -->

       </sequence-manager>
  </jdbc-connection-descriptor>

  <!-- Datasource example -->
   <!-- jdbc-connection-descriptor
       jcd-alias="default"
       default-connection="true"
    platform="Hsqldb"
    jdbc-level="2.0"
    jndi-datasource-name="java:DefaultDS"
    username="sa"
    password=""
       batch-mode="false"
       useAutoCommit="0"
       ignoreAutoCommitExceptions="false"
  >
       Add the other elements like object-cache, connection-pool,
sequence-manager here.

  </jdbc-connection-descriptor -->




On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
>
> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
>
> > i 'm afraid i need to repatch distributed torque-gen-3.1.1.jar  to  have
> > TIMESTAMP  jdbc type created for   java.sql.Date and java.sql.timestampas i
> > wrote in an old old post. (specific to oracle 9i and older )
>
> You might want to try DdlUtils (http://db.apache.org/ddlutils ) instead
> of Torque, it uses the same schema format and contains an Oracle9 (and
> an Oracle10 one) platform that can use TIMESTAMP.
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: Migrating to 1.0.4

Posted by Thomas Dudziak <to...@gmail.com>.
On 2/3/06, Bruno CROS <br...@gmail.com> wrote:

> i 'm afraid i need to repatch distributed torque-gen-3.1.1.jar  to  have
> TIMESTAMP  jdbc type created for  java.sql.Date and java.sql.timestamp as i
> wrote in an old old post. (specific to oracle 9i and older )

You might want to try DdlUtils (http://db.apache.org/ddlutils) instead
of Torque, it uses the same schema format and contains an Oracle9 (and
an Oracle10 one) platform that can use TIMESTAMP.

Tom

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


Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
Thanks.

i 'm afraid i need to repatch distributed torque-gen-3.1.1.jar  to  have
TIMESTAMP  jdbc type created for  java.sql.Date and java.sql.timestamp as i
wrote in an old old post. (specific to oracle 9i and older )

Does someone confirm that ?


On 2/3/06, Armin Waibel <ar...@apache.org> wrote:
>
> Bruno CROS wrote:
> > Bang in the bull 's eye!!
> >
> > the embedded dtd was not 3_0_1 but 3_1. I just change the value and it
> find
> > the database.dtd file included en torque.jar
> >
> > Then  i have to add to my build.properties
> > torque.database.user=xxxx
> > and
> > torque.database.password=xxxxx
> > and the famous
> > torque.delimiter=/   (apparently needed for Oracle9i)
> >
> > now i get an error about OJB_DMAP_ENTRIES table !!
> > here is the ant trace :
> >
> > StdErr
> >      [torque-sql-exec] Failed to execute: CREATE TABLE OJB_DMAP_ENTRIES
> (
> > ID NUMBER NOT NULL, DMAP_ID NUMBER NOT NULL, KEY_OID LONG RAW, VALUE_OID
> > LONG RAW )
> >      [torque-sql-exec] java.sql.SQLException: ORA-01754: a table may
> > contain only one column of type LONG
> >      [torque-sql-exec] Failed to execute: ALTER TABLE OJB_DMAP_ENTRIES
> ADD
> > CONSTRAINT OJB_DMAP_ENTRIES_PK PRIMARY KEY (ID)
> >      [torque-sql-exec] java.sql.SQLException: ORA-00942: table or view
> does
> > not exist
> >
> > Is this table needed ?  why oracle does not want to cretae iot !!? It's
> > amazing.
>
> The table is only needed if you use odmg-api with a specific DMap
> implementation. Normally you never it.
>
> http://db.apache.org/ojb/docu/guides/platforms.html#OJB+internal+tables
>
> regards,
> Armin
>
> >
> >
> > Thanks for you help.
> >
> >
> > On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
> >> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
> >>
> >>> First you will find the ant trace of setup-db task, the torque error
> is
> >>> painted in red.
> >>> Second, you will find my build.properties used by the task.
> >>
> >>>      [torque-sql] 2006-02-03 13:21:48,578 [main] INFO
> >>> org.apache.torque.engine.database.transform.DTDResolver - Resolver:
> used
> >>> ' http://db.apache.org/torque/dtd/database_3_0_1.dtd'
> >>>   StdErr
> >>>
> >>>      BUILD FAILED
> >>>      "build-torque.xml" :
> >>> file:C:/@Dev/Mathieu/ojb/src/schema/build-torque.xml:203:
> >>> org.apache.torque.engine .EngineException:
> java.net.UnknownHostException
> >> :
> >>> db.apache.org en ligne 203
> >> This seems to be the core problem: Ant cannot access the server
> >> hosting the DTD ( db.apache.org), probably because of a Firewall. In
> >> the Ant target that generates the schema, you can specify the DTD to
> >> use for the schema. There, I thiink, you should use the value
> >>
> >> http://db.apache.org/torque/dtd/database_3_1.dtd
> >>
> >> because that should be the one that is contained in the torque jar
> >> (which Ant therefore does not have to fetch from the internet).
> >>
> >> Tom
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>

Re: Migrating to 1.0.4

Posted by Armin Waibel <ar...@apache.org>.
Bruno CROS wrote:
> Bang in the bull 's eye!!
> 
> the embedded dtd was not 3_0_1 but 3_1. I just change the value and it find
> the database.dtd file included en torque.jar
> 
> Then  i have to add to my build.properties
> torque.database.user=xxxx
> and
> torque.database.password=xxxxx
> and the famous
> torque.delimiter=/   (apparently needed for Oracle9i)
> 
> now i get an error about OJB_DMAP_ENTRIES table !!
> here is the ant trace :
> 
> StdErr
>      [torque-sql-exec] Failed to execute: CREATE TABLE OJB_DMAP_ENTRIES (
> ID NUMBER NOT NULL, DMAP_ID NUMBER NOT NULL, KEY_OID LONG RAW, VALUE_OID
> LONG RAW )
>      [torque-sql-exec] java.sql.SQLException: ORA-01754: a table may
> contain only one column of type LONG
>      [torque-sql-exec] Failed to execute: ALTER TABLE OJB_DMAP_ENTRIES ADD
> CONSTRAINT OJB_DMAP_ENTRIES_PK PRIMARY KEY (ID)
>      [torque-sql-exec] java.sql.SQLException: ORA-00942: table or view does
> not exist
> 
> Is this table needed ?  why oracle does not want to cretae iot !!? It's
> amazing.

The table is only needed if you use odmg-api with a specific DMap 
implementation. Normally you never it.

http://db.apache.org/ojb/docu/guides/platforms.html#OJB+internal+tables

regards,
Armin

> 
> 
> Thanks for you help.
> 
> 
> On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
>> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
>>
>>> First you will find the ant trace of setup-db task, the torque error is
>>> painted in red.
>>> Second, you will find my build.properties used by the task.
>>
>>>      [torque-sql] 2006-02-03 13:21:48,578 [main] INFO
>>> org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
>>> ' http://db.apache.org/torque/dtd/database_3_0_1.dtd'
>>>   StdErr
>>>
>>>      BUILD FAILED
>>>      "build-torque.xml" :
>>> file:C:/@Dev/Mathieu/ojb/src/schema/build-torque.xml:203:
>>> org.apache.torque.engine .EngineException: java.net.UnknownHostException
>> :
>>> db.apache.org en ligne 203
>> This seems to be the core problem: Ant cannot access the server
>> hosting the DTD ( db.apache.org), probably because of a Firewall. In
>> the Ant target that generates the schema, you can specify the DTD to
>> use for the schema. There, I thiink, you should use the value
>>
>> http://db.apache.org/torque/dtd/database_3_1.dtd
>>
>> because that should be the one that is contained in the torque jar
>> (which Ant therefore does not have to fetch from the internet).
>>
>> Tom
>>
>> ---------------------------------------------------------------------
>> 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


Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
Bang in the bull 's eye!!

the embedded dtd was not 3_0_1 but 3_1. I just change the value and it find
the database.dtd file included en torque.jar

Then  i have to add to my build.properties
torque.database.user=xxxx
and
torque.database.password=xxxxx
and the famous
torque.delimiter=/   (apparently needed for Oracle9i)

now i get an error about OJB_DMAP_ENTRIES table !!
here is the ant trace :

StdErr
     [torque-sql-exec] Failed to execute: CREATE TABLE OJB_DMAP_ENTRIES (
ID NUMBER NOT NULL, DMAP_ID NUMBER NOT NULL, KEY_OID LONG RAW, VALUE_OID
LONG RAW )
     [torque-sql-exec] java.sql.SQLException: ORA-01754: a table may
contain only one column of type LONG
     [torque-sql-exec] Failed to execute: ALTER TABLE OJB_DMAP_ENTRIES ADD
CONSTRAINT OJB_DMAP_ENTRIES_PK PRIMARY KEY (ID)
     [torque-sql-exec] java.sql.SQLException: ORA-00942: table or view does
not exist

Is this table needed ?  why oracle does not want to cretae iot !!? It's
amazing.


Thanks for you help.


On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
>
> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
>
> > First you will find the ant trace of setup-db task, the torque error is
> > painted in red.
> > Second, you will find my build.properties used by the task.
>
>
> >      [torque-sql] 2006-02-03 13:21:48,578 [main] INFO
> > org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
> > ' http://db.apache.org/torque/dtd/database_3_0_1.dtd'
> >   StdErr
> >
> >      BUILD FAILED
> >      "build-torque.xml" :
> > file:C:/@Dev/Mathieu/ojb/src/schema/build-torque.xml:203:
> > org.apache.torque.engine .EngineException: java.net.UnknownHostException
> :
> > db.apache.org en ligne 203
>
> This seems to be the core problem: Ant cannot access the server
> hosting the DTD ( db.apache.org), probably because of a Firewall. In
> the Ant target that generates the schema, you can specify the DTD to
> use for the schema. There, I thiink, you should use the value
>
> http://db.apache.org/torque/dtd/database_3_1.dtd
>
> because that should be the one that is contained in the torque jar
> (which Ant therefore does not have to fetch from the internet).
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: Migrating to 1.0.4

Posted by Thomas Dudziak <to...@gmail.com>.
On 2/3/06, Bruno CROS <br...@gmail.com> wrote:

> First you will find the ant trace of setup-db task, the torque error is
> painted in red.
> Second, you will find my build.properties used by the task.


>      [torque-sql] 2006-02-03 13:21:48,578 [main] INFO
> org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
> 'http://db.apache.org/torque/dtd/database_3_0_1.dtd'
>   StdErr
>
>      BUILD FAILED
>      "build-torque.xml" :
> file:C:/@Dev/Mathieu/ojb/src/schema/build-torque.xml:203:
> org.apache.torque.engine .EngineException: java.net.UnknownHostException:
> db.apache.org en ligne 203

This seems to be the core problem: Ant cannot access the server
hosting the DTD (db.apache.org), probably because of a Firewall. In
the Ant target that generates the schema, you can specify the DTD to
use for the schema. There, I thiink, you should use the value

http://db.apache.org/torque/dtd/database_3_1.dtd

because that should be the one that is contained in the torque jar
(which Ant therefore does not have to fetch from the internet).

Tom

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


Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
First you will find the ant trace of setup-db task, the torque error is
painted in red.
Second, you will find my build.properties used by the task.

I read the post. It 's treating about an insert error. I note that it's a
torque issue, but i'm not at this step.



Regards.

PS :Don't worry about source.business.xxx variables (it's used bu a personal
task to isolate business package to speed-up  xdoclet task).

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

     [ojbdoclet] Type fr.gouv.finances.douane.dnsce.mathieu.business.Soldes
     [ojbdoclet] Type
fr.gouv.finances.douane.dnsce.mathieu.business.Visualisation
     [ojbdoclet] Type
fr.gouv.finances.douane.dnsce.mathieu.business.VehiculeOrdre
     [ojbdoclet] Processed 53 types
     [ojbdoclet] Processed 53 types
     [ojbdoclet] 2006-02-03 13:21:44,921 [main] INFO
xdoclet.XDocletMain.start - Running <torqueschema/>
     [ojbdoclet] Generating torque schema (build/resources//project-
schema.xml)
     [ojbdoclet] Processed 53 types

     setup-db:
          [copy] Copying 1 file to C:\@Dev\Mathieu\ojb\build\resources

     check-use-classpath:

     check-run-only-on-schema-change:

     sql-check:

     sql:
          [echo] +------------------------------------------+
          [echo] |                                          |
          [echo] | Generating SQL for YOUR Torque project!  |
          [echo] |                                          |
          [echo] +------------------------------------------+

     sql-classpath:
          [echo] loading templates from classpath
     [torque-sql] Using contextProperties file: C:\@Dev
\Mathieu\ojb\build.properties
     [torque-sql] Using classpath
     [torque-sql] Generating to file C:\@Dev
\Mathieu\ojb\build\resources\report.mathieu.sql.generation
     [torque-sql] 2006-02-03 13:21:48,500 [main] INFO
org.apache.torque.engine.database.transform.XmlToAppData - Parsing file: '
ojbcore-schema.xml '
     [torque-sql] 2006-02-03 13:21:48,500 [main] INFO
org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
database.dtd from 'org.apache.torque.engine.database.transform' package
     [torque-sql] 2006-02-03 13:21:48,578 [main] INFO
org.apache.torque.engine.database.transform.XmlToAppData - Parsing file:
'project-schema.xml'
     [torque-sql] 2006-02-03 13:21:48,578 [main] INFO
org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
'http://db.apache.org/torque/dtd/database_3_0_1.dtd'
  StdErr

     BUILD FAILED
     "build-torque.xml" :
file:C:/@Dev/Mathieu/ojb/src/schema/build-torque.xml:203:
org.apache.torque.engine .EngineException: java.net.UnknownHostException:
db.apache.org en ligne 203

     Total time: 19 seconds
Erreur lors de l'exécution de Ant :
C:/JBuilder9/jdk1.4/bin/java -Dbuild.compiler=com.borland.jbuilder.ant.compi
ler.Bmj -Xbootclasspath:C:\JBuilder9\lib\javac.jar;C:\JBuilder9\lib\jbuilder
.jar;C:\JBuilder9\jdk1.4\jre\lib\rt.jar;C:\JBuilder9\jdk1.4\jre\lib\i18n.jar
;C:\JBuilder9\jdk1.4\jre\lib\sunrsasign.jar;C:\JBuilder9\jdk1.4\jre\lib\jsse

.jar;C:\JBuilder9\jdk1.4\jre\lib\jce.jar;C:\JBuilder9\jdk1.4\jre\lib\charset
s.jar;C:\JBuilder9\jdk1.4\jre\classes;C:\JBuilder9\jdk1.4\lib\tools.jar;C:\J
Builder9\lib\ant.jar;C:\JBuilder9\lib\optional.jar;C:\JBuilder9\lib\jbuilder

.jar;C:\BC\java\NetComponents-1.3.8\NetComponents-1.3.8a\NetComponents.jar;C
:\JBuilder9\lib\xercesImpl.jar;C:\JBuilder9\lib\xmlParserAPIs.jar
org.apache.tools.ant.Main -buildfile build.xml -inputhandler
com.borland.jbuilder.build.AntBuildTask$AntInputHandler  setup-db

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

#<!--
#/* Copyright 2003-2004 The Apache Software Foundation
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# *     http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# */
#-->
############################################################################
####
# These are build properties for the ojb-blank project. In addition to
# any customization of your build process, you will probably want
# to change the values in the block below to map to your database
# rather than to a generic HSQLDB instance.
#
jcdAlias=default
databaseName=mathieu
databaseUser=mathieutest
databasePassword=xxxxxxxxxxxxxx (hidden)

# Settings are for Hsqldb (embedded database)
dbmsName=Oracle9i
jdbcLevel=3.0
jdbcRuntimeDriver=oracle.jdbc.driver.OracleDriver
urlProtocol=jdbc
urlSubprotocol=oracle
urlDbalias=thin:@P615-5:1521:mathieu

# For MySQL this would look like:
#dbmsName=MySQL
#jdbcLevel=3.0
#jdbcRuntimeDriver=com.mysql.jdbc.Driver
#urlProtocol=jdbc
#urlSubprotocol=mysql
#urlDbalias=//localhost/${databaseName}

# If you want to use Torque for database initialization then set this value
# to one of these values:
# db2,hypersonic,interbase,msaccess,mssql,mysql,oracle,
postgresql,sapdb,sybase
torque.database=oracle

# This is a specific url that Torque uses for creating a database.
# For several databases this is different from the url used to access the
database
# For instance, MySQL requires an url that points to the host, but without a
database name
#
# For Hsqldb we have to mangle the path so that we can invoke Torque in the
base
# directory but the database is created in the ${build.dir}/database folder
torque.database.createUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}

# This specifies the url that Torque uses to access the existing database
#
# For Hsqldb we use the same url as for the createUrl above
torque.database.buildUrl=${torque.database.createUrl}


# Set this to the name of the jar file you want produced from the dist
target
jar.name=my-project.jar

# This is the class containing the main method. Set this so that an
executable jar and
# appropriate batch/shell skripts can be automatically generated for you.
#source.main.class=org.apache.ojb.tutorial1.Application

############################################################################
####
# Build Properties - you shouldn't have to change anything here
#
source.dir=src
source.java.dir=${source.dir}/java
# src des business à copier
source.business.dir=../webapp/WEB-INF/src
source.business.filter=fr/gouv/finances/douane/dnsce/mathieu/business/*.java
source.resource.dir=${source.dir}/resources
source.test.dir=${source.dir}/test
source.schema.dir=${source.dir}/schema

build.dir=build
build.lib.dir=lib

build.classes.dir=${build.dir}/classes/
build.resources.dir=${build.dir}/resources/

target.dir=target







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




On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
>
> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
>
> > sorry, can't see the link with the thread you gave me.
>
> Why not ? Alternatively, you could use the user mailing list archive
> link on the OJB site, and check the threads for 30 Jan. The Thread is
> called "Problems upgrading to ojb1.04".
>
> > There is profile file in 1.0.4 OJB bin release. One of these is called
> > oracle9i. I supposed that my build.properties (taken from obj-blank.jar)
> > have to look like it. But i really don't known what i have  to put in
> this
> > build.properties.  I read  somewhere that i have to select a profile,
> but i
> > do not see a "profile" key at all. only torque.database ,
> > torque.database.createUrl, and torque.database.buildUrl.
>
> Could you post the error message ?
>
> > I saw a patch to torque.jar too. Do i have to apply it ?
>
> You should be safe if you use the jars that OJB comes with, because
> that's the ones that OJB is (unit-) tested with.
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: Migrating to 1.0.4

Posted by Thomas Dudziak <to...@gmail.com>.
On 2/3/06, Bruno CROS <br...@gmail.com> wrote:

> sorry, can't see the link with the thread you gave me.

Why not ? Alternatively, you could use the user mailing list archive
link on the OJB site, and check the threads for 30 Jan. The Thread is
called "Problems upgrading to ojb1.04".

> There is profile file in 1.0.4 OJB bin release. One of these is called
> oracle9i. I supposed that my build.properties (taken from obj-blank.jar)
> have to look like it. But i really don't known what i have  to put in this
> build.properties.  I read  somewhere that i have to select a profile, but i
> do not see a "profile" key at all. only torque.database ,
> torque.database.createUrl, and torque.database.buildUrl.

Could you post the error message ?

> I saw a patch to torque.jar too. Do i have to apply it ?

You should be safe if you use the jars that OJB comes with, because
that's the ones that OJB is (unit-) tested with.

Tom

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


Re: Migrating to 1.0.4

Posted by Bruno CROS <br...@gmail.com>.
sorry, can't see the link with the thread you gave me.

There is profile file in 1.0.4 OJB bin release. One of these is called
oracle9i. I supposed that my build.properties (taken from obj-blank.jar)
have to look like it. But i really don't known what i have  to put in this
build.properties.  I read  somewhere that i have to select a profile, but i
do not see a "profile" key at all. only torque.database ,
torque.database.createUrl, and torque.database.buildUrl.

I saw a patch to torque.jar too. Do i have to apply it ?

Thanks a lot.


On 2/3/06, Thomas Dudziak <to...@gmail.com> wrote:
>
> On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
> > Following the Armin's advice, i'm currently migrating from 1.0.1 to
> 1.0.4
> >
> > I started with the 1.0.4 ojb-blank.jar to replace all files. jar of
> course,
> > and configuration ones too.
> >
> > I stop with Torque (to generate Oracle 9i database) with an
> > UnkonwnHostException
> >
> > In 1.0.1 i was targeting with this ( and it used to work fine):
> > torque.database.createUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
> > torque.database.buildUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
> >
> > and in 1.0.4, i tried the original one (with database) and the old one
> > torque.database.createUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
> > and
> > torque.database.buildUrl=${torque.database.createUrl} (apprently the
> same)
> >
> > Did someone reach to work with torque and Oracle 9i ?
>
> The new Torque version that OJB 1.0.4 employs, apparently has a change
> that affects Oracle. See this thread for some details:
>
> http://marc.theaimsgroup.com/?l=ojb-user&m=113859243118171&w=2
>
> Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: Migrating to 1.0.4

Posted by Thomas Dudziak <to...@gmail.com>.
On 2/3/06, Bruno CROS <br...@gmail.com> wrote:
> Following the Armin's advice, i'm currently migrating from 1.0.1 to 1.0.4
>
> I started with the 1.0.4 ojb-blank.jar to replace all files. jar of course,
> and configuration ones too.
>
> I stop with Torque (to generate Oracle 9i database) with an
> UnkonwnHostException
>
> In 1.0.1 i was targeting with this ( and it used to work fine):
> torque.database.createUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
> torque.database.buildUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
>
> and in 1.0.4, i tried the original one (with database) and the old one
> torque.database.createUrl=${urlProtocol}:${urlSubprotocol}:${urlDbalias}
> and
> torque.database.buildUrl=${torque.database.createUrl} (apprently the same)
>
> Did someone reach to work with torque and Oracle 9i ?

The new Torque version that OJB 1.0.4 employs, apparently has a change
that affects Oracle. See this thread for some details:

http://marc.theaimsgroup.com/?l=ojb-user&m=113859243118171&w=2

Tom

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