File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Jboss-seam EJB 3.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Jboss-seam EJB 3.0 "not bound" error....." Watch "Jboss-seam EJB 3.0 "not bound" error....." New topic

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

Brian Oleksa

Joined: Jun 05, 2007
Posts: 15
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 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) { = 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=""
<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="" 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=""

<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

Joined: Jun 05, 2007
Posts: 15

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...
Orem Hun

Joined: May 24, 2005
Posts: 28
Please check your jndi-pattern declaration, in the Seam example I see the following:
<components xmlns=""
<core:init jndi-pattern="@jndiPattern@"/>
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1850

Read this article for JBoss Seam Introduction:

Krishna Srinivasan
OCAJP 7/8 Exam, 400+ OCPJP Mock Questions
I agree. Here's the link:
subject: Jboss-seam EJB 3.0 "not bound" error.....
It's not a secret anymore!