This is a migrated thread and some comments may be shown as answers.

Telerik Reporting Cached Session

1 Answer 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 08 Nov 2013, 12:02 AM
Hello,

I am having problems getting the cached report to work properly, attached is the Stack Trace.  I followed everything on the step by step guide and it works in some instances and others it gives the error "missing object name 'session_state'.


Server Error in '/' Application.

Invalid object name 'session_state'.
Statement(s) could not be prepared.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'session_state'.
Statement(s) could not be prepared.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SQLException: Invalid object name 'session_state'.
Statement(s) could not be prepared.]
   Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery() +499
   OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery() +118
   OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute() +152
 
[DataStoreException: Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'session_state'.
Statement(s) could not be prepared.
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
SQL:
SELECT [modified_date] AS COL1                  FROM [session_state] WHERE [resource_id] = ?                                       AND [session_id] = ?                                        Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'session_state'.
Statement(s) could not be prepared.
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()]
   Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) +28
   OpenAccessRuntime.ExceptionWrapper.Throw() +34
   OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.handleException(Exception x, Boolean needsRollback) +1433
   OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.getObjectById(Object oid, Boolean validate) +1144
   OpenAccessRuntime.DataObjects.OpenAccessPersistenceManagerImp.GetObjectByKey(ObjectKey key) +66
   OpenAccessRuntime.DataObjects.UnsynchronizedPMProxy.GetObjectByKey(ObjectKey key) +50
   OpenAccessRuntime.ObjectScope.GetObjectByKey(ObjectKey key) +50
   Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQueryImpl(Type resultType, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid) +676
   Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid) +97
 
[InvalidOperationException: An exception occured during the execution of 'Extent<Telerik.Reporting.Cache.Database.SessionState>().Where(sessionState => (sessionState.SessionId == value(Telerik.Reporting.Cache.Database.DatabaseCache).sessionKey)).Where(sessionState => (sessionState.ResourceId == value(Telerik.Reporting.Cache.Database.DatabaseCache+<>c__DisplayClass4).key))'. Failure: Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'session_state'.
Statement(s) could not be prepared.
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
SQL:
SELECT [modified_date] AS COL1                  FROM [session_state] WHERE [resource_id] = ?                                       AND [session_id] = ?                                        Telerik.OpenAccess.RT.sql.SQLException: Invalid object name 'session_state'.
Statement(s) could not be prepared.
   at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.executeQuery()
   at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.executeQuery()
   at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
See InnerException for more details.
Complete Expression:
.Call System.Linq.Queryable.Where(
    .Call System.Linq.Queryable.Where(
        .Constant<Telerik.OpenAccess.Query.ExtentQueryImpl`1[Telerik.Reporting.Cache.Database.SessionState]>(Extent<Telerik.Reporting.Cache.Database.SessionState>()),
        '(.Lambda #Lambda1<System.Func`2[Telerik.Reporting.Cache.Database.SessionState,System.Boolean]>)),
    '(.Lambda #Lambda2<System.Func`2[Telerik.Reporting.Cache.Database.SessionState,System.Boolean]>))
 
.Lambda #Lambda1<System.Func`2[Telerik.Reporting.Cache.Database.SessionState,System.Boolean]>(Telerik.Reporting.Cache.Database.SessionState $sessionState)
{
    $sessionState.SessionId == .Constant<Telerik.Reporting.Cache.Database.DatabaseCache>(Telerik.Reporting.Cache.Database.DatabaseCache).sessionKey
}
 
.Lambda #Lambda2<System.Func`2[Telerik.Reporting.Cache.Database.SessionState,System.Boolean]>(Telerik.Reporting.Cache.Database.SessionState $sessionState)
{
    $sessionState.ResourceId == .Constant<Telerik.Reporting.Cache.Database.DatabaseCache+<>c__DisplayClass4>(Telerik.Reporting.Cache.Database.DatabaseCache+<>c__DisplayClass4).key
}
]
   Telerik.OpenAccess.Query.ExpressionCompiler.PerformDatabaseQuery(Type type, Int32 elementAt, Object[] groupResolutionParamValues, Boolean single, Boolean checkOid) +489
   Telerik.OpenAccess.Query.ExpressionExecution.PerformDatabaseQuerySingle(ChainedContext context, Expression expression, QueryableCategory before, Int32& found, Int32 elemAt, Boolean single, Boolean diffType) +610
   Telerik.OpenAccess.Query.ExpressionExecution.PerformQuerySingle(QueryableCategory before, Expression expression, Boolean tryGetObjectById, ChainedContext piece) +2491
   Telerik.OpenAccess.Query.Piece`1.ExecuteSingle(Expression expression) +527
   Telerik.OpenAccess.Query.Piece`1.System.Linq.IQueryProvider.Execute(Expression expr) +80
   System.Linq.Queryable.SingleOrDefault(IQueryable`1 source) +265
   Telerik.Reporting.Cache.Database.DatabaseCache.SetValue(String key, Byte[] value) +1185
   Telerik.ReportViewer.WebForms.StreamManager.StreamReady(RenderStream renderStream) +183
   Telerik.ReportViewer.WebForms.RenderStream.Finish() +46
   Telerik.Reporting.Html5Rendering.Writers.Html.ImageWriter.SaveImageInStream(IImageContainer imageContainer) +755
   Telerik.Reporting.Html5Rendering.Writers.Html.ImageWriter.SaveImageInStream(Image image) +73
   Telerik.Reporting.Html5Rendering.Writers.Html.Element.CreateToggleAdorner(IAdornerAction adornerAction, IInteractiveItem item, ElementPageInfo pageInfo) +603
   Telerik.Reporting.Html5Rendering.Writers.Html.Element.WriteAction(LayoutElement element, ElementPageInfo pageInfo) +459
   Telerik.Reporting.Html5Rendering.Writers.Html.Element.Begin(LayoutElement element, ElementPageInfo pageInfo) +613
   Telerik.Reporting.Html5Rendering.Writers.Html.TextBox.Begin(LayoutElement element, ElementPageInfo pageInfo) +137
   Telerik.Reporting.Html5Rendering.Writers.Report.WriteStartElement(LayoutElement element, ElementPageInfo pageInfo) +90
   Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.StartElement(LayoutElement element, ElementPageInfo info) +49
   Telerik.Reporting.Paging.PageStartElement.AddToPage(IPageHandler handler) +52
   Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler) +113
   Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler) +59
   Telerik.Reporting.Paging.PageCompositionBase.AddElementsToPage() +70
   Telerik.Reporting.Paging.PageCompositionBase.SendPhysicalPages() +57
   Telerik.Reporting.Paging.PageCompositionBase.OutputPage() +973
   Telerik.Reporting.Paging.PageCompositionBase.CreatePages() +638
   Telerik.Reporting.Paging.PagerBase.Telerik.Reporting.Paging.IPager.CreatePages(IPageHandler handler, Report report) +73
   Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +418
   Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) +1595
   Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) +92
   Telerik.ReportViewer.WebForms.ReportPageOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext) +104
   Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() +319
   Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperationOverride() +152
   Telerik.ReportViewer.WebForms.HandlerOperation.PerformOperation(HttpContext context, ICacheManager cacheManager) +74
   Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) +255
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 12 Nov 2013, 01:42 PM
Hello Daniel,

You need to create a database that will store the cache information by running the Database Cache Configurator Tool as described in the Configuring the Database Cache Provider help article. Then verify the existence of the dbo.session_state table in the database. Finally configure the application to use the OpenAccess Database provider and provide the correct connection string to the database containing the previously mentioned session_state table.

If you need further help, please elaborate on your configuration settings, used Telerik Reporting and OpenAccess ORM versions, and used as storage database accessibility (if there is required authentication).

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

Tags
General Discussions
Asked by
Daniel
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or