Hello Armin

Thanx for your response, but unfortunatelly I think we are forced to use
jdbc-odbc bridge, it's one of our customer choice, this is their
configuration. By the way we are trying to remove this and use a real Jdbc
driver instead.

This is really weird because we used this configuration (odbc bridge) with
previous versions of ojb and never had any problems, we upgraded it from
1.0RC6 to 1.0.1 last week, and encounter this problem.

Anyway, thanx for your help.

Kévin


-----Message d'origine-----
De : Armin Waibel [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 17 février 2005 22:23
À : OJB Users List
Objet : Re: Problem with SQL Server and Ojb


Hi Kevin,

which driver do you use, Sun's JdbcOdbc bridge? If yes, this could lead
to problems, try a "real" (don't use type 1 driver) jdbc-driver instead.
Sorry can't help more, never used MSSQL.

regards,
Armin

Kevin Viet wrote:
> Hello
>
> I am using db-ojb-1.0.1.jar.
> My database is running on a server using Microsoft SQL Server.
>
> I have a problem with the high/low sequence generation with the OJB_HL_SEQ
> table.
> When I create a new object in my application, I store it immediately in
the
> database and get the following error :
>
> [org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl] ERROR:
> Can't lookup new HighLowSequence for field intervenantPortailId using
> sequence name SEQ_G_INTERVENANTPORTAIL
> Error reading class type:
> org.apache.ojb.broker.util.sequence.HighLowSequence from result set,
current
> read field was fieldName
> org.apache.ojb.broker.PersistenceBrokerException: Error reading class
type:
> org.apache.ojb.broker.util.sequence.HighLowSequence from result set,
current
> read field was fieldName
>       at
>
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readValuesFrom(RowRea
> derDefaultImpl.java:208)
>       at
>
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readPkValuesFrom(RowR
> eaderDefaultImpl.java:186)
>       at
>
org.apache.ojb.broker.accesslayer.RsIterator.getObjectFromResultSet(RsIterat
> or.java:421)
>       at 
> org.apache.ojb.broker.accesslayer.RsIterator.next(RsIterator.java:265)
>       at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Persistenc
> eBrokerImpl.java:1462)
>       at
>
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Dele
> gatingPersistenceBroker.java:307)
>       at
>
org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Dele
> gatingPersistenceBroker.java:307)
>       at
>
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.lookupStoreSe
> quence(SequenceManagerHighLowImpl.java:225)
>       at
>
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getSequence(S
> equenceManagerHighLowImpl.java:193)
>       at
>
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl.getUniqueLong
> (SequenceManagerHighLowImpl.java:145)
>       at
>
org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueValue(A
> bstractSequenceManager.java:139)
>       at
>
org.apache.ojb.broker.util.BrokerHelper.setAutoIncrementValue(BrokerHelper.j
> ava:317)
>       at
>
org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.java
> :364)
>       at
>
org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:176)
>       at org.apache.ojb.broker.Identity.init(Identity.java:150)
>       at org.apache.ojb.broker.Identity.<init>(Identity.java:119)
>       at
>
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl
> .java:691)
>       at
>
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersi
> stenceBroker.java:175)
>       at
>
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersi
> stenceBroker.java:175)
>       at mypackage.myclass.execute(CreerIntervenantClientAnonyme.java:74)
>       at mypackage.myclass.executeService(BusinessInvoker.java:221)
>       at mypackage.myclass.execute(BusinessInvoker.java:132)
>       at
>
mypackage.myclass.creationIntervenantAnonyme(AccueilPortailExitAction.java:1
> 07)
>       at mypackage.myclass.appelComposant(AccueilPortailExitAction.java:79)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
>       at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> .java:25)
>       at java.lang.reflect.Method.invoke(Method.java:324)
> ...
> Caused by: java.sql.SQLException: [Microsoft][ODBC SQL Server
Driver]invalid
> descriptor index
>       at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
>       at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
>       at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3908)
>       at
> sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5702)
>       at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:356)
>       at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:413)
>       at
>
org.apache.ojb.broker.util.JdbcTypesHelper$T_Varchar.readValueFromResultSet(
> JdbcTypesHelper.java:378)
>       at
>
org.apache.ojb.broker.util.JdbcTypesHelper$BaseType.getObjectFromColumn(Jdbc
> TypesHelper.java:302)
>       at
>
org.apache.ojb.broker.util.JdbcTypesHelper$BaseType.getObjectFromColumn(Jdbc
> TypesHelper.java:281)
>       at
>
org.apache.ojb.broker.accesslayer.RowReaderDefaultImpl.readValuesFrom(RowRea
> derDefaultImpl.java:201)
>       ... 36 more
>
>
> This error happens in the object Indentity creation protocol.
>
> Help appreciated, thanx
>
> Kévin VIET
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to