Error like @Manytomany (com.sun.Jdi.Invocationexception occurred invoking method) - JSF

Asked

Viewed 415 times

0

Galley,

am trying problem to change an employee’s password, in my Manytomany is giving an error: com.sun.Jdi.Invocationexception occurred invoking method

Can someone help me?

Functionbean

@ManyToMany
@JoinTable(name = "tbl_funcionario_has_tbl_projeto", joinColumns = {
        @JoinColumn(name = "tbl_funcionario_fun_codigo") }, inverseJoinColumns = {
                @JoinColumn(name = "tbl_projeto_pro_codigo") })
private List<Projeto> projeto;

Entity Projeto

@Id
@GeneratedValue (strategy = GenerationType.AUTO)
@Column (name = "pro_codigo")
private Long pro_codigo;

@NotEmpty(message = "O campo Tipo � obrigatorio.")
@Column (name = "pro_tipo")
private String pro_tipo;

@NotEmpty(message = "O campo Projeto � obrigatorio.")
@Column (name = "pro_projeto")
private String pro_projeto;

@NotEmpty(message = "O campo Superior Imediato � obrigatorio.")
@Column (name = "pro_superiorImediato")
private String pro_superiorImediato;

XHTML:

<ui:composition template="/templates/modeloGeral.xhtml">
    <ui:define name="conteudo">
        <div id="redefinir">
            <h:form>
                <input type="hidden" id="idFunc" name="idFunc"
                    value="#{param['id']}" />
                <div class="senha">
                    <div class="row2">
                        <p:outputLabel class="nova_senha" value="Crie uma nova senha" />
                        <br /> <br />
                    </div>
                    <div class="row_center">
                        <div class="row3">
                            <p:outputLabel class="label_senha" value="Crie sua nova senha: " />
                            <br />
                            <p:password class="password" size="35" maxlength="20"
                                value="#{funcionarioBean.novaSenha}" required="true"/>
                            * <br /> <br />
                            <p:outputLabel class="label_senha"
                                value="Confirme sua nova senha: " />
                            <br />
                            <p:password class="password" size="35" maxlength="20"
                                value="#{funcionarioBean.novaSenhaConfirma}" required="true"/>
                            * <br /> <br />
                        </div>
                        <h:commandButton class="botao" value="Confirmar"
                            actionListener="#{funcionarioBean.gerarSenha}"
                            update=":frmLoginGeral" />
                    </div>
                </div>
            </h:form>
        </div>
    </ui:define>
</ui:composition>
  • Puts the full error log

  • 1

    It is probably null or a Lazy Exception. Without more details of the context it is difficult to speak the best way to solve, can be from using ager (if ALWAYS NEED TO BE LOADED), Join fetch, boot before, etc.

  • Man worked out! Thanks.

No answers

Browser other questions tagged

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