• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Jboss-seam EJB 3.0 "not bound" error.....

Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get this error when I try to persist/query data from DB using Jboss seam EJB 3.0 technologies.

Caused by: javax.naming.NameNotFoundException:GenerateChartFromDBDataAction not bound.

Here is my code:

Here is my bean:

package org.jboss.priscus;

import static org.jboss.seam.ScopeType.SESSION;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

public class DataBean implements Serializable {

private long id;

private int time;

private int node;

public DataBean(){}

public long getId() {
return id;

public void setId(long id) {
this.id = id;

public int getNode() {
return node;

public void setNode(int node) {
this.node = node;

public int getTime() {
return time;

public void setTime(int time) {
this.time = time;


Here is my action class

package org.jboss.priscus;

import static org.jboss.seam.ScopeType.SESSION;

import java.util.List;

import javax.ejb.Remove;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;

public class GenerateChartFromDBDataAction implements GenerateChartFromDBData {

@In @Out
private DataBean databean;

private List<DataBean> listOfBeans;

private EntityManager em;

public String getSomeData() {

try {


catch (Exception e) {
System.out.println("Problem in the GenerateChartFromDBActionclass....");
return "chartoutcomefromdbusingejb";


public void find () {
System.out.println("Find called");
listOfBeans = em.createQuery("select * from public.SARECORD")

@Destroy @Remove
public void destroy() {}


Here is my interface

package org.jboss.priscus;

import javax.ejb.Local;

public interface GenerateChartFromDBData {

public String getSomeData();


Here is my persistence.xml file

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
<persistence-unit name="Priscus">



<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="hibernate.transaction.flush_before_completion" value="true"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>


Here is my components.xml file

<?xml version="1.0" encoding="UTF-8"?>
<components xmlns="http://jboss.com/products/seam/components"

<core:init jndi-pattern="Priscus/#{ejbName}/local" debug="false"/>

<core:manager conversation-timeout="120000"/>


Here is my ejb-jar.xml file


Here is my postgres-ds.xml file

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

<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->

<!-- $Id: postgres-ds.xml 41016 2006-02-07 14:23:00Z acoliver $ -->
<!-- ==================================================================== -->
<!-- Datasource config for Postgres -->
<!-- ==================================================================== -->

<connection-url>jdbc ostgresql://localhost/DSMNT12</connection-url>;
<!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL
<new-connection-sql>select 1</new-connection-sql>

<!-- sql to call on an existing pooled connection when it is obtained from pool. Can be anything, select 1 is valid for PostgreSQL
<check-valid-connection-sql>select 1</check-valid-connection-sql>

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>PostgreSQL 7.2</type-mapping>


What could I be possible missing...???


Brian Oleksa
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I forgot to mention that this is a j2EE web app.

I invoke the action class from my JSF page.

<s:link action="#{genchartfromdb.getSomeData}" value="Get Data" disabled="false"/>

Once I click the above link, I get the NOT BOUND error...
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check your jndi-pattern declaration, in the Seam example I see the following:
<components xmlns="http://jboss.com/products/seam/components"
<core:init jndi-pattern="@jndiPattern@"/>
Ranch Hand
Posts: 1880
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this article for JBoss Seam Introduction:
Whatever you say buddy! And I believe this tiny ad too:
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic