Error when generating source files for business object model

Hi.
I have a problem with a nice portal.
When wanting to import my business model, I have an error.
I’m using jboos with Postgres.
13:47:41,454 GRAVE [org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet] (http--0.0.0.0-8080-2) org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException: USERNAME=install | org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.bdm.CodeGenerationException: Error when generating source files for business object model: org.bonitasoft.web.toolkit.client.common.exception.api.APIException: org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException: USERNAME=install | org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.bdm.CodeGenerationException: Error when generating source files for business object model at org.bonitasoft.web.rest.server.engineclient.TenantManagementEngineClient.installBusinessDataModel(TenantManagementEngineClient.java:35) [console-server-7.1.3.jar:] at org.bonitasoft.web.rest.server.api.tenant.APIBusinessDataModel.add(APIBusinessDataModel.java:41) [console-server-7.1.3.jar:] at org.bonitasoft.web.rest.server.api.tenant.APIBusinessDataModel.add(APIBusinessDataModel.java:27) [console-server-7.1.3.jar:] at org.bonitasoft.web.rest.server.framework.API.runAdd(API.java:156) [console-server-7.1.3.jar:] at org.bonitasoft.web.rest.server.framework.APIServletCall.doPost(APIServletCall.java:213) [console-server-7.1.3.jar:] at org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.doPost(ToolkitHttpServlet.java:188) [console-server-7.1.3.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:75) [console-server-7.1.3.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.bonitasoft.web.toolkit.server.servlet.ToolkitHttpServlet.service(ToolkitHttpServlet.java:226) [console-server-7.1.3.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) [urlrewritefilter-4.0.3.jar:4.0.3] at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) [urlrewritefilter-4.0.3.jar:4.0.3] at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) [urlrewritefilter-4.0.3.jar:4.0.3] at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) [urlrewritefilter-4.0.3.jar:4.0.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60) [console-server-7.1.3.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:622) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:560) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:488) [jbossweb-7.0.13.Final.jar:] at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213) [urlrewritefilter-4.0.3.jar:4.0.3] at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171) [urlrewritefilter-4.0.3.jar:4.0.3] at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) [urlrewritefilter-4.0.3.jar:4.0.3] at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) [urlrewritefilter-4.0.3.jar:4.0.3] at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394) [urlrewritefilter-4.0.3.jar:4.0.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60) [console-server-7.1.3.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.bonitasoft.console.common.server.login.filter.AbstractAuthorizationFilter.doFilter(AbstractAuthorizationFilter.java:60) [console-server-7.1.3.jar:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_79] Caused by: org.bonitasoft.engine.business.data.BusinessDataRepositoryDeploymentException: USERNAME=install | org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.bdm.CodeGenerationException: Error when generating source files for business object model at org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.installBusinessDataModel(TenantAdministrationAPIImpl.java:282) [bonita-server-7.1.3.jar:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_79] at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_79] at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:463) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.api.impl.ServerAPIImpl$2.call(ServerAPIImpl.java:432) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:316) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:439) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:272) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:124) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86) [bonita-common-7.1.3.jar:] at com.sun.proxy.$Proxy23.installBusinessDataModel(Unknown Source) at org.bonitasoft.web.rest.server.engineclient.TenantManagementEngineClient.installBusinessDataModel(TenantManagementEngineClient.java:31) [console-server-7.1.3.jar:] ... 48 more Caused by: org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.bdm.CodeGenerationException: Error when generating source files for business object model at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.createClientBDMZip(BusinessDataModelRepositoryImpl.java:180) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.install(BusinessDataModelRepositoryImpl.java:149) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.installBusinessDataModel(TenantAdministrationAPIImpl.java:278) [bonita-server-7.1.3.jar:] ... 61 more Caused by: org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException: org.bonitasoft.engine.bdm.CodeGenerationException: Error when generating source files for business object model at org.bonitasoft.engine.bdm.AbstractBDMJarBuilder.build(AbstractBDMJarBuilder.java:66) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.generateClientBDMZip(BusinessDataModelRepositoryImpl.java:206) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.createClientBDMZip(BusinessDataModelRepositoryImpl.java:177) [bonita-server-7.1.3.jar:] ... 63 more Caused by: org.bonitasoft.engine.bdm.CodeGenerationException: Error when generating source files for business object model at org.bonitasoft.engine.bdm.AbstractBDMJarBuilder.addSourceFilesToDirectory(AbstractBDMJarBuilder.java:74) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.bdm.client.ClientBDMJarBuilder.addSourceFilesToDirectory(ClientBDMJarBuilder.java:37) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.bdm.AbstractBDMJarBuilder.build(AbstractBDMJarBuilder.java:59) [bonita-server-7.1.3.jar:] ... 65 more Caused by: java.lang.IllegalArgumentException: Class com.epam.Solicitud already exists in target runtime environment. at org.bonitasoft.engine.bdm.EntityCodeGenerator.validateClassNotExistsInRuntime(EntityCodeGenerator.java:179) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.bdm.EntityCodeGenerator.addEntity(EntityCodeGenerator.java:69) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.bdm.AbstractBDMCodeGenerator.buildJavaModelFromBom(AbstractBDMCodeGenerator.java:74) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.bdm.AbstractBDMCodeGenerator.generateBom(AbstractBDMCodeGenerator.java:64) [bonita-server-7.1.3.jar:] at org.bonitasoft.engine.bdm.AbstractBDMJarBuilder.addSourceFilesToDirectory(AbstractBDMJarBuilder.java:72) [bonita-server-7.1.3.jar:] ... 67 more
Apparently if I have connection to the database.

Hi,

Error is no related to database but do the Java classes generated when you deployed the BDM.

Important part in the log message is: Class com.epam.Solicitud already exists in target runtime environment.

Normally this class should only exist in BDM.
What I would recommend is to make sure that you didn’t accidentally embedded in your deployed .bar files a jar file that include this class.