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 Armin Waibel <ar...@code-au-lait.de> on 2003/12/16 17:43:44 UTC

Re: Problem with internal table location

Hi Nicolas,

current implementation of DMapImpl needs unique ids obtained from the 
sequence manager (because DMap is persistence capable, I started write a 
new implementation of DMap which does not obtain OID at creation time, 
but it's not checked in). Per default OJB use SequenceManagerHighLowImpl 
which needs access to a table called OJB_HL_SEQ

More info about sequence manager
file://localhost/E:/intellij/DB_OJB_HEAD/db-ojb/target/doc/sequencemanager.html

 > Caused by: org.apache.ojb.broker.PersistenceBrokerSQLException:
 > java.sql.SQLException: [SQL0204] OJB_HL_SEQ de type *FILE dans RENARD 
non
 > trou
And exactly this table is the problem.

regards,
Armin


Nicolas.CHALUMEAU@arsoe-trelaze.com wrote:

> I work whith rc5.
> 
> When I want to acces a table to find a classe who contain a Map, I have an 
> error because it try to find the internal table in the same database where 
> is the table. The table is in the Db2 db and internal table in the MySQL 
> db.
> 
> My repository.xml :
> 
>    <jdbc-connection-descriptor
>         platform="MySQL"
>         jcd-alias="default"
>         default-connection="true"
>         jdbc-level="2.0"
>         driver="org.gjt.mm.mysql.Driver"
>         protocol="jdbc"
>         subprotocol="mysql"
>         dbalias="//arsodev1:3306/CoopgenUC"
>         username="root"
>         password="secret"
>    />
>  
>    <jdbc-connection-descriptor
>         platform="Db2"
>         jcd-alias="as400"
>         default-connection="false"
>         jdbc-level="2.0"
>         driver="com.ibm.as400.access.AS400JDBCDriver"
>         protocol="jdbc"
>         subprotocol="as400"
>         dbalias="//ASDEV"
>         username="RENARD"
>         password="123456"
>    />
> 
>     <!-- include user defined mappings here --> 
>     &useruc;
> 
>     <!-- include ojb internal mappings here -->
>     &internal;
> 
> When I don't need internal table all work fine but when i try to acces to 
> a Map/Collection have an error. repository_internal.xml is the one provide 
> with the rc5.
> My problematic classe is define with :
> 
>   <class-descriptor
>       class="com.arsoe.trelaze.coopgen.metier.cooperative.Cooperative"
>       table="CIADATA.COOP">
>     ...
>     <collection-descriptor
>           name="mesInseminateurs"
>           element-class-ref="com.arsoe.trelaze.coopgen.metier.inseminateur.Inseminateur"
>           collection-class="org.apache.ojb.odmg.collections.DMapImpl">
> 
>       <inverse-foreignkey field-ref="idCoop"/>
>     </collection-descriptor>
> 
>   </class-descriptor>
> 
> Is someone have any idea of where could be my configuration mistake ?
> 
> The error :
> 
> [org.apache.ojb.broker.accesslayer.RsIterator] ERROR: Error while iterate 
> ResultSet for query org.apache.ojb.broker.accesslayer.RsQueryObject[
> uery: Query from class 
> com.arsoe.trelaze.coopgen.metier.cooperative.Cooperative where 
> {code=C720}, class descriptor: 
> com.arsoe.trelaze.coopgen.metier.cooperative.Cooperative]
> org.apache.ojb.broker.PersistenceBrokerException: 
> org.apache.ojb.broker.util.sequence.SequenceManagerException: Can't build 
> new sequence
> org.apache.ojb.broker.PersistenceBrokerException: 
> org.apache.ojb.broker.PersistenceBrokerException: 
> org.apache.ojb.broker.util.sequence.SequenceManagerException: Can't build 
> new sequence
>         at 
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.QueryReferenceBroker.retrieveCollection(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.QueryReferenceBroker.retrieveCollections(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(Unknown 
> Source)
>         at org.apache.ojb.broker.accesslayer.RsIterator.next(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown 
> Source)
>         at 
> com.arsoe.trelaze.socle.dao.odmg.ODMGDataAccessObject.find(ODMGDataAccessObject.java:292)
>        ...
> Caused by: org.apache.ojb.broker.PersistenceBrokerException: 
> org.apache.ojb.broker.util.sequence.SequenceManagerException: Can't build 
> new sequence
>         at org.apache.ojb.odmg.collections.DMapImpl.generateNewId(Unknown 
> Source)
>         at org.apache.ojb.odmg.collections.DMapImpl.<init>(Unknown Source)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at java.lang.Class.newInstance0(Class.java:306)
>         at java.lang.Class.newInstance(Class.java:259)
>         at 
> org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(Unknown 
> Source)
>         ... 52 more
> Caused by: org.apache.ojb.broker.util.sequence.SequenceManagerException: 
> Can't build new sequence
>         at 
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getSequence(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUniqueLong(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(Unknown 
> Source)
>         ... 61 more
> Caused by: org.apache.ojb.broker.PersistenceBrokerSQLException: 
> java.sql.SQLException: [SQL0204] OJB_HL_SEQ de type *FILE dans RENARD non 
> trou
> Ú.
>         at 
> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown 
> Source)
>         at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown 
> Source)
>         at 
> org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.lookupStoreSequence(Unknown 
> Source)
>         ... 64 more
> 
> Nicolas
> 
> ---------------------------------------------------------------------
> 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