Binding a JSF table to a list of data that does not come from a database

Retrieving data from a database I can just use the jDev wizard to "Create EJB from table" and bind the EJB to a JSF table through a NamedQuery.
However, in this instance I am retrieving a list of data from an existing API or a WebService.
Does anyone have a good example of how best to do this?

Hi There,
I have make change as you suggested in your post.
But I am getting error that "org.apache.jasper.el.JspPropertyNotFoundException - /presale.jspx(86,56) '#{saveData._nameList}' Property '_nameList' not found on type dbtransaction.SaveData"
Where list is nameList which simply fetch data from Database and send it to the table
Here is my jspx code.
<tr:table var="row" value="#{saveData._nameList}">
                              <tr:column>
                                   <f:facet name="header">
                                        <tr:outputText value="Name" />
                                   </f:facet>                              
                              </tr:column>
                         </tr:table>
I have just create one ArrayList object in Backing bean i.e. nameList and put getter setter functions for it.
Please help me out for this issue.
Thank You,
Navnath

Similar Messages

  • List pulling data that does not match set parameter

    I have created a template and a list in Marketing that I have set to pull based on a particular date range and flag (Y or N). But when I run the list, I get some records that fall out of the data range and some records that have a 'N' flag even though I set the parameter to only pull 'Y'. Most of the records are correct but there are some that are not. Has anyone else experienced this?

    I have created a template and a list in Marketing that I have set to pull based on a particular date range and flag (Y or N). But when I run the list, I get some records that fall out of the data range and some records that have a 'N' flag even though I set the parameter to only pull 'Y'. Most of the records are correct but there are some that are not. Has anyone else experienced this?

  • Please help me out with this error:Logical dimension table D_TARGET has a source D_TARGET that does not join to any fact source.

    I get the folowing error when I run the global consistency check
    WARNINGS:
    Business Model DAC_Measures:
    [39008] Logical dimension table D_TARGET has a source D_TARGET that does not join to any fact source.
    Can someone help me out please?
    Thank you!

    It seems your dimension is not joined to any facts. Did you check your BMM/physical joins?

  • Binding a shared variable to a NI-PSP data object does not work

    Hi,
    I want to share data between a RT-target and one or more hosts (LV 8.6.1). The network shared variables are deployed to the RT-Target.  According to NI accessing shared variables from another project or host has to be done by defining a shared variable on the host and aliasing it to the NI-PSP data object on the target.
     I did that and the host shared variable generated an error (0x8BBB0011) during runtime.
    Next I aliased to a shared variable deployed on the host from another project. This did work.
    Another thing I tried was to bind the variable from the RT-target to a display element:
    This is working !!! And as you can see the path of the NI-PSP data object is exactly the same ! So what is the difference between binding a data object to a shared variable and to a display element?
    Is there a bug in the SVE or am I missing something here?
    The host project:
    The publisher VI
    Hope, someone has an answer.
    Regards
    Matthias Quade
    Solved!
    Go to Solution.
    Attachments:
    AliasTestWrite-RT.vi ‏8 KB
    AliasTestConsumer.vi ‏8 KB

    Dear Mr. Quade,
    thank you for posting at the National Instruments Forum. There is a known issue with the path of the bound variable with LabVIEW 8.6.1
    Please download the patch for LabVIEW 8.6.1, it should solve your problem:
    http://joule.ni.com/nidu/cds/view/p/id/1255/lang/de
    Best regards from Munich
    MarianO

  • [39008] Logical dimension table has a source  that does not join to any fac

    Hi
    I have a problem in BMM layer:
    *[*39008] Logical dimension table X has a source Y that does not join to any fact source.*
    To start with I have three tables joining to Cust (customer) table in physical layer
    Cust-Seg (Segments)-------------------------------->>Cust via segment key
    Cust-Geo (customer Geographics)-------------->>Cust via address key
    in the BMM layer under the CUST table when I pull in Cust- seg it works fine .
    But it gives an warning [39008] -if iI create a single LTS for the product with the join for all 3 tables
    The Same warning appears when i import th Cust -seg table as Logical table

    Have you tried this?
    http://obiee11gqna.blogspot.com/2011/02/obiee-error-39008.html

  • EJB 3.0 - JSF APPLICATION: DATA DOES NOT PERSIST TO THE DATABASE

    Hi,
    I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
    Here is my scenario ( Iam using JDeveloper IDE to create this application) -
    SCENARIO START
    The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
    1.) INDEX.JSP
    2.) ADDUSER.JSP
    Step 1: Create the USERS Table in database
    CREATE TABLE users
    user_id serial,
    username varchar(255) NOT NULL,
    first_name varchar(255),
    last_name varchar(255),
    password char(64) NOT NULL,
    CONSTRAINT pk_users PRIMARY KEY (user_id)
    Step 2: Add Database Connection To JDeveloper
    Go to Database Connection Navigator and create a New Database Connection using the Wizard
    Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
    Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
    Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows –
    User.java -
    package lux.domain;
    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.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name = "User.findAll", query = "select o from User o")
    @Table(name = "USERS")
    public class User implements Serializable {
    @Column(name="FIRST_NAME")
    private String firstName;
    @Column(name="LAST_NAME")
    private String lastName;
    @Column(nullable = false)
    private String password;
    @Column(nullable = false)
    private String username;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
    @SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
    @Column(name="USER_ID", nullable = false)
    private Long userId;
    public User() {
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String getUsername() {
    return username;
    public void setUsername(String username) {
    this.username = username;
    public Long getUserId() {
    return userId;
    public void setUserId(Long userId) {
    this.userId = userId;
    Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB à New Entites from Table (JPA/EJB3.0)
    Again Right Click on Model and create Session Bean from Wizard which creates two files –
    UserDAOBean.java – Stateless Session Bean
    UserDAO.java – Local Interface
    package lux.facade;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.List;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import lux.domain.User;
    @Stateless(name="UserDAO")
    public class UserDAOBean implements UserDAO {
    @PersistenceContext(unitName="Model")
    private EntityManager em;
    public UserDAOBean() {
    public User getUser(int UserId) {
    User u = new User();
    u = em.find(User.class, UserId);
    return u;
    public List<User> getAllUsers() {
    Query q = em.createQuery("SELECT u FROM User u");
    List<User> users = q.getResultList();
    return users;
    public void createUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.persist(u);
    public void updateUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.merge(u);
    public void deleteUser(User u) {
    em.remove(u);
    private String hashPassword(String password) {
    StringBuilder sb = new StringBuilder();
    try {
    MessageDigest messageDigest = MessageDigest.getInstance("SHA");
    byte[] bs;
    bs = messageDigest.digest(password.getBytes());
    for (int i = 0; i < bs.length; i++) {
    String hexVal = Integer.toHexString(0xFF & bs);
    if (hexVal.length() == 1) {
    sb.append("0");
    sb.append(hexVal);
    } catch (NoSuchAlgorithmException ex) {
    Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
    return sb.toString();
    Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
    Step 7: Now Right Click on View/Controller Node and create a Java File –
    UserController.java -
    package lux.controllers;
    import javax.ejb.EJB;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import lux.domain.User;
    import lux.facade.UserDAO;
    public class UserController {
    @EJB UserDAO userDao;
    private User user;
    private DataModel model;
    public String createUser() {
    this.user = new User();
    return "create_new_user";
    public String saveUser() {
    String r = "success";
    try {
    userDao.createUser(user);
    } catch (Exception e) {
    e.printStackTrace();
    r = "failed";
    return r;
    public DataModel getUsers() {
    model = new ListDataModel(userDao.getAllUsers());
    return model;
    public User getUser() {
    return user;
    public void setUser(User user) {
    this.user = user;
    Step 8: Configure page flow in faces-config.xml
    1. Create the JSP file adduser.jsp by right-clicking View-Controller
    node and selecting New > JSP. Use the wizard to create JSF – JSP Page, fill in
    File Name adduser.jsp, click Finish. -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New user</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:messages/>
    <h:panelGrid columns="2">
    <h:outputText value="Username"/>
    <h:inputText
    id="Username"
    value="#{user.user.username}"
    required="true"/>
    <h:outputText value="First name"/>
    <h:inputText
    id="FirstName"
    value="#{user.user.firstName}" />
    <h:outputText value="Last name"/>
    <h:inputText
    id="LastName"
    value="#{user.user.lastName}" />
    <h:outputText value="Password" />
    <h:inputSecret
    id="Password"
    value="#{user.user.password}"
    required="true" />
    <h:panelGroup/>
    <h:commandButton
    action="#{user.saveUser}"
    value="Save"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    2. Repeat the previous step for another JSP file failed.jsp.
    3. On failed.jsp add the string
    Save failed
    Next we configure the page flow.
    1. Open faces-config.xml.
    2. Create index.jsp -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>User Listing</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:outputText value="User Listing"/>
    <h:commandLink action="#{user.createUser}" value="Create a user"/>
    <h:dataTable value="#{user.user}"
    var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Username"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.username}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="First name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.firstName}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Last name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.lastName}" />
    </h:column>
    </h:dataTable>
    </h:form>
    </f:view>
    </body>
    </html>
    3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow’s label to create_new_user.
    4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
    ailed
    5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
    This creates the following faces-config.xml file –
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config>
    <managed-bean>
    <managed-bean-name>user</managed-bean-name>
    <managed-bean-class>lux.controllers.UserController</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>username</property-name>
    <value>#{username}</value>
    </managed-property>
    <managed-property>
    <property-name>firstName</property-name>
    <value>#{firstName}</value>
    </managed-property>
    <managed-property>
    <property-name>lastName</property-name>
    <value>#{lastName}</value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <value>#{password}</value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>create_new_user</from-outcome>
    <to-view-id>/adduser.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/adduser.jsp</from-view-id>
    <navigation-case>
    <from-outcome>failed</from-outcome>
    <to-view-id>/failed.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/index.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
    Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model’s JAR and View-Controller’s
    WAR files to it.
    Step 11: Run the JSP Files
    SCENARIO END
    Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
    WHAT IS WRONG OUT HERE ???

    If you set a breakpoint in your createUser method - does this code get executed?
    We have a couple of tutorials that might show you how to do this.
    EJB/JSF with ADF-binding tutorial:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
    EJB/JSF without ADF binding:
    http://www.oracle.com/technology/obe/JavaEE_tutorial_10131/index.htm

  • EJB-JSF Application : Data does not persist to the database

    Hi,
    I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
    Here is my scenario ( Iam using JDeveloper IDE to create this application) -
    SCENARIO START
    The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
    1.) INDEX.JSP
    2.) ADDUSER.JSP
    Step 1: Create the USERS Table in database
    CREATE TABLE users
    user_id serial,
    username varchar(255) NOT NULL,
    first_name varchar(255),
    last_name varchar(255),
    password char(64) NOT NULL,
    CONSTRAINT pk_users PRIMARY KEY (user_id)
    Step 2: Add Database Connection To JDeveloper
    Go to Database Connection Navigator and create a New Database Connection using the Wizard
    Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
    Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
    Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows �
    User.java -
    package lux.domain;
    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.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name = "User.findAll", query = "select o from User o")
    @Table(name = "USERS")
    public class User implements Serializable {
    @Column(name="FIRST_NAME")
    private String firstName;
    @Column(name="LAST_NAME")
    private String lastName;
    @Column(nullable = false)
    private String password;
    @Column(nullable = false)
    private String username;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
    @SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
    @Column(name="USER_ID", nullable = false)
    private Long userId;
    public User() {
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String getUsername() {
    return username;
    public void setUsername(String username) {
    this.username = username;
    public Long getUserId() {
    return userId;
    public void setUserId(Long userId) {
    this.userId = userId;
    Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
    Again Right Click on Model and create Session Bean from Wizard which creates two files �
    UserDAOBean.java � Stateless Session Bean
    UserDAO.java � Local Interface
    package lux.facade;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.List;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import lux.domain.User;
    @Stateless(name="UserDAO")
    public class UserDAOBean implements UserDAO {
    @PersistenceContext(unitName="Model")
    private EntityManager em;
    public UserDAOBean() {
    public User getUser(int UserId) {
    User u = new User();
    u = em.find(User.class, UserId);
    return u;
    public List<User> getAllUsers() {
    Query q = em.createQuery("SELECT u FROM User u");
    List<User> users = q.getResultList();
    return users;
    public void createUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.persist(u);
    public void updateUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.merge(u);
    public void deleteUser(User u) {
    em.remove(u);
    private String hashPassword(String password) {
    StringBuilder sb = new StringBuilder();
    try {
    MessageDigest messageDigest = MessageDigest.getInstance("SHA");
    byte[] bs;
    bs = messageDigest.digest(password.getBytes());
    for (int i = 0; i < bs.length; i++) {
    String hexVal = Integer.toHexString(0xFF & bs);
    if (hexVal.length() == 1) {
    sb.append("0");
    sb.append(hexVal);
    } catch (NoSuchAlgorithmException ex) {
    Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
    return sb.toString();
    Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
    Step 7: Now Right Click on View/Controller Node and create a Java File �
    UserController.java -
    package lux.controllers;
    import javax.ejb.EJB;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import lux.domain.User;
    import lux.facade.UserDAO;
    public class UserController {
    @EJB UserDAO userDao;
    private User user;
    private DataModel model;
    public String createUser() {
    this.user = new User();
    return "create_new_user";
    public String saveUser() {
    String r = "success";
    try {
    userDao.createUser(user);
    } catch (Exception e) {
    e.printStackTrace();
    r = "failed";
    return r;
    public DataModel getUsers() {
    model = new ListDataModel(userDao.getAllUsers());
    return model;
    public User getUser() {
    return user;
    public void setUser(User user) {
    this.user = user;
    Step 8: Configure page flow in faces-config.xml
    1. Create the JSP file adduser.jsp by right-clicking View-Controller
    node and selecting New > JSP. Use the wizard to create JSF � JSP Page, fill in
    File Name adduser.jsp, click Finish. -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New user</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:messages/>
    <h:panelGrid columns="2">
    <h:outputText value="Username"/>
    <h:inputText
    id="Username"
    value="#{user.user.username}"
    required="true"/>
    <h:outputText value="First name"/>
    <h:inputText
    id="FirstName"
    value="#{user.user.firstName}" />
    <h:outputText value="Last name"/>
    <h:inputText
    id="LastName"
    value="#{user.user.lastName}" />
    <h:outputText value="Password" />
    <h:inputSecret
    id="Password"
    value="#{user.user.password}"
    required="true" />
    <h:panelGroup/>
    <h:commandButton
    action="#{user.saveUser}"
    value="Save"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    2. Repeat the previous step for another JSP file failed.jsp.
    3. On failed.jsp add the string
    Save failed
    Next we configure the page flow.
    1. Open faces-config.xml.
    2. Create index.jsp -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>User Listing</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:outputText value="User Listing"/>
    <h:commandLink action="#{user.createUser}" value="Create a user"/>
    <h:dataTable value="#{user.user}"
    var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Username"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.username}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="First name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.firstName}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Last name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.lastName}" />
    </h:column>
    </h:dataTable>
    </h:form>
    </f:view>
    </body>
    </html>
    3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow�s label to create_new_user.
    4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
    ailed
    5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
    This creates the following faces-config.xml file �
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config>
    <managed-bean>
    <managed-bean-name>user</managed-bean-name>
    <managed-bean-class>lux.controllers.UserController</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>username</property-name>
    <value>#{username}</value>
    </managed-property>
    <managed-property>
    <property-name>firstName</property-name>
    <value>#{firstName}</value>
    </managed-property>
    <managed-property>
    <property-name>lastName</property-name>
    <value>#{lastName}</value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <value>#{password}</value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>create_new_user</from-outcome>
    <to-view-id>/adduser.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/adduser.jsp</from-view-id>
    <navigation-case>
    <from-outcome>failed</from-outcome>
    <to-view-id>/failed.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/index.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
    Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model�s JAR and View-Controller�s
    WAR files to it.
    Step 11: Run the JSP Files
    SCENARIO END
    Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
    WHAT IS WRONG OUT HERE ???

    If you set a breakpoint in your createUser method - does this code get executed?
    We have a couple of tutorials that might show you how to do this.
    EJB/JSF with ADF-binding tutorial:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
    EJB/JSF without ADF binding:
    http://www.oracle.com/technology/obe/JavaEE_tutorial_10131/index.htm

  • JSF - EJB 3.0 Application - Data does not persist to the database

    Hi,
    I am developing a JSF - EJB application and the data that I send from JSP Page through JSF Managed Bean --> Session Bean --> Java Persistence does not persist in database.
    Here is my scenario ( Iam using JDeveloper IDE to create this application) -
    ------------------------------------------------------- SCENARIO START
    The scenario consists of two web pages, one enlisting all the users stored in the database, the other contains a form for adding a user
    1.) INDEX.JSP
    2.) ADDUSER.JSP
    Step 1: Create the USERS Table in database
    CREATE TABLE users
    user_id serial,
    username varchar(255) NOT NULL,
    first_name varchar(255),
    last_name varchar(255),
    password char(64) NOT NULL,
    CONSTRAINT pk_users PRIMARY KEY (user_id)
    Step 2: Add Database Connection To JDeveloper
    Go to Database Connection Navigator and create a New Database Connection using the Wizard
    Step 3: Create a New Application in JDeveloper and select JSF, EJB from Application Template
    Step 4: ENTITY BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
    Use The Wizard and create Entity Bean from Users Table which creates an Entity Bea POJO file as follows �
    User.java -
    package lux.domain;
    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.NamedQuery;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name = "User.findAll", query = "select o from User o")
    @Table(name = "USERS")
    public class User implements Serializable {
    @Column(name="FIRST_NAME")
    private String firstName;
    @Column(name="LAST_NAME")
    private String lastName;
    @Column(nullable = false)
    private String password;
    @Column(nullable = false)
    private String username;
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="users_seq_generator")
    @SequenceGenerator(name="users_seq_generator", sequenceName="users_user_id_seq")
    @Column(name="USER_ID", nullable = false)
    private Long userId;
    public User() {
    public String getFirstName() {
    return firstName;
    public void setFirstName(String firstName) {
    this.firstName = firstName;
    public String getLastName() {
    return lastName;
    public void setLastName(String lastName) {
    this.lastName = lastName;
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String getUsername() {
    return username;
    public void setUsername(String username) {
    this.username = username;
    public Long getUserId() {
    return userId;
    public void setUserId(Long userId) {
    this.userId = userId;
    Step 5: STATELESS SESSION BEAN - In the EJB Node Right Click and Select EJB � New Entites from Table (JPA/EJB3.0)
    Again Right Click on Model and create Session Bean from Wizard which creates two files �
    UserDAOBean.java � Stateless Session Bean
    UserDAO.java � Local Interface
    package lux.facade;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.util.List;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    import lux.domain.User;
    @Stateless(name="UserDAO")
    public class UserDAOBean implements UserDAO {
    @PersistenceContext(unitName="Model")
    private EntityManager em;
    public UserDAOBean() {
    public User getUser(int UserId) {
    User u = new User();
    u = em.find(User.class, UserId);
    return u;
    public List<User> getAllUsers() {
    Query q = em.createQuery("SELECT u FROM User u");
    List<User> users = q.getResultList();
    return users;
    public void createUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.persist(u);
    public void updateUser(User u) {
    String hashedPw = hashPassword(u.getPassword());
    u.setPassword(hashedPw);
    em.merge(u);
    public void deleteUser(User u) {
    em.remove(u);
    private String hashPassword(String password) {
    StringBuilder sb = new StringBuilder();
    try {
    MessageDigest messageDigest = MessageDigest.getInstance("SHA");
    byte[] bs;
    bs = messageDigest.digest(password.getBytes());
    for (int i = 0; i < bs.length; i++) {
    String hexVal = Integer.toHexString(0xFF & bs);
    if (hexVal.length() == 1) {
    sb.append("0");
    sb.append(hexVal);
    } catch (NoSuchAlgorithmException ex) {
    Logger.getLogger(UserDAOBean.class.getName()).log(Level.SEVERE, null, ex);
    return sb.toString();
    Step 6: Create a Deployment file in the Model and Deploy this to a JAR file
    Step 7: Now Right Click on View/Controller Node and create a Java File �
    UserController.java -
    package lux.controllers;
    import javax.ejb.EJB;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import lux.domain.User;
    import lux.facade.UserDAO;
    public class UserController {
    @EJB UserDAO userDao;
    private User user;
    private DataModel model;
    public String createUser() {
    this.user = new User();
    return "create_new_user";
    public String saveUser() {
    String r = "success";
    try {
    userDao.createUser(user);
    } catch (Exception e) {
    e.printStackTrace();
    r = "failed";
    return r;
    public DataModel getUsers() {
    model = new ListDataModel(userDao.getAllUsers());
    return model;
    public User getUser() {
    return user;
    public void setUser(User user) {
    this.user = user;
    Step 8: Configure page flow in faces-config.xml
    1. Create the JSP file adduser.jsp by right-clicking View-Controller
    node and selecting New > JSP. Use the wizard to create JSF � JSP Page, fill in
    File Name adduser.jsp, click Finish. -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>New user</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h:messages/>
    <h:panelGrid columns="2">
    <h:outputText value="Username"/>
    <h:inputText
    id="Username"
    value="#{user.user.username}"
    required="true"/>
    <h:outputText value="First name"/>
    <h:inputText
    id="FirstName"
    value="#{user.user.firstName}" />
    <h:outputText value="Last name"/>
    <h:inputText
    id="LastName"
    value="#{user.user.lastName}" />
    <h:outputText value="Password" />
    <h:inputSecret
    id="Password"
    value="#{user.user.password}"
    required="true" />
    <h:panelGroup/>
    <h:commandButton
    action="#{user.saveUser}"
    value="Save"/>
    </h:panelGrid>
    </h:form>
    </f:view>
    </body>
    </html>
    2. Repeat the previous step for another JSP file failed.jsp.
    3. On failed.jsp add the string <h2>Save failed</h2>.
    Next we configure the page flow.
    1. Open faces-config.xml.
    2. Create index.jsp -
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>User Listing</title>
    </head>
    <body>
    <f:view>
    <h:form>
    <h1><h:outputText value="User Listing"/></h1>
    <p><h:commandLink action="#{user.createUser}" value="Create a user"/></p>
    <h:dataTable value="#{user.user}"
    var="dataTableItem" border="1" cellpadding="2" cellspacing="2">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Username"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.username}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="First name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.firstName}" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Last name"/>
    </f:facet>
    <h:outputText value="#{dataTableItem.lastName}" />
    </h:column>
    </h:dataTable>
    </h:form>
    </f:view>
    </body>
    </html>
    3. Drag an arrow from index.jsp to adduser.jsp and replace the arrow�s label to create_new_user.
    4. Repeat the previous step for failed, by dragging and arrow from adduser.jsp to failed.jsp renaming the label to f
    ailed
    5. Finally repeat the step for adduser.jsp, by dragging from adduser.jsp to index.jsp renaming the label to success.
    This creates the following faces-config.xml file �
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config>
    <managed-bean>
    <managed-bean-name>user</managed-bean-name>
    <managed-bean-class>lux.controllers.UserController</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>username</property-name>
    <value>#{username}</value>
    </managed-property>
    <managed-property>
    <property-name>firstName</property-name>
    <value>#{firstName}</value>
    </managed-property>
    <managed-property>
    <property-name>lastName</property-name>
    <value>#{lastName}</value>
    </managed-property>
    <managed-property>
    <property-name>password</property-name>
    <value>#{password}</value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>create_new_user</from-outcome>
    <to-view-id>/adduser.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/adduser.jsp</from-view-id>
    <navigation-case>
    <from-outcome>failed</from-outcome>
    <to-view-id>/failed.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/index.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Step 9: Create a Deployment file in the View-Controller and Deploy this to a WAR file
    Step 10: Create a Deployment file in the View-Controller and create an EAR file and add Model�s JAR and View-Controller�s
    WAR files to it.
    Step 11: Run the JSP Files
    ------------------------------------------------------- SCENARIO END
    Now, When I execute Index.jsp, it does not list values from database and when I click on Create User link, it takes me to adduser.jsp page. When I fill values in this page and click Save button, it takes me to Save Failed page and data does not persist to the database.
    WHAT IS WRONG OUT HERE ???

    PLZZZZZZZZZzzzzzzzzzzz HELP ! ! !

  • Now the form works but data captured is not writing to the database table

    Hi
    I have a form that works but does not move from where it is after the submit button is clicked.
    Please advice

    <?php require_once('Connections/dbAttendance.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO attendlist (Windowsid, title, firstname, surname, extension, mobile, jobrole, course, cpg, mgrname, room) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['Wid'], "text"),
                           GetSQLValueString($_POST['title'], "text"),
                           GetSQLValueString($_POST['firstname'], "text"),
                           GetSQLValueString($_POST['surname'], "text"),
                           GetSQLValueString($_POST['contactno'], "text"),
                           GetSQLValueString($_POST['mobile'], "text"),
                           GetSQLValueString($_POST['jobrole'], "text"),
                           GetSQLValueString($_POST['courses'], "text"),
                           GetSQLValueString($_POST['cpg2'], "text"),
                           GetSQLValueString($_POST['mgrname2'], "text"),
                           GetSQLValueString($_POST['troom'], "text"));
      mysql_select_db($database_attending, $attending);
      $Result1 = mysql_query($insertSQL, $attending) or die(mysql_error());
      $insertGoTo = "ReportbyAll.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    mysql_select_db($database_dbAttendance, $dbAttendance);
    $query_rsattendance = "SELECT * FROM attendlist";
    $rsattendance = mysql_query($query_rsattendance, $dbAttendance) or die(mysql_error());
    $row_rsattendance = mysql_fetch_assoc($rsattendance);
    $totalRows_rsattendance = mysql_num_rows($rsattendance);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO attendlist (title, firstname, surname, extension, mobile, jobrole, course, cpg, mgrname, room, Adate) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['title'], "text"),
                           GetSQLValueString($_POST['firstname'], "text"),
                           GetSQLValueString($_POST['surname'], "text"),
                           GetSQLValueString($_POST['contactno'], "text"),
                           GetSQLValueString($_POST['mobile'], "text"),
                           GetSQLValueString($_POST['jobrole'], "text"),
                           GetSQLValueString($_POST['courses'], "text"),
                           GetSQLValueString($_POST['cpg2'], "text"),
                           GetSQLValueString($_POST['mgrname2'], "text"),
                           GetSQLValueString($_POST['troom'], "text"),
                           GetSQLValueString($_POST['Adate2'], "date"));
      mysql_select_db($database_attending, $attending);
      $Result1 = mysql_query($insertSQL, $attending) or die(mysql_error());
      $insertGoTo = "Listing.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    } ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Register</title>
    <style type="text/css">
    body {
              font: 100%/0.8 Verdana, Arial, Helvetica, sans-serif;
              background-color: #4E5869;
              margin: 0;
              padding: 0;
              color: #000;
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
              padding: 0;
              margin: 0;
    h1, h2, h3, h4, h5, h6, p {
              margin-top: 0;           /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
              padding-right: 15px;
              padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
              border: none;
    /* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
    a:link {
              color:#414958;
              text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
    a:visited {
              color: #4E5869;
              text-decoration: underline;
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
              text-decoration: none;
    /* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */
    .container {
              width: 80%;
              max-width: 960px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */
              min-width: 780px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */
              background-color: #FFF;
              margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */
    /* ~~the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo~~ */
    .header {
              background-color: #6F7D94;
    /* ~~ This is the layout information. ~~
    1) Padding is only placed on the top and/or bottom of the div. The elements within this div have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
    .content {
              padding: 10px 0;
    /* ~~ This grouped selector gives the lists in the .content area space ~~ */
    .content ul, .content ol {
              padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
    /* ~~ The footer ~~ */
    .footer {
              padding: 10px 0;
              background-color: #6F7D94;
    /* ~~ miscellaneous float/clear classes ~~ */
    .fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
              float: right;
              margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
              float: left;
              margin-right: 8px;
    .clearfloat { /* this class can be placed on a or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
              clear:both;
              height:0;
              font-size: 1px;
              line-height: 0px;
    </style>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
    <script language='JavaScript' type='text/javascript' src='TSScript/yahoo.js'></script>
    <script language='JavaScript' type='text/javascript' src='TSScript/event.js'></script>
    <script language='JavaScript' type='text/javascript' src='TSScript/dom.js'></script>
    <script language='JavaScript' type='text/javascript' src='TSScript/calendar.js'></script>
    <link rel='stylesheet' type='text/css' href='TSScript/TSCalendar/calendar.css' />
    <script language='JavaScript' type='text/javascript' src='TSScript/TSCalendar/TSCalendar.js'></script>
    </head>
    <body>
    <div class="container">
      <div class="header">
      <img src="Cerner At Imperial2.jpg" width="960" height="150" alt="" />
      </div>
      <div class="content">
        <h3>Attendance Register: </h3>
              <p><?php echo "Date  ".date("d/m/Y");?></p>
        <form action="<?php echo $editFormAction;?>" id="form1" name="form1" method="post">
          <table width="780" border="0" cellspacing="10" summary="Cerner@Imperial">
            <tr>
              <td><div align="right">* User ID</div></td>
              <td colspan="2"><span id="sprytextfield1">
                <input name="Wid" type="text" id="Wid" tabindex="1" size="18" maxlength="10" />
              <span class="textfieldRequiredMsg"> a value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* Title</div></td>
              <td colspan="2"><span id="spryselect1">
                <select name="title" id="title" tabindex="2">
                  <option value="0">Select</option>
                  <option value="Ms">Ms</option>
                  <option value="Mrs">Mrs</option>
                  <option value="Mdm">Mdm</option>
                  <option value="Mr">Mr</option>
                  <option value="Dr">Dr</option>
                  <option value="Professor">Prof</option>
                </select>
    <span class="selectRequiredMsg">    Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* First name</div></td>
              <td colspan="2"><span id="sprytextfield2">
                <input name="firstname" type="text" id="firstname" tabindex="3" size="40" maxlength="30" />
              <span class="textfieldRequiredMsg"> a value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* Surname</div></td>
              <td colspan="2"><span id="sprytextfield5">
                <input name="surname" type="text" id="surname" tabindex="4" size="40" maxlength="30" />
              <span class="textfieldRequiredMsg"> a value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* Contact/ Bleep</div></td>
              <td colspan="2"><span id="sprytextfield3">
                <input name="contactno" type="text" id="contactno" tabindex="5" size="10" maxlength="6" />
              <span class="textfieldRequiredMsg">a value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">Mobile (optional)</div></td>
              <td colspan="2"><input name="mobile" type="text" id="mobile" tabindex="6" size="25" maxlength="18" />          <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* Job role</div></td>
              <td colspan="2"><span id="spryselect2">
                <select name="jobrole" id="jobrole" tabindex="7">
                  <option value="0">Select</option>
                  <option value="Doctor">Doctor</option>
                  <option value="CNS/NP">CNS/NP</option>
                  <option value="Midwife">Midwife</option>
                  <option value="Other Staff">Other Staff</option>
                  <option value="Nurse IP HCA">Nurse IP &amp; HCA</option>
                  <option value="Nurse OP HCA">Nurse OP &amp; HCA</option>
                  <option value="IP Physician Assitant">IP Physician Assistant</option>
                  <option value="OP Phlebotomist">OP Phlebotmist</option>
                  <option value="Pharmacists">Pharmacists</option>
                  <option value="Therapist AHP">Therapist &amp; AHP</option>
                  <option value="Medical Secretary">Medical Secretary</option>
                  <option value="Bed Manager">Bed Manager</option>
                  <option value="Medical Record Staff">Medical Records</option>
                  <option value="Medical Records Manager">Medical Records Mgr</option>
                  <option value="OP Booking Clerk">OP Booking Clerk</option>
                  <option value="OP Receptionist">OP Receptionist</option>
                  <option value="ED Admin">ED Admin</option>
                  <option value="Ward Administrator">Ward Administrator</option>
                  <option value="IP Wait List Clerk/Mgr">IP Wait List Clerk/Mgr</option>
                  <option value="Antenatal Supervisor">Antenatal Supervisor</option>
                  <option value="Clinical Coder">Clinical Coder</option>
                  <option value="Clinical Coding Mgr">Clinical Coding Mgr</option>
                  <option value="Pi Help Desk Backoffice">Pi Help Desk Analyst/Back Office</option>
                </select>
              <span class="selectInvalidMsg">Please select a valid item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* Manager's Name</div></td>
              <td colspan="2"><span id="sprytextfield4">
              <input name="mgrname2" type="text" id="mgrname2" tabindex="8" size="40" maxlength="30" />
              <span class="textfieldRequiredMsg"> a value is required.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right"></div></td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* Course</div></td>
              <td colspan="2"><span id="spryselect3">
                <select name="courses" id="courses" tabindex="10" title="course">
                  <option value="0">Select</option>
                  <option value="Doctors">Doctors</option>
                  <option value="Nurse IP">Nurse IP</option>
                  <option value="Nurse OP">Nurse OP</option>
                  <option value="Midwife">Midwife</option>
                  <option value="HCA">HCA</option>
                  <option value="Pharmacist">Pharmacist</option>
                  <option value="Back Office Staff">Back Office Staff</option>
                  <option value="AHP">AHP</option>
                  <option value="Pi Help Desk Analyst">Pi Help Desk Analyst</option>
                  <option value="Medical Secretary">Medical Secretary</option>
                  <option value="OP Phlebotmist">OP Phlebotmist</option>
                  <option value="Champion Users Doctors">Champion Users Doctors</option>
                  <option value="Champion Users Nurse IP">Champion Users Nurse IP</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* Training Location </div></td>
              <td><span id="spryselect4">
                <select name="troom" id="troom"  tabindex="11" title="location">
                  <option value="0">Select</option>
                  <option value="CXH">Charing Cross</option>
                  <option value="HH">Hammersmith Hammersmith</option>
                  <option value="QEH">Queen Charlottee Hospital</option>
                  <option value="SMH">St Mary's Hospital</option>
                  <option value="WEH">Western Eye Hospital</option>
                  <option value="SCC">St Charles Community</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">* CPG</div></td>
              <td><span id="spryselect5">
                <select name="cpg2"  id="cpg2"  tabindex="12" title="cpg">
                  <option value="0">Select</option>
                  <option value="CPG 1 Medicine">CPG1 - Medicine</option>
                  <option value="CPG 2 Surgery &amp; Cancer">CPG2 - Surgery and Cancer</option>
                  <option value="CPG3 Specialist Services">CPG3 - Specialist Services</option>
                  <option value="CPG4 Circulatory Services and Renal Medicine">CPG4 - Circulatory Services and Renal Medicine</option>
                  <option value="CPG5 Womens and Childrens">CPG5 - Womens and Childrens</option>
                  <option value="CPG6 Clinical and Investigative Sciences">CPG6 - Clinical and Investigative Sciences</option>
                  <option value="CP7 Private Patients">CPG7 - Private Patients</option>
                  <option value="Others">Others</option>
                </select>
              <span class="selectRequiredMsg">Please select an item.</span></span></td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td><input type="submit" name="submitbt" id="submitbt" value="Submit" /></td>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="center">* Mandatory Fields</div></td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
            <tr>
              <td> </td>
              <td colspan="2"> </td>
              <td> </td>
            </tr>
          </table>
          <input type="hidden" name="MM_insert" value="form1" />
        </form>
        <p> </p>
        <p> </p>
      <div class="footer">
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur", "change"]});
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {validateOn:["blur", "change"]});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur", "change"]});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur", "change"]});
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "integer", {validateOn:["blur", "change"]});
    var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {invalidValue:"-1", isRequired:false, validateOn:["blur", "change"]});
    var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur"]});
    var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["blur", "change"]});
    var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3");
    var spryselect4 = new Spry.Widget.ValidationSelect("spryselect4");
    var spryselect5 = new Spry.Widget.ValidationSelect("spryselect5", {validateOn:["blur", "change"]});
    </script>
    </div>
    </div>
    <p>
        <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>
      </p>
      <P></P>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($rsattendance);
    ?>

  • DBIF_RSQL_TABLE_UNKNOWN Table AUSPN_V1 does not exist in the database with ID R/3

    Hi All,
    We are encountering numerous short dumps in our system caused by Table AUSPN_V1 does not exist in the database with ID R/3.
    Can anyone advise how to solve the issue? Please find below portion of the short dumps.
    Category               ABAP Programming Error
    Runtime Errors         DBIF_RSQL_TABLE_UNKNOWN
    ABAP Program           SAPLCLVF
    Application Component  CA-CL-CL
    Date and Time          11.06.2014 12:08:28
    Short text
         A table is unknown or does not exist.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLCLVF" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         A table is referred to in an SAP Open SQL statement that either does not
          exist or is unknown to the ABAP Data Dictionary.
         The table involved is "AUSPN_V1" or another table accessed in the statement.
    Source Code Extract
    Line  SourceCde
      104     if dupl = kreuz.
      105       insert auspc_v2 client specified from table auspcv2
      106                              accepting duplicate keys.
      107     else.
      108       insert auspc_v2 client specified from table auspcv2.
      109       if syst-subrc ne 0.
      110         message a585 with tabausp.
      111       endif.
      112     endif.
      113     refresh auspcv2.
      114   endif.
      115   read table auspcv3 index 1.
      116   if syst-subrc = 0.
      117     if dupl = kreuz.
      118       insert auspc_v3 client specified from table auspcv3
      119                              accepting duplicate keys.
      120     else.
      121       insert auspc_v3 client specified from table auspcv3.
      122       if syst-subrc ne 0.
      123         message a585 with tabausp.
      124       endif.
      125     endif.
      126     refresh auspcv3.
      127   endif.
      128   read table auspnv1 index 1.
      129   if syst-subrc = 0.
      130     if dupl = kreuz.
      131       insert auspn_v1 client specified from table auspnv1
      132                              accepting duplicate keys.
      133     else.
    >>>>>       insert auspn_v1 client specified from table auspnv1.
      135       if syst-subrc ne 0.
      136         message a585 with tabausp.
      137       endif.
      138     endif.
      139     refresh auspnv1.
      140   endif.
      141   read table auspnv2 index 1.
      142   if syst-subrc = 0.
      143     if dupl = kreuz.
      144       insert auspn_v2 client specified from table auspnv2
      145                              accepting duplicate keys.
      146     else.
      147       insert auspn_v2 client specified from table auspnv2.
      148       if syst-subrc ne 0.
      149         message a585 with tabausp.
      150       endif.
      151     endif.
      152     refresh auspnv2.
      153   endif.

    Hello
    Please check on transaction SE11 if this table exists and if it is active.
    Also, it may be a database issue. What is your database?
    BR
    Caetano

  • Table /xyz/abc does not exist in the database

    Hi experienced developers,
    I created two transparent tables in customer name space in development system, transport to quality together with program using the tables, everything fine, no errors, no warnings.
    Then transported to production. No errors, no warnings. Detailed protocol shows tables have been activated, no errors or warnings.
    First try to use the program gives a dump.
    line 1191:
    ""/xyz/abc" is not defined in the ABAP Dictionary as a table, p"
    "rojection view, or database view."
    Double-click on the table in program code gives a popup information message
    Table/xyz/abc does not exist in the
    database
    After acknowleding the popup, the usual dictionary entry is shown, table is active. Utilities -> database object -> Display leads to an empty screen
    Fields of /xyz/abc  
    Fld name Position Data Type Length Decimals Not null Default
      Indexes for /xyz/abcI
    Utilities -> runtime object -> Display shows  the table name followed by message
    There is no active runtime object for ...
    prededed by big icon exclamation mark.
    We created a new transport with exactly the same result.
    Basis people have no idea.
    The only thing special (but OK I think) is that the tables have key fields only.
    Database is Oracle 11.2.0.2.0, SAP ECC 6.0
    SAP_ABA     701     0008     SAPKA70108     Cross-Application Component
    SAP_BASIS     701     0008     SAPKB70108     SAP Basis Component
    PI_BASIS     701     0008     SAPK-70108INPIBASIS     Basis Plug-In
    ST-PI     2008_1_700     0005     SAPKITLRD5     SAP Solution Tools Plug-In
    SAP_BS_FND     701     0009     SAPK-70109INSAPBSFND     SAP Business Suite Foundation
    SAP_BW     701     0008     SAPKW70108     SAP Business Warehouse
    SAP_AP     700     0022     SAPKNA7022     SAP Application Platform
    WEBCUIF     700     0009     SAPK-70009INWEBCUIF     SAP WEBCUIF 700
    Yes I know, this is a DDIC forum question but I hope for more (experienced) readers here.
    Thank you all for any hint leading to a solution.
    Best regards
    Clemens Li

    Hi,
    thank you for the comments although it does not help.
    Here is the excerpt from productive system  import protocol (original table names replaced as customer requirement)
    *** Activate objects at level 1
    Too low cost (2.100) for parallel processing. Minimum: 6.000
    * Synchronous execution, no parallel processing *
    Activate table /xyz/abcd1
    Table /xyz/abcd1 was activated successfully
    Activate table /xyz/abcd2
    Table /xyz/abcd2 was activated successfully
    Synchronous processing: 4 sec., 2 objects, 2.100 costs
          Object Activation
    End phase  001 ***********************************************************
    Start phase 002 **********************************************************
          Statistics on Activated and Deleted Objects
    Number of objects to be activated............:  2
    Objects not activated........................:  0
    Activated objects with errors in dependencies:  0
    Objects activated with warning...............:  0
    Successfully activated objects...............:  2
    Number of objects to be deleted..............:  0
    Objects not successfully deleted.............:  0
    Successfully deleted objects.................:  0
    Tables/views with DROP/CREATE................:  0
    No. of them marked for DROP/CREATE: 0
    Not marked for DROP/CREATE: 0
    Number of nametabs to be deleted.............:  0
    Successfully deleted nametabs................:  0
    Nametabs that were not successfully deleted..:  0
          Statistics on Activated and Deleted Objects
    End phase  002 ***********************************************************
    =========================================================================
    Mass Activation
    =========================================================================
    Process..................: ENNIPROD_10
    Return code..............: 0
    Phase 001..................: 00:00:04 (Object Activation)
    Phase 002..................: < 1 sec. (Statistics on Activated and ...)
    Program runtime..........: 00:00:05
    Date, time...............: 08.03.2012, 16:30:43
    Program end==============================================================
    ABAP Dictionary: Activation
    End date and time : 20120308163043
    Ended with return code:  ===> 0 <===
    Actually, I don' understand it.
    Regards,
    Clemens

  • Table ZCHECKPICK does not exist in the database

    Hi!
       I have a table "ZCHECKPICK" no "MANDT - Client".
       Then I inserted a field "MANDT - Client"  and executed SE14 to "Active and adjust database".
        The table is now "does not exist in the database" but the struture is ok.
      What do i do to get the table in DataBase again?
    <Priority normalized in subject line>
    Edited by: Vinod Kumar on Sep 13, 2011 9:32 AM

    Dear Clayton,
    you can try a few things
    1) generate/activate the table prior to call SE14.
    2) after confirming that the table is well generated, go to SE14 and choose "Delete Database Table"
    3) then, still on SE14, click on "Activate and Adjust database"
    [http://imageshack.us/photo/my-images/607/20110913010743.jpg/]
    That should fix it.
    Kind Regards
    /Ricardo Quintas

  • Table Z does not exist in the database

    Hi,
    I have created a Z table and modified the DataType from NUMC to DEC and transported to Quality server
    and it is giving an information error that (Table Z does not exist in the database) then once again
    i modified the DataType from DEC to NUMC and transported to Quality server  then still it is giving an information error that
    (Table Z does not exist in the database) please help me out in this issue.
    Thanks in advance.

    Hi Jayanthumer,
    Have you Activated (Ctrl + F3) the Table in SE11 before transporting to Quality server ?
    Try to activate (Ctrl + F3) the table in SE11 of your Quality server...
    It may not be imported properly into Quality server...
    Ask to BASIS person about errors/warnings while importing to Quality Server..
    Also activate all dataelement and domains.... make sure all things are active...
    Once you activate it then it will create the table in database... till then there will be no table in database...
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Licecache table missing Table MATRIXINDE does not exist in the database wit

    Hello,
    We recently done a system copy of our APO system, everything went well. in case of Livecache there are 2 problem
    1) when we do the integration for LCA/LDA/LCA while we mentione the Livecache server it is not taking the host name , it is only picking the IP address of the livecache server. If we tried host name, it times out.
    2) once we give the IP address as livecache server  we can start the live cache server. Bure there is only two tables in it
    when we run
    transaction Livecache Check (/SAPAPO/OM03) we get the erro i.e.Table MATRIXINDE does not exist in the database with ID LCA
    runtime error DBIF_RSQL_TABLE_UNKNOWN
    When we look into the tables there are only 2 tables in it
    AAPSYSNAME
    LCA_WARNINGS
    when I compare with other system...it is missing a lots of other tables..
    We did re-initialized the livecache.
    Appreciate your help in this

    Hello Sudhir,
    1) Did you create the SAP ticket where this issue is reported?
    2) It's good to know more details about the APO version, liveCache/LCA versions on your
        source & target systems.
        What note or document did you follow to do a system copy of our APO system?
    3) Please pay attention to the recommendations in the SAP notes:::
             877203     Post steps after the Homogenous liveCache copy usi u2026
             886103    System Landscape Copy for SAP SCM
    Thank you and best regards, Natalia Khlopina

  • The list of workflow actions on the server references an assembly that does not exist

    Hi,
    This issue has been discussed many times in this forum , the reason why I am posting is I tried the resolution steps but I dont see any luck.
    I am getting the below message from the SharePoint designer 2007 when I am trying to modify a workflow
    "This list of workflow actions on the server references an assembly that does not exist. Some actions will not be available. The assembly strong name is Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.
    Contact your server administrator for more information."
    #1 : One of the post says "Normally you would see that error because someone has extended the Workflow actions available in SPD with a custom action developed in Visual Studio.  These custom actions are loaded when your workstation reads the WSS.ACTIONS
    file on the server.  The file is located in the 12 hive under Template\1033\workflow.  Your WSS.Actions file contains a reference to a custom action .dll which is not available on the server."
    I opened the WSS.Actions file in notepad, I dont see any line with *.dll in it. Am I missing something?
    #2: Another post says "The solution I discovered was that the server running my SharePoint Services was not up to .NET 3.0.  As soon as I updated to .NET 3.0 everything worked.I had made sure the machine running SharePoint Designer was updated, but
    had missed the SHarePoint Services server."
    The server is already updated to .Net 3.0.
    #3: I went to the %System Drive%\Documents and Settings\Local Settings\ApplicationData\Microsoft\SharePointDesigner.
    Deleted the ProxyAssemblyCache folder but no luck.
    Just checking if any one was able to resolve this issue by following any of the solution other than the above mentioned ones.
    Thanks,
    Cutloo

        I have the similar issue with my custom work flow. I have searched the whole day for the solution but no success, then at last a simple track works for me. Please try this if any one faces such issue.
    Basically the assembly that we have define in the ACTIONS file dose not exists on the server, because of two reasons, either we have given the wrong assembly name (in our case the namespace name inside our solution) or the PublicKeyToken may differ from the
    original assembly, that are deployed in GAC.
        So cross check both of these, in my case the assembly name was fine,
     <Action
        Name="Move Item to Another List and Send Email"
        ClassName="MyAssemblyName.Classname"
        Assembly="MyAssemblyName,Version=1.0.0.0, Culture=neutral, PublicKeyToken=4053d1fde8a1c781"
        AppliesTo="all"
        Category="Email actions">
    But the problem was in the 'PublicKeyToken', so i double click on the feature inside my solution,then in the bottom i have clicked on the manifest tab to check the entries.
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="MyAssemblyName Feature1" Id="f7f1bda0-5f65-40f1-a705-f6f15a41da3a" ReceiverAssembly="MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0c32dbb769ed64b5"
    ReceiverClass="MyAssemblyName.Features.Feature1.Feature1EventReceiver" Scope="WebApplication"></Feature>
    Here i got the actual PublicKeyToken for my assembly (0c32dbb769ed64b5), i have replaced this number inside ACTIONS file, deploy the soultion, reset IIS.
    It works for me,

Maybe you are looking for