Regarding  BuildHeader entity is Not Bound.

Hi All,
I am new to CRM WEBClient IC.
I have created a Zfield using AET tool and added in Interaction center Identify Account screen but
I am gettting a NOT BOUND for that Zfield .
I had my Zfields in BuildHeader entity in ROOT OBJECT model.
Now Why the BuilHeader entity is not bound ?
Could anyone help me track the reason and how to solve this error?
Regards,
Swaraj
Edited by: swaraj sap on Oct 13, 2009 5:12 PM

Is this with respect to portal server's blog portlet?

Similar Messages

  • BTCUSTOMER Entity not bound

    Hi Experts,
    I have a standard component after enhancing , added a custom view with context node BTCustomerI.
    In the component controller this context node is not there, so I enhanced the component controller and created BTCustomerI context node (BOL entity is BTCustomerI).
    After binding the view context node with component controller , when I execute the web UI, in the view fields what I see is BTCUSTOMERI NOT BOUND".
    We debugged and the binding is not happening though I have created the binding(view context to componnet context) .
    Has someone faced this issue, is there a way to resolve this?
    Highly rewarded.
    Regards,
    Lakshmi

    Hi Lakshmi,
    if you have no root entity, you have to create your own one:
    component ICCMP_BP_SEARCH/BuPaSearch class CL_CRMCMP_B_BUPASEARCH0_IMPL->DO_INIT_CONTEXT line 34 (SAP CRM 7.0):
    lv_wrapper = typed_context->SearchCustomer->get_collection_wrapper( ). "<-- entity in BOL collection?
      if lv_wrapper->IF_BOL_BO_COL~size( ) eq 0. "-> no, create one and put it into my collection
    * create the query instance
        CREATE OBJECT bo_col TYPE cl_crm_bol_bo_col.
        query_service = cl_crm_bol_query_service=>get_instance( 'BuilHeaderSearchNew' ).
        bo_col->add( query_service ).
        typed_context->SearchCustomer->set_collection( bo_col ).
      ENDIF.
    or you want to get current customer - use this e.g. in DO_INIT_CONTEXT:
    data:
    lo_bp             TYPE REF TO cl_crm_bol_entity,
    lo_cucobupa       TYPE REF TO cl_crmcmp_b_cucobupa_impl.
    * get current customer
    lo_cucobupa ?= me->get_custom_controller( 'GLOBAL.CRMCMP_BPIDENT/CuCoBuPa' ). "#EC_NOTEXT
    CHECK lo_cucobupa IS BOUND.
    lo_bp ?= lo_cucobupa->typed_context->customers->collection_wrapper->get_current( ).
    if lo_bp IS BOUND.
         " put current customer to my collection
          typed_context->BTCustomerI->collection_wrapper->clear( ).
          typed_context->BTCustomerI->collection_wrapper->add( lo_bp ).
    endif.
    best wishes,
    Hakan

  • Regarding NOT BOUND error in Zfield

    Hi All,
    I am  new to CRM WEBClient  IC.
    I have created a Zfield using AET tool and  added in Interaction center Identify Account screen but
    I am gettting a NOT BOUND for that  Zfield .
    Could anyone help me track the reason and how to solve this error?
    Regards,
    Swaraj

    Hi Steve,
    Thanks for your reply.
    As u said i posted the same question in Interaction center.
    Please could you give me the description in detail .
    Regards,
    Swaraj

  • Exception is thrown "mydb is not bound"(needs urgent help)

    We r three students and our final project is a BPM(Business peocess Management)system.
    BPM is actually a workflow system(managing the business processes)and all the rules and constraints are applied from the Rule Management System.
    we have started the implementation, and therefore we need some help related to the implementation.
    We r using EJB2.0 with JBuilder9, JBoss3.2 as the application server and tomcate as the web server.
    problem:
    I want to create manual database connection using DataSource,
    I am using mysql and database name is mydb.
    I have done all the reqiured configration of mysql with Joss and it is working.
    After getting the initial context, when i try to lookup the datasource, exception is thrown "mydb is not bound"
    Initial context is correct because i have tried entity beans asd it works well.
    code is
    Hashtable contextValues = new Hashtable();
    contextValues.put(Context.PROVIDER_URL, "jnp://loopback:1099");
    contextValues.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    Context context = new InitialContext(contextValues);
    context.lookup("java://mydb");
    Kindly help me if u find time,
    regards!

    try java:comp/env/jdbc/mydb or java:comp/env/mydb

  • Context Node not bound

    Hi,
    I have a scenario where in i have to pass data from  view1 of Component 1  to View 2 of Component2.
    As i understand , this is possible only through the component controllers.
    while achieving this,I am facing a problem in the initial step itself.
    My View 1 has a context node BTADMINH and i have created a similar node in the comp.controller and have binded them using this code
      iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_COMPONENT
                 iv_target_node_name = 'BTADMINH'
                 iv_node_2_bind = BTADMINH )
    I have created 2 input fields in my view using these attributes.When i test the view i get the value BTADMINH not bound in both the input fields.
    Please guide me through to resolve the problem.
    Best Regards
    Uma Thirugnanam

    Hi Yevgen,
    Definitely. Sorry if i had not mentioned that. The BOL entity exists for the context nodes in both View controller and Component Controller.The nodes were basically created out of the BOL Entity named  'BTADMINH' itself.
    does your context node contain some value in runtime?
    The Two attributes that i have selected as modal attributes in the view are basically input fields. So i need to enter them once the view gets loaded.
    Best Regards
    Uma Thirugnanam
    Edited by: Uma Thirugnanam on Jul 15, 2008 3:15 PM

  • PO_BOX not bound

    Hello ,
    I have enhanced the compoent:IUICMD for PO BOX which is selected from BOL entity :'BuilStandardAddress'. For this i have created a new context node for this attribute and assign the same into view configuration.
    But while testing the view IUICMD/SearchAccount , in the PO BOX -
    'BuilStandardAddress/PO_BOX not bound' is showing as content.
    But the cotext node is bound to BUILHEARDERSEARCH.
    Please suggest.
    Regards
    Deb

    Hello Amar,
    I am not using AET, since the attributes Po Box & Mobile No fields are not present in standard BOL entity 'BUILHeaderSearch'.
    A few steps tried-
    1. by using BOL entity 'BUILStandardAddress' selecting the Po Box attribuite & created a  new context node.
    2. in the same context node 'Search' of IUICMD/SearchAccount , added the above attribute but in the both the cases
        'BUILStandardAddress\PO_BOX not bound' is showing as content in the Po Box.
    Now i have added the attribute by enhacnement of the source structure of the BOL entity BUILHeaderSearch.
    Now that content is not showing & need to include the attribute in the Query Search option. i.e based on the PO Box content need to fetch the result.
    Looking at this option now, can you please help.
    Note: you can check this component by using business role:UTILIC_REG._
    Waiting for the reply.
    Thanks & Regards
    Deb

  • Error: Fields not Bound.

    Hi,
    I have developed Z UI Comopnent and facing Error on UI screen for each filed 'Filed not Bound'.
    Below are the steps which i have followed.
    1) Created UI component ZTEST_BP.
    2) Added Model - ALL to models using runtime repository.
    3) Created Custom controller BPCuCO using wizard - Added Model Node BUILHEADER.
    4) Created new View BPDetailsview using wizard, also done binding of view with custim controller during wizard.
    5) In newly created view added First Name, Last Name, *** fields to the View using UI Config tool in GUI.
    6) Assigned View to the window using Runtime Repository.
    7) Executed Application.
    So after execution i am still getting message in each filed as FIRSTNAMEnot bound, LASTNAMEnot bound. Also when i am navigating to the context node it is showing its bound to the Custum controller. Even below code is generated in CREATE method of context impl class.
    method create_builheader.
        data:
          model        type ref to if_bsp_model,
          coll_wrapper type ref to cl_bsp_wd_collection_wrapper,
          entity       type ref to cl_crm_bol_entity,           "#EC *
          entity_col   type ref to if_bol_entity_col.           "#EC *
        model = owner->create_model(
            class_name     = 'ZL_ZBP_UPDA_BPUPDATEVIEW_CN00'
            model_id       = 'BuilHeader' ).                    "#EC NOTEXT
        builheader ?= model.
        clear model.
    bind to custom controller
        owner->do_context_node_binding(
                 iv_controller_type = cl_bsp_wd_controller=>co_type_custom
                 iv_name =
                 'ZTEST_BP/bpupdateCuCo'                      "#EC NOTEXT
                 iv_target_node_name = 'BUILHEADER'
                 iv_node_2_bind = builheader ).
    endmethod.
    Can any one please help, what can be the reason ? why this message is getting populated in UI. And what can be done to correct the same.
    Regards,
    Raghu.

    Instatiating an existing bp can be done by:  Run a query using the BP number as one of the search parameter and the result list contains BP entity( BuilHeader)
    below is the sample code for same
    *Data Declaration
      DATA: l_partner       TYPE bu_partner, "Busines partner number
            lr_bp_col       TYPE REF TO if_bol_entity_col,"Entity collection
            lr_search_bp    TYPE REF TO cl_crm_bol_query_service, " Search query instance
            iv_query_name   TYPE crmt_ext_obj_name. " Query name
    l_partner = <BP number).
      iv_query_name = 'BuilHeaderSearchNew '.
      lr_search_bp = cl_crm_bol_query_service=>get_instance( iv_query_name ).
    *Set selection parameters
      CALL METHOD lr_search_bp->set_property
        EXPORTING
          iv_attr_name = 'PARTNER'
          iv_value     = l_partner.
    *Read Search result
      lr_bp_col = lr_search_bp->get_query_result( ).
      CHECK lr_bp_col IS BOUND.
    lr_bpentity = lr_bp_col->get_first( ) "lr_bpentity contains Builheader entity of the BP number above mentioned.
    this entity needs to be added to your context node collection which will display BP data on your view
    You need explore BOL coding in standard components to find all these things.
    Regards,
    Priyanka
    Edited by: priyanka ganapa on Jun 16, 2011 4:47 PM

  • Not Bound Error

    Hi,
    I have created a custom component (Z).
    To that, I have added a model context node IBTEST having underlying BOL entity as IBHeader and containing attribue STATUS.
    I have added the attribute STATUS to the view using UI configurator.
    Now when I try to test the component it gives me the following error:
    Status IBHeader not bound
    Could anyone help me track the reason and how to solve this error?
    Kindly let me know all the details/steps that we need to follow to add a field on the view in an editable form.
    Regards,
    Mohit

    Your Z component will not work in Isolation. It has to be bounded to some existing Component where you want it to place it.
    Regards,
    Harshit

  • EJB not bound

    Hello
    Recently i faced an Exception when i run the client that "EJB not Bound exception". It only comes on Entity bean when i run any session bean i run porperly i don't know whats happen with Entity bean plz guide me on that i m using Jboss server.
    And when i define relation b/w local ejbs how can i define forigen key?
    Best Regards
    Uzair

    hi
    Here is my client
    HelloClient
    import javax.naming.*;
    import javax.ejb.*;
    import javax.rmi.*;
    public class HelloClient
    public static void main(String [] args)
    try{
    InitialContext ctx=new InitialContext();
    Object obj=ctx.lookup("HelloEJB");
    HelloHome home=(HelloHome)PortableRemoteObject.narrow(obj, HelloHome.class);
    Integer id=new Integer(Integer.parseInt(args[0]));
    Hello h=home.create(id,args[1]);
    }catch(Exception e)
    System.out.println(e);
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
         "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>HelloEJB</ejb-name>
    <local-home>HelloHome</local-home>
    <local>Hello</local>
    <ejb-class>HelloBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <abstract-schema-name>HelloAA</abstract-schema-name>
    <cmp-field>
    <field-name>helloId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>helloName</field-name>
    </cmp-field>
    <primkey-field>helloId</primkey-field>
    </entity>
    </enterprise-beans>
    </ejb-jar>

  • Problem in WEB-UI field (Not Bound)

    Hi Experts,
       I am new to CRM Technical, I have added new standard field (Date Of Birth) thourgh component work bench 'BSP_WD_CMPWB'  in 'Z_IC_AGENT' business role. after execution this business roles i could able to see this DOB field but its showing with 'NOT BOUND'
    1.   Can any one suggest me why that newly added field showing like that? Do i need to add any other setting or coding ?
    2.   How to add new Z field in this business role. Please tell me the right procedure.
    Thanks & Regards,
    Ramesh.

    Hi Ramesh,
    please open you component in transaction BSP_WD_CMPWB.
    Go to the contextnode where you added your attribute.
    Open the GET_ Method of your attribute and set here an external breakpoint.
    Now go back to the webclient UI, restart it and try again.
    You will stop at your breakpoint and you will be able to debug your issue.
    Kind regards
    Manfred

  • Error - Name jdbc is not bound in this Context

    Hi,
    i wanted to use Datasource in JDBC to make connection with mysql
    suport and want to excute Jsp page but not able to execte some error is
    getting.
    1)Jsp Page: data_source.jsp
    <%@ page session="true" import="java.sql.*,javax.sql.*,javax.naming.*" %>
    <HTML>
    <body bgcolor="blue">
    <H1 align = "center" >
    Welcome to User and can see the DataSource Connection
    <%
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/test");
    Connection conn = ds.getConnection();
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * from emp");
    if(rs.next())
    %>
    <table width="100%" border="1" >
    <tr align="left">
    <th>Name</th>
    <th>Dept</th>
    </tr>
    <%
    do
    %>
    <TD> <%= rs.getString("Name") %> </TD>
    <TD> <%= rs.getString("Dept") %> </TD>
    <%
    }while(rs.next());
    %>
    </table>
    <%
    }else {
    %>
    No Results from Query:
    <%
    rs.close();
    stmt.close();
    conn.close();
    ctx.close();
    %>
    </body>
    </html>
    2) web.xml file content
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <description>MySQL Test App</description>
    <resource-ref>
    <description>Mysql DB Connection</description>
    <res-ref-name>jdbc/test</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    <servlet>
    <servlet-name>s1</servlet-name>
    <servlet-class>first</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>s1</servlet-name>
    <url-pattern>/test</url-pattern>
    </servlet-mapping>
    </web-app>
    3) myhealth.xml or server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="C:/Program Files/Apache Software Foundation/Tomcat
    5.0/myhealth" path="/myhealth" reloadable="true" privileged="true">
    <Resource name="jdbc/test"
    scope="Shareable" type="javax.sql.DataSource"
    auth="Container" description="hOME.."/>
    <ResourceParams name="jdbc/test">
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/test?autoReconnect=true</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>root</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>test</value>
    </parameter>
    </ResourceParams>
    </Context>
    4) Error which i got during execution of data_Source.jsp page.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it
    from fulfilling this request.
    exception
    javax.servlet.ServletException: Name jdbc is not bound in this Context
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
    org.apache.jsp.Data_005fSource_jsp._jspService(Data_005fSource_jsp.java:115)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    org.apache.naming.NamingContext.lookup(NamingContext.java:815)
    org.apache.naming.NamingContext.lookup(NamingContext.java:198)
    org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    javax.naming.InitialContext.lookup(InitialContext.java:351)
    org.apache.jsp.Data_005fSource_jsp._jspService(Data_005fSource_jsp.java:56)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    As i made datasource Context using Tomcat apache. But i still get same error.
    I tried so much from Google search, please give me proper solution.
    Coz this is the common problem most of the programmers face initally
    Thanks,
    Prabhat

    i installed tomcat. the installation is done successfully..
    But i can't connect to the db(MySQL)
    i am getting some errors regarding some exception like
    **org.apache.jasper.JasperException: An exception occurred processing JSP page /TestTomcatToMySQLConn.jsp at line 16**
    **13:          Context ctx = new InitialContext();**
    **14:*          if(ctx == null )*
    *15:              throw new Exception("Boom - No Context");*
    *16:           ds = (DataSource)ctx.lookup("java:comp/env/jdbc/testDB");*
    *17:*
    *18:   if(ds == null )*
    *19:       throw new Exception("Boom - No Datasource");*
    Stacktrace:_
    *     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)*
    *     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)*
    *     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)*
    *     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    root cause_
    javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context_
    *     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)*
    *     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)*
    *     org.apache.jsp.TestTomcatToMySQLConnjsp._jspService(TestTomcatToMySQLConn_jsp.java:88)*_
    *     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    *     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)*
    *     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)*
    *     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    please Help

  • Ejb3 bean not bound

    Hi I am new to EJB . Now in our project we are using ejb3 and persistance. So tried
    a simple program which I found out from net. But when I am trying to run I am getting
    bean not bound. And in JBoss console it is showing error like
    ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS State: NOTYETINSTALLED
    These are all my files.
    Book.java
    package de.laliluna.library;
    import java.io.Serializable;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity
    @Table(name="book")
    @SequenceGenerator(name = "book_sequence", sequenceName = "book_id_seq")
    public class Book implements Serializable {
         private static final long serialVersionUID = 7422574264557894633L;
         private Integer id;
         private String title;
         private String author;
         public Book() {
              super();
         public Book(Integer id, String title, String author) {
              super();
              this.id = id;
              this.title = title;
              this.author = author;
         @Override
         public String toString() {
              return "Book: " + getId() + " Title " + getTitle() + " Author "
                        + getAuthor();
         public String getAuthor() {
              return author;
         public void setAuthor(String author) {
              this.author = author;
         @Id
         @GeneratedValue(strategy = GenerationType.TABLE, generator = "book_id")
         public Integer getId() {
              return id;
         public void setId(Integer id) {
              this.id = id;
         public String getTitle() {
              return title;
         public void setTitle(String title) {
              this.title = title;
    }BookTestBean.java
    package de.laliluna.library;
    import java.util.Iterator;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless
    public class BookTestBean implements BookTestBeanLocal, BookTestBeanRemote {
         @PersistenceContext(name="FirstEjb3Tutorial")
         EntityManager em;
         public static final String RemoteJNDIName =  BookTestBean.class.getSimpleName() + "/remote";
         public static final String LocalJNDIName =  BookTestBean.class.getSimpleName() + "/local";
         public void test() {
              Book book = new Book(null, "My first bean book", "Sebastian");
              em.persist(book);
              Book book2 = new Book(null, "another book", "Paul");
              em.persist(book2);
              Book book3 = new Book(null, "EJB 3 developer guide, comes soon",
                        "Sebastian");
              em.persist(book3);
              System.out.println("list some books");
              List someBooks = em.createQuery("from Book b where b.author=:name")
                        .setParameter("name", "Sebastian").getResultList();
              for (Iterator iter = someBooks.iterator(); iter.hasNext();)
                   Book element = (Book) iter.next();
                   System.out.println(element);
              System.out.println("List all books");
              List allBooks = em.createQuery("from Book").getResultList();
              for (Iterator iter = allBooks.iterator(); iter.hasNext();)
                   Book element = (Book) iter.next();
                   System.out.println(element);
              System.out.println("delete a book");
              em.remove(book2);
              System.out.println("List all books");
               allBooks = em.createQuery("from Book").getResultList();
              for (Iterator iter = allBooks.iterator(); iter.hasNext();)
                   Book element = (Book) iter.next();
                   System.out.println(element);
    }BookTestBeanLocal.java
    package de.laliluna.library;
    import javax.ejb.Local;
    @Local
    public interface BookTestBeanLocal {
         public void test();     
    }BookTestBeanRemote.java
    package de.laliluna.library;
    import javax.ejb.Remote;
    @Remote
    public interface BookTestBeanRemote {
         public void test();
    }client part--> FirstEJB3TutorialClient.java
    package de.laliluna.library;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import de.laliluna.library.BookTestBean;
    import de.laliluna.library.BookTestBeanRemote;
    * @author hennebrueder
    public class FirstEJB3TutorialClient {
          * @param args
         public static void main(String[] args) {
               * get a initial context. By default the settings in the file
               * jndi.properties are used. You can explicitly set up properties
               * instead of using the file.
                Properties properties = new Properties();
                properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces");
                properties.put("java.naming.provider.url","localhost:1099");
              Context context;
              try {
                   context = new InitialContext(properties);
                   BookTestBeanRemote beanRemote = (BookTestBeanRemote) context
                             .lookup(BookTestBean.RemoteJNDIName);
                   beanRemote.test();
              } catch (NamingException e) {
                   e.printStackTrace();
                    * I rethrow it as runtimeexception as there is really no need to
                    * continue if an exception happens and I do not want to catch it
                    * everywhere.
                   throw new RuntimeException(e);
    }I have created persistance.xml and application.xml under META-INF folder.
    persistance.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="FirstEjb3Tutorial">
    <jta-data-source>hsqldb-db</jta-data-source>
    <properties>
    <property name="hibernate.hbm2ddl.auto"
    value="create-drop"/>
    </properties>
    </persistence-unit>
    </persistence>application.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
         <display-name>Stateless Session Bean Example</display-name>
         <module>
              <ejb>FirstEjb3Tutorial.jar</ejb>
         </module>
    </application>and in hsqldb-ds i have configured the driver and connection
    <datasources>
       <local-tx-datasource>
          <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
          <!-- Datasources are not available outside the virtual machine -->
          <jndi-name>ejb3ProjectDS</jndi-name>
          <!-- For server mode db, allowing other processes to use hsqldb over tcp.
          This requires the org.jboss.jdbc.HypersonicDatabase mbean.
          <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
          -->
          <!-- For totally in-memory db, not saved when jboss stops.
          The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
          <connection-url>jdbc:hsqldb:.</connection-url>
          -->
          <!-- For in-process persistent db, saved when jboss stops.
          The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
          -->
         <!-- <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url-->
         <connection-url>jdbc:hsqldb:data/tutorial</connection-url>
          <!-- The driver class -->
          <driver-class>org.hsqldb.jdbcDriver</driver-class>
          <!-- The login and password -->
          <user-name>sa</user-name>
          <password></password>
          <!--example of how to specify class that determines if exception means connection should be destroyed-->
          <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
          <!-- this will be run before a managed connection is removed from the pool for use by a client-->
          <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
          <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
          <min-pool-size>5</min-pool-size>
          <!-- The maximum connections in a pool/sub-pool -->
          <max-pool-size>20</max-pool-size>
          <!-- The time before an unused connection is destroyed -->
          <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
          <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
          <idle-timeout-minutes>0</idle-timeout-minutes>
          <!-- sql to call when connection is created
            <new-connection-sql>some arbitrary sql</new-connection-sql>
          -->
          <!-- sql to call on an existing pooled connection when it is obtained from pool
             <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
          -->
          <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
             <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
          -->
          <!-- Whether to check all statements are closed when the connection is returned to the pool,
               this is a debugging feature that should be turned off in production -->
          <track-statements/>
          <!-- Use the getConnection(user, pw) for logins
            <application-managed-security/>
          -->
          <!-- Use the security domain defined in conf/login-config.xml -->
          <security-domain>HsqlDbRealm</security-domain>
          <!-- Use the security domain defined in conf/login-config.xml or the
               getConnection(user, pw) for logins. The security domain takes precedence.
            <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
          -->
          <!-- HSQL DB benefits from prepared statement caching -->
          <prepared-statement-cache-size>32</prepared-statement-cache-size>
          <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
          <metadata>
             <type-mapping>Hypersonic SQL</type-mapping>
          </metadata>
          <!-- When using in-process (standalone) mode -->
          <depends>jboss:service=Hypersonic,database=localDB</depends>
          <!-- Uncomment when using hsqldb in server mode
          <depends>jboss:service=Hypersonic</depends>
          -->
       </local-tx-datasource>
       <!-- Uncomment if you want hsqldb accessed over tcp (server mode)
       <mbean code="org.jboss.jdbc.HypersonicDatabase"
         name="jboss:service=Hypersonic">
         <attribute name="Port">1701</attribute>
         <attribute name="BindAddress">${jboss.bind.address}</attribute>    
         <attribute name="Silent">true</attribute>
         <attribute name="Database">default</attribute>
         <attribute name="Trace">false</attribute>
         <attribute name="No_system_exit">true</attribute>
       </mbean>
       -->
       <!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
       <mbean code="org.jboss.jdbc.HypersonicDatabase"
         name="jboss:service=Hypersonic,database=localDB">
         <attribute name="Database">localDB</attribute>
         <attribute name="InProcessMode">true</attribute>
       </mbean>
    </datasources>.
    Edited by: bhanu on Dec 2, 2008 9:45 AM

    Hi jadespirit ,
    I have the same problem in the same Book example ,my ejb3 project name "BaseHotele" so i follow what u said and this is my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="FirstEjb3Tutorial">
    *<jta-data-source>java:BaseHoteleDS</jta-data-source>*
    <properties>
    <property name="hibernate.hbm2ddl.auto"
    value="create-drop"/>
    </properties>
    </persistence-unit>
    </persistence>
    But it didn't work i have always HotelTestBean not bound!!
    Help PLEASE i think that i had a mistake in the persistence.xml:i have 2 days searching for solutions without a good result!!!!!!!!!!!!!

  • "Name jdbc is not bound in this Context" when conncetiong from different pa

    Hi,
    I'm just a beginner at this so I'll have to explain everything in details as i have no idea what could be wrong.
    I have a working connection to mydatabase using the following method in a CommonMethods.java file in WEB-INF; this file belongs to the "package mrkt.app;" package.
        public Connection getDataBaseConnection() {
            Connection conn = null ;
            try {
                Context ctx = new InitialContext();
                DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/myproject");
                conn = ds.getConnection();
            } catch (Exception ex) {
                ex.printStackTrace();
            return conn ;
        }     I needed to create a new class in package "package mrkt.app.cat.shop;", in this new java file i need access to the database so i just copied and pasted the above code in the new java file, compiled it, put it in the "WEB-INF/classes/mrkt/app/cat/shop" folder, restarted tomcat to reload classes. The class is loaded successfully, but i always get the following error when calling the method(getShopsCount) using the connection function (getDatabaseConnection)
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
         at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
         at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
         at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at mrkt.app.cat.shop.ShoppingGuide.getDataBaseConnection(ShoppingGuide.java:30)
         at mrkt.app.cat.shop.ShoppingGuide.getShopsCount(ShoppingGuide.java:49)
         at org.apache.jsp.shopping_005fguide_005fsection_jsp._jspService(shopping_005fguide_005fsection_jsp.java:1418)Regards.
    Yehia A.Salam

    I have the same problem!
    I created a couple of virtualhost on the same webapp like described here
    http://www.onjava.com/pub/a/onjava/2003/06/25/tomcat_tips.html
    the application works without problems if I point my browser to
    http://ip_address/webapp
    but, if I open http://www.myvirtualhost.com/ I get a
    javax.servlet.ServletException: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    I even defined the same datasource I use for the ip based browsing in the virtualhost datasources (through admin, without restarting tomcat) but I get the same exception... any suggestion?
    thanks

  • 'BuilHeader not bound' error for custom field added by AET

    Hi,
    We created a Custom field through AET in IC Web UI Screen
    The field is in the Accont Identification screen
    But the field is showing 'Buiheader nto bound error' on loading of the screen.
    We generated the GETTER and the SETTER Methods for the corresponding field in the context node CONTACT PERSONS of the ICCMP_BP_SEARCH Component.
    While Debugging its seen that the
        DATA: current TYPE REF TO if_bol_bo_property_access.
    if iterator is bound.
          current = iterator->get_current( ).
        else.
          current = collection_wrapper->get_current( ).
        endif.
    current  is not getting populated and thats reason why its giving the 'Buiheader not bound error'
    Any suggestions on this will be highly appreciated.
    Regards,
    Sijo
    Edited by: sijokjohn85 on Oct 21, 2009 3:01 PM

    Hi Masood,
    I checked the method create_contactpersons but I couldnt find anything unusual there.
    The code below is present in the  CREATE_CONTACTPERSONS Mehtod of the context class
    model = owner->create_model(
            class_name     = 'ZL_CRMCMP_B_BUPASEARCHB2B_CN01'
            model_id       = 'ContactPersons' ). "#EC NOTEXT
        ContactPersons ?= model.
        CLEAR model.
    * bind to custom controller
      owner->do_context_node_binding(
               iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_CUSTOM
               iv_name =
               'ICCMP_BP_SEARCH/CuCoSearch' "#EC NOTEXT
               iv_target_node_name = 'CONTACTPERSONS'
               iv_node_2_bind = CONTACTPERSONS ).
    Any suggestions like how to fix this issue.
    Regards,
    Sijo

  • XFA prefix not bound

    Hi all,
    I have a form in which I allow xhtml in the fields - however when I try to render it in Workspace I get an error which is caused by the following:
    Caused by: com.adobe.livecycle.formsservice.exception.RenderFormException: xmldata: The prefix "xfa" for attribute "xfa:APIVersion" associated with an element type "body" is not bound., cause: The prefix "xfa" for attribute "xfa:APIVersion" associated with an element type "body" is not bound.
    One field in my xml looks like this:
       body xmlns="http://www.w3.org/1999/xhtml" xfa:APIVersion= "Acroform:2.6.7120.0" xfa:spec="2.1">
       p style="margin-top:0pt;margin-bottom:0pt;line-height:12.75pt;
       text-valign:bottom;font-family:Verdana; font-size:9pt; color:#000080;      text-decoration:none"
    Elm Street 2
       body
    What should I do to fix this problem?
    Please advice
    Sincerely
    Kim Christensen

    Hi Jiandong
    Did u check if datasource property of the form is properly bound to address node.
    Or else there can be one more problem that u r writing the code for filling address in controller, so check the binding/ mapping of address node in controller and view.
    Hope this helps.
    Regards
    Amita

Maybe you are looking for