Hi,

don't know what's wrong. Did you have tried
running your tests without using p6spy?

regards,
Armin

----- Original Message -----
From: "Crecente Casanova, David" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 17, 2003 2:34 PM
Subject: RV: Problems with sequences.



    Hi all,

    I am getting the next error:


----------------
 Caused by: org.apache.ojb.broker.PersistenceBrokerException: Could not
get key value:
 Could not grab next id, failed with
 Excepci�n de E/S: Socket closed
 Creation of new sequence failed with
 Excepci�n de E/S: Socket closed
 : Excepci�n de E/S: Socket closed
  at
org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(BrokerHelp
er.java:316)
  at
org.apache.ojb.broker.util.BrokerHelper.getValuesForObject(BrokerHelper.
java:349)
  at
org.apache.ojb.broker.util.BrokerHelper.getKeyValues(BrokerHelper.java:2
15)
  at org.apache.ojb.broker.Identity.init(Identity.java:198)
  ... 21 more
 Caused by:
org.apache.ojb.broker.util.sequence.SequenceManagerException:
 Could not grab next id, failed with
 Excepci�n de E/S: Socket closed
 Creation of new sequence failed with
 Excepci�n de E/S: Socket closed
 : Excepci�n de E/S: Socket closed
  at
org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.getUnique
Long(SequenceManagerNextValImpl.java:172)
  at
org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.getUnique
Id(SequenceManagerNextValImpl.java:144)
  at
org.apache.ojb.broker.util.sequence.AbstractSequenceManager.getUniqueVal
ue(AbstractSequenceManager.java:167)
  at
org.apache.ojb.broker.util.BrokerHelper.getAutoIncrementValue(BrokerHelp
er.java:303)
  ... 24 more
 Caused by: java.sql.SQLException: Excepci�n de E/S: Socket closed
  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
  at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:562)
  at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.
java:2786)
  at
oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:925)
  at
com.p6spy.engine.logging.P6LogStatement.execute(P6LogStatement.java:149)
  at
org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.createSeq
uence(SequenceManagerNextValImpl.java:245)
  at
org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl.getUnique
Long(SequenceManagerNextValImpl.java:168)
  ... 27 more
---------------

    I am working with Oracle 9i, Tomcat, and OJB.
    I am using oracle sequences and 'SequenceManagerNextValImpl', I
belive it is the best option for me.

    Example of xml descriptor for a table is:


-----------------
 <!-- This repository file is generated by the impart OJB Generator -->
 <!--           www.impart.ch [EMAIL PROTECTED]                        -->
 <!--        created at 9 Jul 2003 11:37:50 GMT                     -->


 <!-- Definitions for .OPENCOWNER -->
 <class-descriptor
   class="com.indra.crm.vo.Crm_cliente_general"
   table="OPENCOWNER.CRM_CLIENTE"
 >
   <field-descriptor id="66"
    name="ln_id_cliente"
     column="LN_ID_CLIENTE"
     jdbc-type="INTEGER"
     primarykey="true"
  autoincrement="true"
  sequence-name="sec_cliente" ---->>>> My oracle sequence
   />
   <field-descriptor id="67"
     name="ds_nb_cliente"
     column="DS_NB_CLIENTE"
     jdbc-type="VARCHAR"
   />

 . . . . . .

 </class-descriptor>
 --------------


    My jdbc-connection-descriptor is like:

-------------
  <jdbc-connection-descriptor
dbalias="thin:@192.168.168.100:1521:aunagc" default-connection="true"
driver="com.p6spy.engine.spy.P6SpyDriver" jcd-alias="" jdbc-level="2.0"
password="OPENCOWNER" platform="Oracle" rotocol="jdbc"
subprotocol="oracle" username="OPENCOWNER">
  <sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImp
l"/>
  </jdbc-connection-descriptor>
-------------

    When I run a simple JUnit Test I don't have problems but when I run
all my test together this error appears.

    Thank you in advance.


 David Crecente Casanova
 mailto:[EMAIL PROTECTED]
 Software Engineer
 TELENIUM, The New Millennium Telecom Company>
 Agust�n de Fox�, 25, plta. 13
 28036 MADRID
 Tel. +34 91 315 85 62
 Fax +34 91 315 63 37
 http://www.telenium.es


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