It's all about the answers!

Ask a question

Interesting situation: Exception while trying to load assets by RAM Api but load is successfeull after some time


idris yuce (13145) | asked Mar 21 '13, 3:41 a.m.
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)

Comments
idris yuce commented Mar 21 '13, 3:49 a.m.

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.



Rich Kulp commented Mar 21 '13, 6:41 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

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.


idris yuce commented Apr 01 '13, 7:10 a.m.

hi Richard, since comment area is short for answer, i replied as an answer to your questions.  

3 answers



permanent link
idris yuce (13145) | answered Apr 01 '13, 7:09 a.m.
  Hi Richard,
I think the main problem is wiht our installation resources and that makes server being overloaded after a while with bulk upload requests. Anyway requested information is below, any help will be appreciated, thanks.


1- Ram Version is 7.5.1.1
2- Following you can see part of ramdebuglog .

[03/24/13 22:56:33 EET] CRRAM0001E  9589493 ERROR  ws com.ibm.ram.common.data.exception.RAMRuntimeException - RAM Runtime Exception.
com.ibm.ram.common.data.exception.RAMRuntimeException: Failed to submit asset - YTRVURD  - ID#46C498CB-9C3B-3B67-B6DF-BC432AA25E04 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)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:354)
at com.ibm.ram.repository.web.ws.RAMSecure.doRequest(RAMSecure.java:40)
at com.ibm.ram.repository.web.ws.RAMSecure.doPost(RAMSecure.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.ibm.ram.repository.web.RAMWSServletFilter.doFilter(RAMWSServletFilter.java:511)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3935)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: 
java.lang.IllegalStateException: Unable to submit asset "46C498CB-9C3B-3B67-B6DF-BC432AA25E04 ?[1.0]"
at com.ibm.ram.repository.assets.AssetManager.submitAssetWithState(AssetManager.java:4181)
at com.ibm.ram.repository.assets.AssetManager.submitAsset(AssetManager.java:3897)
at com.ibm.ram.repository.ws.core.BaseAssetAccess.submitAsset(BaseAssetAccess.java:323)
... 50 more
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)
... 52 more
Caused by: 
com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 161) 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:160)
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:146)
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)
... 54 more


Comments
Gili Mendel commented Apr 01 '13, 1:05 p.m.
JAZZ DEVELOPER

Is this the whole dump; what is the first exception cause (below the applySubscriptionChanges) ?


permanent link
idris yuce (13145) | answered Apr 02 '13, 3:04 a.m.
 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)
......

permanent link
Rich Kulp (3.6k38) | answered Apr 04 '13, 11:58 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
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


Register or to post 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.