#1 2016-02-01 16:15:10

ralex
Member
Registered: 2015-04-20

How to fix reportserver db inconsistency

Hi,
I tried to change the hierarchical position of a birt report via tables.
In detail I changed both the 'parent_id' and 'position' values from the table "rs_report_mngr_node".
The big issue is I can't add/remove any report from the gui now.
By fortune is the development db , is there any way to fix this?
I was thinking to clone production and copy it on development  , but first I would like to know if there is any other option.
Thanks.

Offline

#2 2016-02-01 18:10:44

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: How to fix reportserver db inconsistency

Hi Alex,

changing records directly in the database is something that should usually be avoided, as the obvious may often not be the correct and can easily lead to a corrupted database.

May I ask, what exactly you changed? That is, could you post the update statement, that you tried?

Does ReportServer give you any error messages when you try to add or remove a report via the GUI?

Best regards,
Arno

Offline

#3 2016-02-01 18:26:57

ralex
Member
Registered: 2015-04-20

Re: How to fix reportserver db inconsistency

I fundamentally changed two values ('parent_id' and 'position' ) for the "table rs_report_mngr_node"  :

select * 
from rs_report_mngr_node
where entity_id = 1147135 for update

and then I substituted 'position' from 59 to 10 value (it was sure that 10 was free for the new parent_id chosen) and parent_id from "old_value" to "new_value" (that represents the folder where I wanted to put into my birt file (I wrote down "old_value" and "new_value" because I don't remember the values that I put)).
After that I restarted the application and I can't  remove/add any file from the gui now, but I don't have any error in the gui .
I mean it seems that it add/delete the report,but nothing happens.
I also re-typed the old values in that table  (rs_report_mngr_node), but I didn't success.
I haven't checked log on tomcat yet , but I will be able to do tomorrow.

Last edited by ralex (2016-02-01 18:29:37)

Offline

#4 2016-02-02 07:09:33

ralex
Member
Registered: 2015-04-20

Re: How to fix reportserver db inconsistency

Hi Arno,
below more detail about the issue:

org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: net.datenwerke.rs.core.service.reportmanager.entities.reports.Report<br>	at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:114)<br>	at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:136)<br>	at org.hibernate.tuple.entity.AbstractEntityTuplizer.instantiate(AbstractEntityTuplizer.java:730)<br>	at org.hibernate.persister.entity.AbstractEntityPersister.instantiate(AbstractEntityPersister.java:4552)<br>	at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1388)<br>	at org.hibernate.internal.SessionImpl.instantiate(SessionImpl.java:1377)<br>	at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1595)<br>	at org.hibernate.loader.Loader.getRow(Loader.java:1504)<br>	at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:712)<br>	at org.hibernate.loader.Loader.processResultSet(Loader.java:942)<br>	at org.hibernate.loader.Loader.doQuery(Loader.java:910)<br>	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:341)<br>	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:311)<br>	at org.hibernate.loader.Loader.loadCollection(Loader.java:2234)<br>	at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:65)<br>	at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:674)<br>	at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:85)<br>	at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1849)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:549)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:234)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:545)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:124)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:153)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection$1.doWork(AbstractPersistentCollection.java:138)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:234)<br>	at org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:137)<br>	at org.hibernate.collection.internal.PersistentBag.size(PersistentBag.java:242)<br>	at net.datenwerke.treedb.service.treedb.AbstractNode.hasChildren(AbstractNode.java:213)<br>	at net.datenwerke.treedb.service.treedb.dtogen.AbstractNode2DtoPostProcessor.dtoCreated(AbstractNode2DtoPostProcessor.java:34)<br>	at net.datenwerke.rs.core.service.reportmanager.entities.dtogen.ReportFolder2DtoGenerator.createDto(ReportFolder2DtoGenerator.java:83)<br>	at net.datenwerke.rs.core.service.reportmanager.entities.dtogen.ReportFolder2DtoGenerator.createDto(ReportFolder2DtoGenerator.java:1)<br>	at net.datenwerke.rs.core.service.dtoservice.RsCoreDtoServiceImpl.createDto(RsCoreDtoServiceImpl.java:237)<br>	at net.datenwerke.gf.service.dtoservice.DtoServiceImpl.createDto(DtoServiceImpl.java:204)<br>	at net.datenwerke.security.server.TreeDBManagerTreeHandler.getChildrenAsFto(TreeDBManagerTreeHandler.java:208)<br>	at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110)<br>	at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>	at java.lang.reflect.Method.invoke(Method.java:606)<br>	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)<br>	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)<br>	at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110)<br>	at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)<br>	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)<br>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)<br>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)<br>	at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:110)<br>	at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)<br>	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)<br>	at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)<br>	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)<br>	at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89)<br>	at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)<br>	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)<br>	at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)<br>	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)<br>	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)<br>	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)<br>	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)<br>	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)<br>	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)<br>	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)<br>	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)<br>	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)<br>	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)<br>	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)<br>	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)<br>	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)<br>	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)<br>	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)<br>	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)<br>	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)<br>	at java.lang.Thread.run(Thread.java:745)<br>

Here is the error popup message :
http://i65.tinypic.com/2qnxu0n.jpg

Please let me know...if it's recoverable or simpler I can clone the db production onto dev.
Thanks,
Ale

Offline

#5 2016-02-02 07:22:16

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: How to fix reportserver db inconsistency

Hi Alex,

did you do any manual inserts into any of the tables?

(Cloning production to dev, might be the simplest way to recover this)

Best,
Arno

Offline

#6 2016-02-02 09:55:31

ralex
Member
Registered: 2015-04-20

Re: How to fix reportserver db inconsistency

Hi,
ok issue resolved by dumping the prod to dev.
I have all reports pointing to production db now.
Is there a fast way to change this link to db dev without messing up the schema again? smile
Thanks,
Ale

Offline

#7 2016-02-02 15:13:10

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: How to fix reportserver db inconsistency

I am not quite sure I understand the problem. I assume that you have a datasource configured within ReportServer. Can't you simply change the settings of the data source?

Offline

#8 2016-02-03 09:41:53

ralex
Member
Registered: 2015-04-20

Re: How to fix reportserver db inconsistency

Hi,
I configured datasource by hand for each report in development, because after cloning the production to development all reports was pointing to db production instead of development.
My question for next time was :
Instead of configuring database source for each report by hand , is there a fastest way of doing this by sql db?
Just to know in case next time I need this kind of this information.

Arno Mittelbach wrote:

I am not quite sure I understand the problem. I assume that you have a datasource configured within ReportServer. Can't you simply change the settings of the data source?

Offline

#9 2016-02-03 14:40:19

Thorsten J. Krause
datenwerke
Registered: 2012-02-15
Website

Re: How to fix reportserver db inconsistency

Hi ralex,

I guess you could just have renamed the datasource and modified its configuration instead of updating every report to use a different datasource.

Cheers,
Thorsten

Offline

#10 2016-02-04 10:26:14

ralex
Member
Registered: 2015-04-20

Re: How to fix reportserver db inconsistency

Yes,
it would have been a good trick smile
I'll be keeping in mind next time , if I need it.
Thanks again

Thorsten J. Krause wrote:

Hi ralex,

I guess you could just have renamed the datasource and modified its configuration instead of updating every report to use a different datasource.

Cheers,
Thorsten

Offline

Board footer

Powered by FluxBB