Interesting situation: Exception while trying to load assets by RAM Api but load is successfeull after some time
Hi all,
I m trying to load my assets to RAM via java API but i got following exception for some assets. Although it says failed to load assets after some time i saw those assets in RAM !. I m reading asset information from excel file and just loading that metadata in excel, no content or file being uploaded. Any comments? thanks. WARN [Upload MBBZKMKK[1.0]] (RAMClient.java:1498) 2013-03-21 09:31:26,159 - HTTP Error trying to upload. (500: Internal Server Error), STATUSTEXT:Internal Server Error, RESPONSE:Error 500: Unknown exception while submitting asset : Failed to submit asset - MBBZKMKK - ID#D4798663-8BAB-7295-D237-AB80F3343C66 Version#1.0 - Exception in QueryEngine insertcreate ERROR [Upload MBBZKMKK[1.0]] (RAMSession.java:3279) 2013-03-21 09:31:26,175 - Error when uploading the asset {0}.MBBZKMKK[1.0] Manifest = <?xml version="1.0" encoding="UTF-8"?> <defaultprofile:Asset xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:defaultprofile="http:///defaultprofile22.ecore" name="MBBZKMKK" id="D4798663-8BAB-7295-D237-AB80F3343C66" version="1.0" shortDescription="MBB Cobol Program"> <classification> <descriptorGroup name="AssetType"> <nodeDescriptor href="http://ramsrv:13080/ram/classif/assetTypesSchema.xmi#cobol_pgm"/> </descriptorGroup> <descriptorGroup name="CustomAttributes"> <nodeDescriptor href="http://ramsrv:13080/ram/classif/assetTypesSchema.xmi#o"/> <classificationSchema href="http://ramsrv:13080/ram/classif/assetTypesSchema.xmi#/"/> </descriptorGroup> </classification> <solution/> </defaultprofile:Asset> Archive = [no file] ERROR [Upload MBBZKMKK[1.0]] (Monitoring.java:44) 2013-03-21 09:31:26,175 - The asset MBBZKMKK[1.0] was not created. com.ibm.ram.internal.client.RAMServiceException: Unknown exception while submitting asset: Failed to submit asset - MBBZKMKK - ID#D4798663-8BAB-7295-D237-AB80F3343C66 Version#1.0 - Exception in QueryEngine insertcreate[500] at com.ibm.ram.internal.client.RAMClient.uploadAsset(RAMClient.java:1535) at com.ibm.ram.client.RAMSession.putAsset(RAMSession.java:3212) at com.ibm.ram.client.RAMSession.access$2(RAMSession.java:2967) at com.ibm.ram.client.RAMSession$1.run(RAMSession.java:2730) at java.lang.Thread.run(Unknown Source) |
3 answers
Hi Gili,
the remaining part of log is as following,
by the way we installed RAM 7.5.1.1 on windows 2008 server r2 edition sp1 with embedded was and MS SQL Server as standalone DB.
......
Caused by:
com.ibm.ram.repository.core.IRepositoryAccess$RepositoryException: Exception in QueryEngine insertcreate
at java.lang.Throwable.<init>(Throwable.java:67)
at com.ibm.ram.repository.core.IRepositoryAccess$RepositoryException.<init>(IRepositoryAccess.java:581)
at com.ibm.ram.repository.core.sdo.BaseRAMSchemaAccess.createRepositoryException(BaseRAMSchemaAccess.java:1972)
at com.ibm.ram.repository.core.sdo.BaseRAMSchemaAccess.throwRepositoryException(BaseRAMSchemaAccess.java)
at com.ibm.ram.repository.core.sdo.BaseRAMSchemaAccess.applySubscriptionChanges(BaseRAMSchemaAccess.java:12567)
at com.ibm.ram.repository.subscription.SubscriptionManager.addAssetSubscription(SubscriptionManager.java:196)
at com.ibm.ram.repository.assets.AssetManager.submitAssetWithState(AssetManager.java:4176)
... 50 more
Caused by:
com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 189) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeUpdate(WSJdbcPreparedStatement.java:793)
at com.ibm.ws.sdo.mediator.jdbc.JDBCAdapter.executeUpdate(JDBCAdapter.java:113)
at com.ibm.ws.sdo.mediator.jdbc.ConnectionWrapperImpl.executeUpdate(ConnectionWrapperImpl.java:202)
at com.ibm.ws.sdo.mediator.jdbc.queryengine.QueryEngineImpl.executeWriteQuery(QueryEngineImpl.java:159)
at com.ibm.ws.sdo.mediator.jdbc.queryengine.QueryEngineImpl.executeInsert(QueryEngineImpl.java:107)
at com.ibm.ws.sdo.mediator.jdbc.Create.applyChange(Create.java:37)
at com.ibm.ws.sdo.mediator.jdbc.GraphChanges.doInserts(GraphChanges.java:115)
at com.ibm.ws.sdo.mediator.jdbc.GraphChanges.applyChanges(GraphChanges.java:186)
at com.ibm.ws.sdo.mediator.jdbc.MediatorImpl.applyChanges(MediatorImpl.java:153)
at com.ibm.ws.sdo.mediator.jdbc.MediatorImpl.applyChanges(MediatorImpl.java:131)
at com.ibm.ws.sdo.mediator.jdbc.MediatorImpl.applyChanges(MediatorImpl.java:139)
at com.ibm.ram.repository.core.sdo.BaseRAMSchemaAccess.applySubscriptionChanges(BaseRAMSchemaAccess.java:12546)
... 52 more
[03/22/13 04:24:44 EET] CRRAM0001E 51233112 ERROR ws com.ibm.ram.repository.web.RAMAssetAccess - User=43274:Unknown exception while submitting asset
com.ibm.ram.common.data.exception.RAMRuntimeException: Failed to submit asset - GNLV908 - ID#06AE817D-CEBD-C786-B78A-80EA985333EE Version#1.0 - Exception in QueryEngine insertcreate
at com.ibm.ram.repository.ws.core.BaseAssetAccess.submitAsset(BaseAssetAccess.java:406)
at com.ibm.ram.repository.web.RAMAssetAccess.submitAsset(RAMAssetAccess.java:488)
at com.ibm.ram.repository.web.RAMAssetAccess.upload(RAMAssetAccess.java:261)
at com.ibm._jsp._RAMAssetAccess._jspService(_RAMAssetAccess.java:87)
......
|
You had a deadlock. I'm not sure why you did. But the deadlock occurred after the actual submission. It occurred while trying to apply subscription changes. This is the initial subscription of the asset by the submitter. This is done automatically unless that user had configured her profile to not automatically subscribe to new assets.
Now the question is "Are you repeatedly getting this deadlock in the applySubscriptionChanges method?" If so we may have a common situation that can be fixed. Maybe not. It is hard to tell with deadlocks. But since this is the second last thing done it got through the rest of the asset submission successfully. So the indexer will, after 30 seconds, pick up the new asset and index it so it shows in searches. The only thing done after this is to add any tags the submitter may of put in the request. That would of been lost along with the automatic subscription. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
By the way, i m using session.queueAssetForPut(newAsset);
method in loop for each asset and
at the end
RAMStatus finalStatus = session.putAssets(Monitoring.getStatusMonitor());
and finally
session.release.
methods.
We would need:
1) The exact version of RAM and RAMClient that you are using, including the testfix number applied, if any. Just 7.5 is not sufficient as a version, need down to the four digits of 7.x.x.x.
2) Need the ramdebug.log on the server at that time. That is a host error and it would be logged on the host and not here.
It is possible that the asset got halfway created when something went wrong on the host. That is why it would show up later in the index, enough got saved that it shows as an asset but the submission wasn't completed.
hi Richard, since comment area is short for answer, i replied as an answer to your questions.