Hibernate error on named query, server doesn't start : how to fix BDM on server without any access to the admin interface ?

Hello.

I have a problem with an hibernate error on a named query.

I have deployed on a Bonita server a bad BDM with an error in a custom query. The deploy succeed but an hibernate error occurs and the server doesn't start after the update.

2020-06-30 16:26:27.557 +0200 ERROR (localhost-startStop-1) org.hibernate.internal.SessionFactoryImpl HHH000177: Error in named query: Agent.findAgentsPresentsByOfficesByJour
org.hibernate.QueryException: could not resolve property: persistenceid of: com.company.model.Office [SELECT distinct(a)
FROM com.company.model.Agent a
WHERE a.agtAffect2.persistenceid in (:offices)
AND NOT EXISTS (
    SELECT a2
    FROM  com.company.model.Agent a2
    LEFT JOIN a2.absences b2
    WHERE to_date(b2.absDateDeb, 'YYYY-MM-DD') <= CURRENT_DATE
    AND CURRENT_DATE <= to_date(b2.absDateFin, 'YYYY-MM-DD')
    and a = a2
)
ORDER BY a.agtNom ASC]
    at org.hibernate.QueryException.generateQueryException(QueryException.java:137)
    at org.hibernate.QueryException.wrapWithQueryString(QueryException.java:120)
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:234)
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:158)

...

Caused by: org.hibernate.HibernateException: Errors in named queries: Agent.findAgentsPresentsByOfficesByJour
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:545)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:857)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:425)
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:849)
    at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75)
    ... 30 more

2020-06-30 16:31:26.212 +0200 INFOS (localhost-startStop-1) org.bonitasoft.engine.EngineInitializer Stopping Bonita Engine...
2020-06-30 16:31:26.213 +0200 INFOS (localhost-startStop-1) org.bonitasoft.engine.EngineInitializer Stopping node...
2020-06-30 16:31:26.220 +0200 INFOS (localhost-startStop-1) org.quartz.core.QuartzScheduler Scheduler QuartzScheduler_$_NON_CLUSTERED shutting down.
2020-06-30 16:31:26.236 +0200 INFOS (localhost-startStop-1) org.quartz.core.QuartzScheduler Scheduler QuartzScheduler_$_NON_CLUSTERED paused.
2020-06-30 16:31:26.406 +0200 INFOS (localhost-startStop-1) org.quartz.core.QuartzScheduler Scheduler QuartzScheduler_$_NON_CLUSTERED shutdown complete.
2020-06-30 16:31:26.524 +0200 INFOS (localhost-startStop-1) org.bonitasoft.engine.EngineInitializer Bonita Engine stopped!

I know how to fix the error in the custom query but i don't know how to update the bad BDM in the server. It doesn't start so i have no access to the admin interface...

Maybe someone can help me ? How to fix the bad BDM deployed on the server ? I have no access to the admin interface. Where is stored the named query ? Directly in the database or in a file ?

I work with Bonita Community 7.10.3 and PostgreSQL database.

Thanks for your help.

 

 

Hello.

No help :-( ?...

I have found a table in the engine database named public.tenant_resource and in this table a line with a reference to a client-bdm.zip file. The content of the file is stored in the database as binary data :

1;203;"client-bdm.zip";"BDM";"<données binaires>";-1;1593527060534;"INSTALLED"

Maybe I have to drop this line to be able to start Tomcat server ?? 

No one has encountered this problem before ?