[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ojb-user
Subject:    RE: Problem with SQL Server and Ojb
From:       "Kevin Viet" <kevin.viet () is2france ! com>
Date:       2005-02-18 7:56:07
Message-ID: FMEKLFEIGJBJGMKJGDBPCEIMCAAA.kevin.viet () is2france ! com
[Download RAW message or body]

hello ryan.

We are not on app server configuration, just a rich client connecting to
msql server database using odbc bridge.
Using ojb 1.0RC6 before and HL Sequence generation works perfectly with this
version and our configuration.

Sounds weird, seems ojb changed their identity creation protocol and this is
incompatible with the bridge.

Anyway, thanx for your response.

Kevin

-----Message d'origine-----
De : Ryan Vanderwerf [mailto:Ryan.Vanderwerf@mdp.metrowerks.com]
Envoyé : jeudi 17 février 2005 21:18
À : 'OJB Users List'
Objet : RE: Problem with SQL Server and Ojb


I don't think you want to use that scheme on SQL server, it's never worked
well for me, especially in multiple app server farm situations. I would use
the StoredProcedureSequenceImpl or the Native one (haven't tried the native
one myself though).

Ryan

-----Original Message-----
From: Kevin Viet [mailto:kevin.viet@is2france.com]
Sent: Thursday, February 17, 2005 4:16 AM
To: OJB-ML
Subject: Problem with SQL Server and Ojb

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: 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



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic