I want RID of previous record with same record. So a try catch.
What would be the right method to get RID of dup record? regards
try{
g.commit();
}catch( OResponseProcessingException oe){

                            ORecordDuplicatedException ex = (
ORecordDuplicatedException)oe.getCause().getCause();                       
    
                            System.out.println("Exception> "+oe.toString() 
);//gives null}


On Thursday, March 13, 2014 3:28:37 PM UTC+5:30, Andrey Lomakin wrote:
>
> Hi,
> That is because you work using remote connection.
> In such case database exceptions are wrapped into 
> OResponseProcessingException 
> to preserve server side stack trace.
>
>
> On Wed, Mar 12, 2014 at 7:51 PM, Shishya <[email protected] 
> <javascript:>>wrote:
>
>> Hi,
>>
>> I didnt want to create a new thread, but this is not exactly related. I 
>> need to know the way using this exception
>>
>> I am using it in following way
>>
>>                
>> try{
>>                     graph.commit();
>>                 }catch(ORecordDuplicatedException oe){
>>                             System.out.println(oe.toString());
>>                         }
>> But I get the following exception, inspite of catch
>>
>> .Exception in thread "main" 
>> com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException:
>>  
>> Exception during response processing.
>>  at 
>> com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:264)
>> at 
>> com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:231)
>>  at 
>> com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:202)
>> at 
>> com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:113)
>>  at 
>> com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:1938)
>> at 
>> com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1108)
>>  at 
>> com.orientechnologies.orient.client.remote.OStorageRemoteThread.commit(OStorageRemoteThread.java:438)
>> at 
>> com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:84)
>>  at 
>> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:116)
>> at 
>> com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:461)
>>  at 
>> com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:93)
>> at MassProcessv1_4.main(MassProcessv1_4.java:148)
>> Caused by: 
>> com.orientechnologies.orient.core.storage.ORecordDuplicatedException: 
>> Cannot index record #11:1052943: found duplicated key '06620817' in index 
>> 'idxptid' previously assigned to the record #11:1 RID=#11:1
>>  at 
>> com.orientechnologies.orient.core.index.OIndexUnique.commitSnapshot(OIndexUnique.java:135)
>> at 
>> com.orientechnologies.orient.core.index.OIndexAbstract.commit(OIndexAbstract.java:924)
>>  at 
>> com.orientechnologies.orient.core.tx.OTransactionOptimistic$2.run(OTransactionOptimistic.java:176)
>> at 
>> com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.commit(OLocalPaginatedStorage.java:1560)
>>  at 
>> com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:188)
>> at 
>> com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:116)
>>  at 
>> com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:461)
>> at 
>> com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.commit(ONetworkProtocolBinary.java:1233)
>>  at 
>> com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:323)
>> at 
>> com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:125)
>>  at 
>> com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45)
>>
>>
>> On Monday, June 17, 2013 5:27:17 PM UTC+5:30, Lvc@ wrote:
>>
>>> Hi Melissa,
>>> Could you send me the database privately to see why record #9:4 is dirty 
>>> in any way?
>>>
>>> Lvc@
>>>
>>>
>>>
>>> On 17 June 2013 04:42, Melissa Mifsud <[email protected]> wrote:
>>>
>>>>  This is a strange one!
>>>>
>>>> I am trying to create an index on a property and I get this error 
>>>> message:
>>>>
>>>> *orientdb> create index Connector.name UNIQUE*
>>>>
>>>> *Creating index...*
>>>>
>>>>  *Error: com.orientechnologies.orient.core.index.OIndexException: 
>>>> Error on rebuilding the index for clusters: [connector]*
>>>> *Error: 
>>>> com.orientechnologies.orient.core.storage.ORecordDuplicatedException: 
>>>> Found 
>>>> duplicated key 'Application Performance' on unique index 'Connector.name' 
>>>> for record #9:5. The record already present*
>>>> * in the index is #9:4 RID=#9:4*
>>>>
>>>> This is all well and good... until I run select * from Connector ...
>>>>
>>>> *orientdb> select * from Connector*
>>>>
>>>> *---+---------+--------------------+----------------*
>>>> *  #| RID     |metrics             |name*
>>>> *---+---------+--------------------+----------------*
>>>> *  0|     #9:0|[2]                 |JDash Internal M*
>>>> *  1|     #9:1|[6]                 |SS-10.0.32.16*
>>>> *  2|     #9:2|[12]                |BSM Toll*
>>>> *  3|     #9:3|[3]                 |RUM-10.0.32.46*
>>>> *  4|     #9:6|[0]                 |NNM JDSlab*
>>>> *  5|     #9:7|[1]                 |WayneEnterprises*
>>>> *---+---------+--------------------+----------------*
>>>>
>>>>
>>>>    - There is no connector name 'Application Performance' (there never 
>>>>    was)
>>>>    - And furthermore there where are #9:4 and #9:5 ?
>>>>
>>>> I tried dropping the index because it existed once. I got the same 
>>>> error when recreating it.
>>>>
>>>> When I try to run a DELETE command to remove #9:4 and #9:5 (not sure 
>>>> how this could working seeing as the records don't exist) and I get am 
>>>> OutOfMemoryError
>>>>
>>>> Any ideas what could be going on? This has been a strange week with 
>>>> OrientDB!
>>>>  
>>>> Melissa
>>>>
>>>> -- 
>>>>  
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "OrientDB" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>  
>>>>  
>>>>
>>>
>>>  -- 
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Best regards,
> Andrey Lomakin.
>
> Orient Technologies
> the Company behind OrientDB
>
>  

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to