Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8018943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:14:51+00:00 2026-06-04T21:14:51+00:00

i’m new to jboss and i’m gettig this error when i try to list

  • 0

i’m new to jboss and i’m gettig this error when i try to list the contacts of the database, I’m using the following softwares:
jboss-4.2.3.GA
jboss-seam-2.2.2.Final
PostgreSQL 8.4
Eclipse Helios + JBoss Tools
Here’s the Stack Strace(only the first error):

Caused by: javax.naming.NameNotFoundException: seam1EntityManagerFactory not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:257)
    ... 117 more

contato_list.xhtml:

<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml">

    <ui:define name="body">

        <h:messages globalOnly="true" styleClass="message" id="globalMessages" />

        <rich:panel>
            <f:facet name="header">Contatos</f:facet>
            <div class="results" id="contatoList">
                <rich:dataTable id="contatoList" var="_contato" value="#{contatos}">
                    <h:column>
                        <f:facet name="header">Id</f:facet>
                        #{_contato.id}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Nome</f:facet>
                        #{_contato.nome}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Email</f:facet>
                        #{_contato.email}
                    </h:column>
                    <h:column>
                        <f:facet name="header">Ação</f:facet>
                        <s:link id="editar" action="#{contatoAction.editarContato}"
                            value="Editar" />
                        <s:link id="remover" action="#{contatoAction.removerContato}"
                            value="Remover" />
                    </h:column>
                </rich:dataTable>
            </div>
        </rich:panel>
        <s:div styleClass="actionButtons">
            <s:button id="novo" action="#{contatoAction.novoContato}" value="Novo contato"/>
        </s:div>
    </ui:define>
</ui:composition>

ContatoAction.java:

package org.domain.seam1.session;

import java.io.Serializable;
import java.util.List;
import javax.persistence.EntityManager;
import org.domain.seam1.entity.Contato;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.datamodel.DataModel;
import org.jboss.seam.annotations.datamodel.DataModelSelection;

@Name("contatoAction")
@Scope(ScopeType.CONVERSATION)
public class ContatoAction implements Serializable{

    private static final long serialVersionUID = 4121233854017478226L;

    @In
    private EntityManager entityManager;

    @SuppressWarnings("unused")
    @DataModel
    private List<Contato> contatos;

    @DataModelSelection
    @Out(required=false)
    private Contato contato;

    @Factory("contatos")
    @SuppressWarnings("unchecked")
    public void listarContatos() {
        //seleciona todos os contatos
        contatos = entityManager.createQuery("select c from Contato c").getResultList();
    }

    @Begin
    public String novoContato() {
        contato = new Contato();

        return "novoContato";
    }

    @Begin
    public String editarContato() {
        //atualiza os dadis do contato para fazer a edição
        entityManager.refresh(contato);

        return "editarContato";
    }

    public String removerContato() {
        //remove o contato
        entityManager.remove(contato);

        return "contatoRemovido";
    }

    @End
    public String salvarContato() {
        //se não tem id é porque deve ser inserido, caso contrário alterado
        if (contato.getId() == null) {
            entityManager.persist(contato);
        } else {
            entityManager.merge(contato);
        }

        return "contatoSalvo";
    }
}

Contato.java:

package org.domain.seam1.entity;


import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;


@Entity
public class Contato implements Serializable {

    private static final long serialVersionUID = 4121233854017478226L;

    @Id @GeneratedValue
    private Long id;

    @Column(length=50, nullable=false)
    private String nome;

    @Column(length=50, nullable=false)
    private String email;

    public Long getId() {
        return id;
    }

    public String getNome() {
        return nome;
    }

    public void setNome(String nome) {
        this.nome = nome;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((email == null) ? 0 : email.hashCode());
        result = prime * result + ((nome == null) ? 0 : nome.hashCode());
        return result;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof Contato))
            return false;
        Contato other = (Contato) obj;
        if (email == null) {
            if (other.email != null)
                return false;
        } else if (!email.equals(other.email))
            return false;
        if (nome == null) {
            if (other.nome != null)
                return false;
        } else if (!nome.equals(other.nome))
            return false;
        return true;
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:14:52+00:00Added an answer on June 4, 2026 at 9:14 pm

    My errors were solved by simply changing the antlr.jar file from antlr-2.7.6.jar to antlr-3.1.1.jar

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.