Googoostatementcache - Multiply Prepared statement!

Asked

Viewed 87 times

0

Hello, when changing an object and saving I am having problems of slowness and in a few moments even totally locks my application. By persisting is returning me only this information, but I could not identify what can be.

stmt.Googoostatementcache - Multiply Prepared statement! select itemgrupo0_.id as id1_92_0_, itemgrupo0_.name as nome2_92_0_, itemgrupo0_.observacao as observac3_92_0_, itemgrupo0_.parent_id as parenti6_92_0_, itemgrupo0_.situacao as situacao4_92_0_, itemgrupo0_.last_update as last_upd5_92_0_ from item_grupo itemgrupo0_ Where itemgrupo0_.id=?

Could this information indicate something I’m doing that’s wrong? This may be causing the slowness in my process to save?

Code that causes the error:

@Transactional
@RequiredPermission(resource = Resources.NOTA_ENTRADA, operation = Operations.UPDATE)
public String updateCreditos() {
    try {
        if (this.getBean().getItens() == null) {
            return null;
        }
        for (NotaFiscalItem it : this.getBean().getItens()) {
            if (it.getId() != null && it.getId() < 0) {
                it.setId(null);
            }
            if (!this.getItemH().zeraValores(it)) {
                return "./entrada_itens.jsf";
            }
            if (it.getId() == null) {
                this.notaItemBC.insert(it);
            } else {
                this.notaItemBC.update(it);
            }
        }
    } catch (Exception e) {
        CriareLog.log(e);
        this.getMessageContext().add(e.getMessage(), SeverityType.ERROR);
        this.notaItemBC.rollback();
        return null;
    }
    this.endConversation();
    return this.getPreviousView();
}

@Override
@Transactional
public T update(T entity) {
    return getEntityManager().merge(entity);
}
  • Are you using c3p0? Puts the Java code that is causing the problem.

  • We used yes, I just edited the question by putting the save code on.

  • Did you find a solution to this? Thank you.

  • I believe I did, but I can’t tell you what it was. I’m sorry! @Guilhermemussi

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.