Problema com fetch=FetchType.EAGER [RESOLVIDO]

11 respostas
brunorota

Boa noite galera

Tudo bom?

Estou com um problema maluco, o que tem de errado com o meu código?
@Entity
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
@SequenceGenerator(name="SEQ_PESSOA", sequenceName="SEQ_PESSOA", initialValue=1, allocationSize=1)
public abstract class Pessoa implements Serializable{

@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
	private List<Email> emails;
.
.
.
import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;

import org.hibernate.validator.constraints.NotEmpty;

@NamedQueries(@NamedQuery(name="Email.findByCliente", query="SELECT e FROM Cliente c JOIN c.emails e WHERE c.id = :id"))

@Entity
@SequenceGenerator(name="SEQ_EMAIL", sequenceName="SEQ_EMAIL", initialValue=1, allocationSize=1)
public class Email implements Serializable{

	private static final long serialVersionUID = 1401651960458453073L;

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_EMAIL")
	@Column(name="email_id")
	private int id;
	
	@NotEmpty(message="O email não pode estar em branco.")
	@Column(name="email_conta")
	private String conta;

	//Getterns and Setters
}

Segue o erro de deploy

18:45:49,986 WARN  [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=CidadeBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=ClienteBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=EmailBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=EmailTeste" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=EnderecoBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=EstadoBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=FrenteDeCaixaBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=PaisBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrEJB,name=TelefoneBS" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss-switchboard:appName=rotamtrEAR,module=rotamtrWEB" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3,type=nointerface-view-jndi-binder" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=RelatorioTecnicoDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=RelatorioTecnicoDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=RelatorioTecnicoDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=RelatorioTecnicoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=RelatorioTecnicoDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=RelatorioTecnicoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TecnicoDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TecnicoDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TecnicoDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TecnicoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TecnicoDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TecnicoDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TempoNoClienteDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TempoNoClienteDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TempoNoClienteDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TempoNoClienteDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TempoNoClienteDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TempoNoClienteDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=UsuarioDAO,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=UsuarioDAO,service=EJB3>" (should be in state "Installed", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=UsuarioDAO,service=EJB3,type=nointerface-view-jndi-binder" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=UsuarioDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=UsuarioDAO,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=UsuarioDAO,service=EJB3" (should be in state "Installed", but is actually in state "PreInstall")
  Deployment "jboss.web.deployment:war=/rotamtrWEB" is missing the following dependencies:
    Dependency "jboss-switchboard:appName=rotamtrEAR,module=rotamtrWEB" (should be in state "Installed", but is actually in state "Deploy")

DEPLOYMENTS IN ERROR:
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=FrenteDeCaixaDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EmailDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar" is in error due to the following reason(s): org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=UsuarioDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=RelatorioTecnicoDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=ClienteDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TempoNoClienteDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=CidadeDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EstadoDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TecnicoDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=EnderecoDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=PaisDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **
  Deployment "<UNKNOWN jboss.j2ee:ear=rotamtrEAR.ear,jar=rotamtrEJB.jar,name=TelefoneDAO,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=rotamtrEAR.ear/rotamtrEJB.jar#sar' **

	at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.2.GA]
	at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.2.GA]
	at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.2.GA]
	at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.1.0.Final]
	at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
	at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]
	at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
	at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
	at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
	at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
	at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
	at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
	at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
	at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
	at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
	at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
	at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_26]
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_26]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_26]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_26]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_26]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_26]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
	at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

O problema é no fetchType do relacionamento OneToMany de cliente com Email

O problema é que eu tenho um relacionamento OneToMany de cliente com Telefone e funciona numa boa

O que eu estou fazendo de errado?

Atenciosamente

11 Respostas

Hebert_Coelho

Eu já tive esse erro.

Faz um teste aí. Troca de List para Set.

Eu lembro que tinha outra solução possível, mas agora não me recordo. =/

brunorota

Kra

O negócio fez o Deploy sim, o erro sumiu, porém eu não posso utilizar um Set na minha lógica, preciso de um List mesmo

Mas porque funciona com a entidade Telefone e nao com a Email sendo que é a mesma coisa?

Valew

Hebert_Coelho

Pois é, foi um mistério para mim também. E eu não lembro exatamente qual foi a outra solução que eu fiz.

Procure mais sobre esse erro aqui: org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags

Outra coisa que eu me lembro que me falaram foi o fato de ter muitas coleções em minha classe. Isso acontece com você?

brunorota

Não

Tenho apenas uma lista de emails e uma de telefone, a de telefone funciona na boa, a de email da problema se eu marcar como fetchType.EAGER

Mto sinistro hehe

Mais valew vou pesquisar sobre esse cabrinha ae, se lembrar me ajuda aqui plis ahiuahuah

Valeww

brunorota

isto é um bug do JPA?

Hebert_Coelho

Bug, quando eu pesquisei, não era. O.o

fbarreto

Vc nao pode ter duas listas anotados com Eager na msm classe, isso nao funciona, eu sempre anoto como Lazy e qdo preciso carregar as listas faco um select com join fetch

Hebert_Coelho

Sério? Quando eu tive esse problema eu não tinha nenhuma lista como EAGER. O.o

Nunca testei isso. Vou testar depois para ver.

brunorota

Opaa

Dessa eu não sabia hehehe

Fiquei quebrando a cabeça procurando erro e tudo, pra depois saber que não é suportado uauiahiuah

Obrigado a todos que ajudaram nesse tópico

Valewwwwww

L

Um detalhe, se vc usar Set ao inves de List se nao me engano suporta multiplo fetch

brunorota

Sim, com Set funciona, não sei se múltiplos, porém eu consigo ter uma lista e um set com EAGER

Porém um set não viria ao caso agora pra mim, minha lógica não permite isso, é melhor eu fazer o SELECT na mão mesmo.

Mas obrigado pelo aviso

Até +.

Criado 1 de novembro de 2011
Ultima resposta 3 de nov. de 2011
Respostas 11
Participantes 4