Announcement Announcement Module
Collapse
No announcement yet.
How can I do this? Hibernate/JPA + SPRING + JSF. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I do this? Hibernate/JPA + SPRING + JSF.

    Hi,

    I'm new here and I'm looking for help.

    I have a application with JSF+Hibernate/JPA+SPRING, I'm having several problems when I try to persist/save a entity (ex: lazyloading-session closed-invalid data acess, etc...).

    I'll post bellow the way that my application is...I think it will be more easy for you guys to understand and help me..


    Here my DAO.

    package dao;

    import java.io.Serializable;
    import java.util.List;

    public interface Dao<T, ID extends Serializable> {

    T loadById(ID id);

    void persist(T entity);

    void update(T entity);

    void delete(T entity);

    List<T> loadAll();

    }
    Here my DaoImpl:
    package dao.impl;

    import java.io.Serializable;
    import java.util.List;
    import java.lang.reflect.ParameterizedType;

    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import org.springframework.stereotype.Repository;
    import org.springframework.transaction.annotation.Transac tional;

    import dao.Dao;

    @Repository
    public abstract class DaoImpl<T, ID extends Serializable> implements
    Dao<T, ID> {

    private Class<T> persistentClass;

    @PersistenceContext
    protected EntityManager entityManager;

    @SuppressWarnings("unchecked")
    public DaoImpl() {
    this.persistentClass = (Class<T>) ((ParameterizedType) getClass()
    .getGenericSuperclass()).getActualTypeArguments()[0];
    }

    public Class<T> getPersistentClass() {
    return persistentClass;
    }

    @Transactional(readOnly = true)
    public T loadById(ID id) {
    return entityManager.find(persistentClass, id);
    }

    @Transactional
    public void persist(T entity) {
    entityManager.persist(entity);
    }

    @Transactional
    public void update(T entity) {
    entityManager.merge(entity);
    }

    @Transactional
    public void delete(T entity) {
    Object o = entityManager.merge(entity);
    entityManager.remove(o);
    }

    @Transactional(readOnly = true)
    @SuppressWarnings("unchecked")
    public List<T> loadAll() {
    return entityManager.createQuery(
    "Select t from " + persistentClass.getSimpleName() + " t")
    .getResultList();
    }

    }

    This is how I implement my especific entities:

    DAO

    package dao;

    import model.Produtor;

    public interface ProdutorDao extends Dao<Produtor, Long> {

    Produtor procurarProdutor(String nome);

    }
    DaoIMpl:
    package dao.impl;

    import java.util.List;

    import javax.persistence.Query;

    import org.springframework.stereotype.Repository;
    import org.springframework.transaction.annotation.Transac tional;

    import dao.ProdutorDao;
    import model.Produtor;

    @Repository("produtorDao")
    public class ProdutorDaoImpl extends DaoImpl<Produtor, Long> implements
    ProdutorDao {

    @Transactional(readOnly = true)
    public Produtor procurarProdutor(String nome) {

    String queryString = "from Produtor p where p.nome like ?1";
    Query q = entityManager.createQuery(queryString).setParamete r(1, nome);

    @SuppressWarnings("unchecked")
    List<Produtor> uList = q.getResultList();

    if(uList.isEmpty())
    return null;
    else
    return uList.get(0);
    }

    }
    Here applicationContext:
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schem...ontext-3.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

    <!-- Loads -->
    <contextroperty-placeholder location="classpath:application.properties" />
    <!-- -->

    <!-- Data Sources and EntityManagers JPA -->
    <!-- Data Source One -->
    <bean id="dataSource"
    class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
    <property name="driverClassName" value="${database.driver}" />
    <property name="url" value="${database.url}" />
    <property name="username" value="${database.username}" />
    <property name="password" value="${database.password}" />
    </bean>
    <!-- EntityManager One -->
    <bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerE ntityManagerFactoryBean">
    <property name="persistenceUnitName" value="tcc" />
    <property name="dataSource" ref="dataSource" />
    <property name="jpaVendorAdapter">
    <bean class="org.springframework.orm.jpa.vendor.Hibernat eJpaVendorAdapter">
    <property name="databasePlatform" value="${jdbc.dialect}" />
    <property name="showSql" value="${jdbc.showSql}" />
    </bean>
    </property>
    </bean>
    <!-- -->

    <!-- Enable @Transactional -->
    <tx:annotation-driven />

    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionM anager">
    <property name="entityManagerFactory" ref="entityManagerFactory" />
    </bean>
    <!-- -->

    <!-- Scan all Components -->
    <context:component-scan base-package="*" />
    <!-- -->

    <!-- Inject Entity Managers into @PersistenceContext -->
    <bean
    class="org.springframework.orm.jpa.support.Persist enceAnnotationBeanPostProcessor" />
    <!-- -->

    <!-- Error Handler for JPA -->
    <bean
    class="org.springframework.dao.annotation.Persiste nceExceptionTranslationPostProcessor" />
    <!-- -->

    <!-- Auto-wire beans with @Autowired and @Resource -->
    <bean
    class="org.springframework.beans.factory.annotatio n.AutowiredAnnotationBeanPostProcessor" />
    <!-- -->

    <!-- View Scope -->
    <bean class="org.springframework.beans.factory.config.Cu stomScopeConfigurer">
    <property name="scopes">
    <map>
    <entry key="view">
    <bean class="outros.ViewScope" />
    </entry>
    </map>
    </property>
    </bean>
    <!-- -->

    </beans>
    Here facesConfig:

    <?xml version="1.0" encoding="UTF-8"?>

    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
    version="2.0">

    <!-- Messages -->
    <application>
    <locale-config>
    <default-locale>pt_BR</default-locale>
    <supported-locale>en_US</supported-locale>
    </locale-config>
    <resource-bundle>
    <base-name>messages</base-name>
    <var>msgs</var>
    </resource-bundle>
    </application>
    <!-- -->

    <!-- Resolve EL beans from Spring -->
    <application>
    <el-resolver>org.springframework.web.jsf.el.SpringBean FacesELResolver</el-resolver>
    </application>
    <!-- -->

    </faces-config>
    Here web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    id="WebApp_ID" version="3.0">

    <!-- Welcome Files -->
    <welcome-file-list>
    <welcome-file>login.xhtml</welcome-file>
    </welcome-file-list>
    <!-- -->

    <!-- Configuration JSF -->
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
    </context-param>
    <!-- -->

    <!-- Support Spring -->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

    <!-- Enable Scope -->
    <listener>
    <listener-class>
    org.springframework.web.context.request.RequestCon textListener</listener-class>
    </listener>
    <!-- -->

    </web-app>
    Here's my controller that I use as a Bean in JSF...here I try to persist/save and is here that I'm getting the errors. I'll post just some parts because is very huge:
    package controller;

    @Controller
    @Scope("view")
    public class CriarBean implements Serializable {

    /**
    *
    */
    private static final long serialVersionUID = 1L;

    /**
    * PRODUTOR
    */
    private ProdutorDao produtorDao;

    @Resource
    public void setProdutorDao(ProdutorDao produtorDao){
    this.produtorDao = produtorDao;
    }

    private Produtor produtor = new Produtor();

    public Produtor getProdutor() {
    return this.produtor;
    }

    /**
    * ESCOLARIDADE PRODUTOR
    */
    private EscolaridadeDao escolaridadeDao;

    @Resource
    public void setEscolaridadeDao(EscolaridadeDao escolaridadeDao) {
    this.escolaridadeDao = escolaridadeDao;
    }

    ...........

    ..........

    private void salvar(){

    this.produtorDao.persist(this.produtor);

    }
    ................
    As you can see I have a method named 'salvar' that I call to persit the entity, but its not working, I think is because I have others entities in this entity, (relations like one-to-many, many-to-many.....).



    So , my question is: What is the right way to do this (CRUD) in my case?

    thanks,
    and have a good day.

    Filipe.

  • #2
    Good Morning!

    I resolved my last problem I1ve setted a wrong lenght to a field in my entity. Now I got other problem

    org.springframework.dao.InvalidDataAccessApiUsageE xception: detached entity passed to persist: model.TAgri; nested exception is org.hibernate.PersistentObjectException: detached entity passed to persist: model.TAgri


    I need help..I'll post the parts that I think is important for you guy to help me.

    Code:
        Classe Produtor:
    
        //@NotEmpty(message="{agri}")
        @ManyToMany(cascade=CascadeType.ALL)
        @JoinTable(name = "prod_agri", joinColumns = { @JoinColumn(name = "id_produtor") }, inverseJoinColumns = { @JoinColumn(name = "id_agri") })
        public Set<TAgri> getAgricultores() {
            return agricultores;
        }
    
        public void setAgricultores(Set<TAgri> agricultores) {
            this.agricultores = agricultores;
        }
    
        public void addAgricultor(TAgri agricultor) { // - Do I need to use this?
            if (agricultor != null) {
                this.getAgricultores().add(agricultor);
                agricultor.getProdutores().add(this);
            }
        }


    Code:
    Classe TAgri:
    
       public void setProdutores(Set<Produtor> produtores) {
            this.produtores = produtores;
        }
    
        @ManyToMany(mappedBy = "agricultores", fetch = FetchType.LAZY)
        public Set<Produtor> getProdutores() {
            return produtores;
        }
    Code:
     My bean, to save I do this:
    
       this.produtorDao.persist(this.produtor);
    Code:
     O Dao:
    
        @Transactional
        public void persist(T entity) {
            entityManager.persist(entity);
        }
    Code:
       view:
    
                                   p:outputPanel id="pAgri">
                                            <h:panelGroup rendered="#{criarBean.produtor.associadoAgricultores}">
                                                <!--  <h:outputText value="#{msgs.criarPAgriQ}: "/> -->
                                                <h:selectManyCheckbox value="#{criarBean.produtor.agricultores}"> 
                                                    <f:converter converterId="converter.SimpleIndexConverter"/>
                                                    <f:selectItems value="#{criarBean.lAgricultores}" />
                                                </h:selectManyCheckbox>
                                            </h:panelGroup>
                                   </p:outputPanel>


    thanks.
    Filipe.

    Comment


    • #4
      Hi jasper thanks for your time.

      Actually my problem changed again....

      I discover that when I leave two field in white the persit method doesn't work so when I fill theses fields the persist method work perfectly!

      The problem is that these fiels aren't NOT NULL so it was supossed to accept NULL values..but..I don't know what's hapenning.

      I'm trying to discover what I should do.....

      thanks anyway.
      Filipe.

      Comment


      • #6
        Sure!

        Produtor class:
        The fields that I'm having problem are in red! As I said before these fields are not setted to be NOT NULL but if I leave it as NULL or in white I got an error.



        Code:
        @Entity
        public class Produtor implements Serializable {
        
        	/**
        	 * 
        	 */
        	private static final long serialVersionUID = 1L;
        	private Long id;
        	private String rg;
        	private String nome;
        	private int idade;
        	private String email;
        	private boolean outrasPropriedades;
        	private int numPropriedades;
        	private double areaTotalPropriedadesHec;
        	private double areaTotalPropriedadesAlq;
        	private boolean associadoCoperativa;
        	private boolean associadoSindicato;
        	private boolean associadoAgricultores;
        	private Transporte transporte;
        	private CondProd condicaoAnterior;
        	private Escolaridade escolaridade;
        	private boolean cidade;
        	private boolean rural;
        	private Municipio origem;
        	private Municipio moravaAntes;
        	private MoradiaProd moradiaProdutor;
        	private String observacoes;
        	private Set<Propriedade> propriedades = new HashSet<Propriedade>();
        	private Set<TSind> sindicatos = new HashSet<TSind>();
        	private Set<TAgri> agricultores = new HashSet<TAgri>();
        	private Set<TCoop> cooperativas = new HashSet<TCoop>();
        	
        	
        	public Produtor() {
        	}
        
        	public Produtor(String rg, String nome) {
        		super();
        		this.rg = rg;
        		this.nome = nome;
        	}
        
        	@Id
        	@SequenceGenerator(name = "seq", sequenceName = "produtor_seq", allocationSize = 1)
        	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq")
        	public Long getId() {
        		return id;
        	}
        
        	public void setId(Long id) {
        		this.id = id;
        	}
        
        	@NotEmpty(message="{rg}")
        	@Column(name = "rg", unique = true, nullable = false)
        	public String getRg() {
        		return rg;
        	}
        
        	public void setRg(String rg) {
        		this.rg = rg;
        	}
        
        	@NotEmpty(message="{nome}")
        	@Column(nullable = false)
        	public String getNome() {
        		return nome;
        	}
        
        	public void setNome(String nome) {
        		this.nome = nome;
        	}
        
        	public int getIdade() {
        		return idade;
        	}
        
        	public void setIdade(int idade) {
        		this.idade = idade;
        	}
        
        	@Email(message="{email}")
        	public String getEmail() {
        		return email;
        	}
        
        	public void setEmail(String email) {
        		this.email = email;
        	}
        
        	public boolean isOutrasPropriedades() {
        		return outrasPropriedades;
        	}
        
        	public void setOutrasPropriedades(boolean outrasPropriedades) {
        		this.outrasPropriedades = outrasPropriedades;
        	}
        
        	@Min(value=2, message="{numPropriedades}")
        	public int getNumPropriedades() {
        		return numPropriedades;
        	}
        
        	public void setNumPropriedades(int numPropriedades) {
        		this.numPropriedades = numPropriedades;
        	}
        
        	public double getAreaTotalPropriedadesHec() {
        		return areaTotalPropriedadesHec;
        	}
        
        	public void setAreaTotalPropriedadesHec(double areaTotalPropriedadesHec) {
        		this.areaTotalPropriedadesHec = areaTotalPropriedadesHec;
        	}
        
        	public double getAreaTotalPropriedadesAlq() {
        		return areaTotalPropriedadesAlq;
        	}
        
        	public void setAreaTotalPropriedadesAlq(double areaTotalPropriedadesAlq) {
        		this.areaTotalPropriedadesAlq = areaTotalPropriedadesAlq;
        	}
        
        	public boolean isAssociadoCoperativa() {
        		return associadoCoperativa;
        	}
        
        	public void setAssociadoCoperativa(boolean associadoCoperativa) {
        		this.associadoCoperativa = associadoCoperativa;
        	}
        
        	public boolean isAssociadoSindicato() {
        		return associadoSindicato;
        	}
        
        	public void setAssociadoSindicato(boolean associadoSindicato) {
        		this.associadoSindicato = associadoSindicato;
        	}
        
        	public boolean isAssociadoAgricultores() {
        		return associadoAgricultores;
        	}
        
        	public void setAssociadoAgricultores(boolean associadoAgricultores) {
        		this.associadoAgricultores = associadoAgricultores;
        	}
        
        	@NotNull(message="{transporte}")
        	@OneToOne
        	@JoinColumn(name = "id_transporte", nullable = false)
        	public Transporte getTransporte() {
        		return transporte;
        	}
        
        	public void setTransporte(Transporte transporte) {
        		this.transporte = transporte;
        	}
        
        	@NotNull(message="{condicao}")
        	@OneToOne
        	@JoinColumn(name = "id_condicao", nullable = false)
        	public CondProd getCondicaoAnterior() {
        		return condicaoAnterior;
        	}
        
        	public void setCondicaoAnterior(CondProd condicaoAnterior) {
        		this.condicaoAnterior = condicaoAnterior;
        	}
        
        	@NotNull(message="{escolaridade}")
        	@OneToOne
        	@JoinColumn(name = "id_escolaridade", nullable = false)
        	public Escolaridade getEscolaridade() {
        		return escolaridade;
        	}
        
        	public void setEscolaridade(Escolaridade escolaridade) {
        			this.escolaridade = escolaridade;
        	}
        
        	@OneToMany(mappedBy = "produtor", fetch = FetchType.LAZY)
        	public Set<Propriedade> getPropriedades() {
        		return propriedades;
        	}
        
        	public void setPropriedades(Set<Propriedade> propriedades) {
        		this.propriedades = propriedades;
        	}
        
        	public void addPropriedade(Propriedade propriedade) {
        		if (propriedade != null) {
        			this.getPropriedades().add(propriedade);
        			propriedade.setProdutor(this);
        		}
        	}
        
        	//@NotEmpty(message="{sind}")
        	@ManyToMany
        	@JoinTable(name = "prod_sind", joinColumns = { @JoinColumn(name = "id_produtor") }, inverseJoinColumns = { @JoinColumn(name = "id_sind") })
        	public Set<TSind> getSindicatos() {
        		return sindicatos;
        	}
        
        	public void setSindicatos(Set<TSind> sindicatos) {
        		this.sindicatos = sindicatos;
        	}
        
        	public void addSindicato(TSind sindicato) {
        		if (sindicato != null) {
        			this.getSindicatos().add(sindicato);
        			sindicato.getProdutores().add(this);
        		}
        	}
        
        	//@NotEmpty(message="{agri}")
        	@ManyToMany
        	@JoinTable(name = "prod_agri", joinColumns = { @JoinColumn(name = "id_produtor") }, inverseJoinColumns = { @JoinColumn(name = "id_agri") })
        	public Set<TAgri> getAgricultores() {
        		return agricultores;
        	}
        
        	public void setAgricultores(Set<TAgri> agricultores) {
        		this.agricultores = agricultores;
        	}
        
        	public void addAgricultor(TAgri agricultor) {
        		if (agricultor != null) {
        			this.getAgricultores().add(agricultor);
        			agricultor.getProdutores().add(this);
        		}
        	}
        
        	//@NotEmpty(message="{coop}")
        	@ManyToMany
        	@JoinTable(name = "prod_coop", joinColumns = { @JoinColumn(name = "id_produtor") }, inverseJoinColumns = { @JoinColumn(name = "id_coop") })
        	public Set<TCoop> getCooperativas() {
        		return cooperativas;
        	}
        
        	public void setCooperativas(Set<TCoop> cooperativas) {
        		this.cooperativas = cooperativas;
        	}
        
        	public void addCooperativa(TCoop cooperativa) {
        		if (cooperativa != null) {
        			this.getCooperativas().add(cooperativa);
        			cooperativa.getProdutores().add(this);
        		}
        	}
        
        	public void setMoradiaProdutor(MoradiaProd moradiaProdutor) {
        		this.moradiaProdutor = moradiaProdutor;
        	}
        
        	@OneToOne(cascade=CascadeType.ALL)
        	@JoinColumn(name = "id_moradiaprod", unique = true)
        	public MoradiaProd getMoradiaProdutor() {
        		return moradiaProdutor;
        	}
        
        	public boolean isCidade() {
        		return cidade;
        	}
        
        	public void setCidade(boolean cidade) {
        		this.cidade = cidade;
        	}
        
        	public boolean isRural() {
        		return rural;
        	}
        
        	public void setRural(boolean rural) {
        		this.rural = rural;
        	}
        
        	@NotNull(message="{municipioOri}")
        	@OneToOne(fetch=FetchType.LAZY)
        	@JoinColumn(name = "id_origem")
        	public Municipio getOrigem() {
        		return origem;
        	}
        
        	public void setOrigem(Municipio origem) {
        		this.origem = origem;
        	}
        
        	@NotNull(message="{municipioAnt}")
        	@OneToOne(fetch=FetchType.LAZY)
        	@JoinColumn(name = "id_moravaantes")
        	public Municipio getMoravaAntes() {
        		return moravaAntes;
        	}
        
        	public void setMoravaAntes(Municipio moravaAntes) {
        		this.moravaAntes = moravaAntes;
        	}
        
        	public void setObservacoes(String observacoes) {
        		this.observacoes = observacoes;
        	}
        
        	public String getObservacoes() {
        		return observacoes;
        	}	
        
        }
        in the database:

        Code:
        -- Table: produtor
        
        -- DROP TABLE produtor;
        
        CREATE TABLE produtor
        (
          id bigint NOT NULL,
          rg character varying(12) NOT NULL,
          nome character varying(100) NOT NULL,
          idade integer,
          email character varying(50),
          outraspropriedades boolean,
          numpropriedades integer,
          areatotalpropriedadeshec double precision,
          areatotalpropriedadesalq double precision,
          associadocoperativa boolean,
          associadosindicato boolean,
          associadoagricultores boolean,
          id_transporte integer NOT NULL,
          id_condicao integer NOT NULL,
          id_escolaridade integer NOT NULL,
          id_moradiaprod integer,
          cidade boolean,
          rural boolean,
          id_origem integer NOT NULL,
          id_moravaantes integer NOT NULL,
          observacoes text,
          CONSTRAINT produtor_pkey PRIMARY KEY (id),
          CONSTRAINT fk_condicao FOREIGN KEY (id_condicao)
              REFERENCES condprod (id) MATCH SIMPLE
              ON UPDATE NO ACTION ON DELETE NO ACTION,
          CONSTRAINT fk_escolaridade FOREIGN KEY (id_escolaridade)
              REFERENCES escolaridade (id) MATCH SIMPLE
              ON UPDATE NO ACTION ON DELETE NO ACTION,
          CONSTRAINT fk_moradiaprod FOREIGN KEY (id_moradiaprod)
              REFERENCES moradiaprod (id) MATCH SIMPLE
              ON UPDATE NO ACTION ON DELETE NO ACTION,
          CONSTRAINT fk_moravaantes FOREIGN KEY (id_moravaantes)
              REFERENCES municipio (id) MATCH SIMPLE
              ON UPDATE NO ACTION ON DELETE NO ACTION,
          CONSTRAINT fk_origem FOREIGN KEY (id_origem)
              REFERENCES municipio (id) MATCH SIMPLE
              ON UPDATE NO ACTION ON DELETE NO ACTION,
          CONSTRAINT fk_transporte FOREIGN KEY (id_transporte)
              REFERENCES transporte (id) MATCH SIMPLE
              ON UPDATE NO ACTION ON DELETE NO ACTION,
          CONSTRAINT moradiaprod_key UNIQUE (id_moradiaprod),
          CONSTRAINT rg_key UNIQUE (rg)
        )
        WITH (OIDS=FALSE);
        ALTER TABLE produtor OWNER TO postgres;
        In the TAgri class I'm not getting any errros right now..so I think it ins't necessary.

        Thanks
        Filipe.

        Comment


        • #8
          No I didin't do this...

          But I tried and I'm getting this error:

          Code:
          javax.el.PropertyNotFoundException: /criar.xhtml @200,84 value="#{criarBean.produtor.outrasPropriedades}": Property 'outrasPropriedades' not readable on type java.lang.Boolean
          	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
          	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:193)
          	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:181)
          	at javax.faces.component.UIOutput.getValue(UIOutput.java:169)
          	at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
          	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
          	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
          	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:883)
          	at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:59)
          	at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:43)
          	at org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:229)
          	at org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:152)
          	at org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:75)
          	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:883)
          	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
          	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
          	at org.primefaces.component.wizard.WizardRenderer.encodeCurrentStep(WizardRenderer.java:176)
          	at org.primefaces.component.wizard.WizardRenderer.encodeContent(WizardRenderer.java:206)
          	at org.primefaces.component.wizard.WizardRenderer.encodeMarkup(WizardRenderer.java:161)
          	at org.primefaces.component.wizard.WizardRenderer.encodeEnd(WizardRenderer.java:73)
          	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:883)
          	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
          	at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
          	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:853)
          	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
          	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
          	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
          	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
          	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
          	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
          	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
          	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
          	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
          	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
          	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
          	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
          	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
          	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
          	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
          	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
          	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
          	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
          	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
          	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          	at java.lang.Thread.run(Thread.java:619)

          Thanks.

          Comment


          • #9
            Forget it was my fault I didn't change the isOutrasPropriedades to getOutras... and setOutras...

            I'm trying here..just a moment.

            Comment


            • #10
              You was right Jesper!

              It's works now...maybe I'll have to change all the primitives types in my code lol.

              But, very good...thanks for your help!

              Muito Obrigado!
              Filipe.
              Last edited by filipea.; May 5th, 2011, 04:12 PM. Reason: wrong name jasper is jesper.

              Comment

              Working...
              X