Para Desenvolvedores

Caused by: java. sql. SQLIntegrityConstraintViolationException: Cannot delete or update a parent row

Estou tentando excluir um serviço que não é usado há muito tempo e está dando o seguinte erro

2020-05-06 12:24:54,709 DEBUG 177.235.20.62 admin    [LumisRequest - default task-45; url: [https://admin.fenae.org.br/portal/lumis/portal-studio/main.jsp?lumPageId=LumisServices&lumChannelId=3DFEE6821FF9F9CE0120006EECE80816&lumRTI=lumis.service.portalmanagement.serviceinstance.administration]; login: [admin]] lumis.portal.audit.AuditManager - Category: Structure - Type: Delete Service Interface Instance - User: 00000000D00000000000000000000001 admin - Title: 'Deleted service interface instance: Administração de Reserva' - Description: 'Deleted service interface instance
  id: 8A19A3024F2C93CF014F3288D900748C
  interface id: fenae.reservas.reserva
  display name: Administração de Reserva
  page id: 00000000E00000000000000000000001
  page name: Dashboard
  service instance id: 3DFEE6821FF9F9CE0120006F283C0BCF'
2020-05-06 12:24:55,400 WARN       [default task-108] lumisservice.lumis.portal.navigation - The requested resource (/portal/data/files/3B/C6/21/D9/A3AE1710A0386D17403A91A8/2020-05-06.jpg) is not available. Its origin was: https://admin.fenae.org.br/portal/lumis/portal-studio/main.jsp?lumChannelId=3DFEE6821FF9F9CE0120006EECE80816&lumPageId=LumisServices
2020-05-06 12:24:55,462 ERROR 177.235.20.62 admin    [LumisRequest - default task-45; url: [https://admin.fenae.org.br/portal/lumis/portal-studio/main.jsp?lumPageId=LumisServices&lumChannelId=3DFEE6821FF9F9CE0120006EECE80816&lumRTI=lumis.service.portalmanagement.serviceinstance.administration]; login: [admin]] lumis.portal.UnexpectedException - lumis.portal.UnexpectedException created
lumis.portal.UnexpectedException: STR_UNEXPECTED_EXCEPTION
	at lumis.portal.serviceinstance.ServiceInstanceDaoHib.delete(ServiceInstanceDaoHib.java:107)
	at lumis.portal.serviceinstance.ServiceInstanceManager.delete(ServiceInstanceManager.java:504)
	at lumis.service.portalmanagement.serviceinstance.ServiceInstanceProcessActionHandler.processDeleteAction(ServiceInstanceProcessActionHandler.java:290)
	at lumis.service.portalmanagement.serviceinstance.ServiceInstanceProcessActionHandler.processAction(ServiceInstanceProcessActionHandler.java:61)
	at lumis.doui.processaction.ProcessActionContainer.processAction(ProcessActionContainer.java:323)
	at lumis.doui.processaction.ProcessActionContainer.processActions(ProcessActionContainer.java:131)
	at lumis.doui.processaction.ProcessActionContainer.processActions(ProcessActionContainer.java:110)
	at lumis.doui.service.DouiServiceInterface.processActions(DouiServiceInterface.java:433)
	at lumis.doui.service.DouiServiceInterface.processAction(DouiServiceInterface.java:571)
	at lumis.service.portalmanagement.serviceinstance.AdministrationInterface.processAction(AdministrationInterface.java:39)
	at lumis.portal.servicecontainer.ServiceContainer.lambda$processServiceInterfaceInstanceAction$1(ServiceContainer.java:929)
	at lumis.portal.util.PortalUtilInternal.execWithSilentThrow(PortalUtilInternal.java:533)
	at lumis.util.log.MDCUtil.execWithValues(MDCUtil.java:60)
	at lumis.util.log.MDCUtil.execWithValues(MDCUtil.java:45)
	at lumis.portal.servicecontainer.ServiceContainer.processServiceInterfaceInstanceAction(ServiceContainer.java:920)
	at lumis.portal.presentation.PresentationControllerHtml.processActionIfRequired(PresentationControllerHtml.java:1492)
	at lumis.portal.presentation.PresentationControllerHtml.renderPage(PresentationControllerHtml.java:573)
	at org.apache.jsp.main_jsp._jspService(main_jsp.java:95)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:402)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:346)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at lumis.portal.rest.RestRootFilter.doFilter(RestRootFilter.java:337)
	at org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:462)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:266)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:201)
	at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:202)
	at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:109)
	at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.bull.javamelody.JspWrapper.invoke(JspWrapper.java:152)
	at net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:294)
	at com.sun.proxy.$Proxy236.forward(Unknown Source)
	at lumis.portal.presentation.PresentationControllerHtml.forward(PresentationControllerHtml.java:1209)
	at lumis.portal.url.WebResourceForwardFilter.doFilter(WebResourceForwardFilter.java:335)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.security.csr.CrossSiteRequestFilter.doFilter(CrossSiteRequestFilter.java:264)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.url.WebResourceDiscoveryFilter.doFilter(WebResourceDiscoveryFilter.java:365)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.presentation.PortalModeDiscoveryFilter.doFilter(PortalModeDiscoveryFilter.java:125)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:232)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:209)
	at lumis.service.portalmanagement.monitoring.JavaMelodyCustomMonitoringFilter.doFilter(JavaMelodyCustomMonitoringFilter.java:221)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.authentication.AuthenticationFilter.changeThreadNameAndProceed(AuthenticationFilter.java:490)
	at lumis.portal.authentication.AuthenticationFilter.lambda$doFilter$0(AuthenticationFilter.java:291)
	at lumis.portal.util.PortalUtilInternal.execWithSilentThrow(PortalUtilInternal.java:533)
	at lumis.util.log.MDCUtil.execWithValues(MDCUtil.java:60)
	at lumis.portal.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:282)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.monitor.impl.MonitorContextFilter.lambda$doFilter$1(MonitorContextFilter.java:440)
	at lumis.portal.util.PortalUtilInternal.execWithSilentThrow(PortalUtilInternal.java:533)
	at lumis.util.log.MDCUtil.execWithValues(MDCUtil.java:60)
	at lumis.portal.monitor.impl.MonitorContextFilter.doFilter(MonitorContextFilter.java:418)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.page.cache.PageCacheSSIFilter.doFilter(PageCacheSSIFilter.java:52)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.PortalRequestContextFilter.doFilter(PortalRequestContextFilter.java:97)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.filter.EncodingUTF8Filter.doFilter(EncodingUTF8Filter.java:35)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.webserver.WebServerIntegrationInitFilter.doFilter(WebServerIntegrationInitFilter.java:367)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.website.WebsiteDiscoveryFilter.doFilter(WebsiteDiscoveryFilter.java:302)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at lumis.portal.PortalConfiguration$RequestInitializer.lambda$doFilter$0(PortalConfiguration.java:159)
	at lumis.portal.util.PortalUtilInternal.execWithSilentThrow(PortalUtilInternal.java:533)
	at lumis.util.log.MDCUtil.execWithValues(MDCUtil.java:60)
	at lumis.util.log.MDCUtil.execWithValues(MDCUtil.java:45)
	at lumis.portal.PortalConfiguration$RequestInitializer.doFilter(PortalConfiguration.java:157)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:792)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`lumisportal`.`lum_content`, CONSTRAINT `LUM_FK_CONTENT1` FOREIGN KEY (`serviceInstanceId`) REFERENCES `lum_serviceinstance` (`serviceinstanceid`))
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1113)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1381)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1046)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
	at lumis.portal.serviceinstance.ServiceInstanceDaoHib.delete(ServiceInstanceDaoHib.java:94)
	... 127 more
2020-05-06 12:24:55,493 INFO       [Lumis Monitor Processor - 2] lumisservice.lumis.util.log.AccessAuditLogger - Loaded monitor user 00000000D00000000000000000000001; current monitor user id: null

Como conseguir excluir?

Por Rogerio Rodrigues

Em 06/05/20 12:27

Acompanhar pergunta

1 resposta(s):

Ordenar por:

Rogério,

Isso deve ser porque essa instância de serviço que você está tentando apagar possui conteúdo cadastrado.

 

Atenciosamente

Por Thiago Berne

Em 22/05/20 10:02

Entrar

Interaja com a comunidade e tenha acesso a conteúdos exclusivos.

Houve algum erro ao acessar o banco de dados. Tente novamente mais tarde.