CMDBuild Forum

Error due to delete/drop from pgAdmin

I tried deleting a class (Invoice) with a domain. I got the error of can not delete a class with values ​​in it. I know I deleted the card and tried Which did not work either. So i deleted the invoice and invoice_history using delete / drop option from pgAdmin III.

Now when i click on tab relations or history tab of any asset or employee or any detail card, I get the following error.

java.lang.IllegalStateException
	at org.cmdbuild.dao.entrytype.DBDomain.getClass2 (DBDomain.java: 82)
	at org.cmdbuild.dao.view.DBDataView.findDomainsFor (DBDataView.java: 60)
	at org.cmdbuild.dao.view.user.UserDataView.findDomainsFor (UserDataView.java: 98)
	at org.cmdbuild.dao.query.clause.join.JoinClause $ Builder.addAllDomains (JoinClause.java: 118)
	at org.cmdbuild.dao.query.clause.join.JoinClause $ Builder.domain (JoinClause.java: 85)
	at org.cmdbuild.dao.query.QuerySpecsBuilder.join (QuerySpecsBuilder.java: 146)
	at org.cmdbuild.logic.commands.AbstractGetRelation.getRelationQuery (AbstractGetRelation.java: 43)
	at org.cmdbuild.logic.commands.GetRelationList.exec (GetRelationList.java: 29)
	at org.cmdbuild.logic.DataAccessLogic.getRelationList (DataAccessLogic.java: 28)
	at org.cmdbuild.servlets.json.management.ModCard.getRelationList (ModCard.java: 729)
	at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25)
	at java.lang.reflect.Method.invoke (Method.java: 597)
	at org.cmdbuild.servlets.JSONDispatcher.dispatch (JSONDispatcher.java: 94)
	at org.cmdbuild.servlets.JSONDispatcher.doGet (JSONDispatcher.java: 60)
	at javax.servlet.http.HttpServlet.service (HttpServlet.java: 621)
	at javax.servlet.http.HttpServlet.service (HttpServlet.java: 722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 210)
	at org.cmdbuild.filters.AuthFilter.doFilter (AuthFilter.java: 54)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 210)
	at org.cmdbuild.filters.PatchManagerFilter.doFilter (PatchManagerFilter.java: 28)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 210)
	at org.cmdbuild.filters.ConfCheckFilter.doFilter (ConfCheckFilter.java: 31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 210)
	at org.cmdbuild.filters.TranslationFilter.doFilter (TranslationFilter.java: 37)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java: 243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java: 210)
	at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java: 225)
	at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java: 123)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java: 472)
	at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java: 168)
	at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java: 98)
	at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java: 927)
	at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java: 118)
	at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java: 407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process (AbstractHttp11Processor.java: 1001)
	at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process (AbstractProtocol.java: 585)
	org.apache.tomcat.util.net.AprEndpoint at $ SocketProcessor.run (AprEndpoint.java: 1770)
	at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask (ThreadPoolExecutor.java: 886)
	at java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java: 908)
	at java.lang.Thread.run (Thread.java: 662)
 
Hi, 
 

Hello,

You have manually deleted the class and its history, but some metadata about this class still exists. For example, the numeric Id of the class. I am still learning this programme, but the simpliet way to make it work again in this case is to stop tomcat, delete category /var/lib/tomcat6/webapps/cmdbuild (not the .war file) and start tomcat again. Another simpliest way is to delete corrupted database and to load its backend (in case you did it, for instance, with pg_dump).

 

The workflow manual has the description of some JavaAPI, in particular, the method getIdClass(), which returns int-value. But I haven't found the class with it yet.

Hello,
that worked for me by stop tomcat, delete temp and work content ad restart tomcat!
 
Thank you very much
 
Hans
 
 
Previously azv wrote:

Hello,

You have manually deleted the class and its history, but some metadata about this class still exists. For example, the numeric Id of the class. I am still learning this programme, but the simpliet way to make it work again in this case is to stop tomcat, delete category /var/lib/tomcat6/webapps/cmdbuild (not the .war file) and start tomcat again. Another simpliest way is to delete corrupted database and to load its backend (in case you did it, for instance, with pg_dump).

 

The workflow manual has the description of some JavaAPI, in particular, the method getIdClass(), which returns int-value. But I haven't found the class with it yet.