JNDI bind from StartupClass ?

Hi,
I am trying to perfrom a simple JNDI bind from my StartupClass's startUp
method using the following code [where configFileName is a valid
string]:
     Context ctx = new InitialContext();
     try {
          CompositeName name =
               new CompositeName("java:comp/env/ConfigFile");
          ctx.bind(name, configFileName);
     } catch(Exception e) {
          System.err.println("\nException while trying to bind.\n");
          e.printStackTrace();
I recieve the following exception:
Exception while trying to bind.
javax.naming.OperationNotSupportedException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.naming.NamingException.<init>(NamingException.java:114)
at
javax.naming.OperationNotSupportedException.<init>(OperationNotSupportedException.java:39)
at com.netscape.server.jndi.CompContext.bind(Unknown Source)
at com.netscape.server.jndi.java.javaURLContext.bind(Unknown Source)
at com.netscape.server.jndi.java.javaURLContext.bind(Unknown Source)
at javax.naming.InitialContext.bind(InitialContext.java:378)
at
com.getpaid.thinclient.config.ConfigService.initialize(ConfigService.java:123)
at
com.getpaid.thinclient.config.ConfigService.startService(ConfigService.java:40)
at
com.iplanet.ias.startup.StartupClass.startUp(StartupClass.java:53)
at com.kivasoft.engine.Engine.invokeStartUp(Unknown Source)
at com.kivasoft.engine.Engine.run(Compiled Code)
at com.kivasoft.engine.Engine.main(Unknown Source)
The same code works from a JBoss MBean (analagous to StartupClass).
Can you tell me what, if anything, I'm doing wrong?
Thank you,
Eric Kahler

The startup class uses cosnaming for JNDI so it behaves the same as the
rich client, ie no java:comp/etc.. you will need to use the absolute
name.
regards
Han-Dat
[email protected] wrote:
>
Hi,
I am trying to perfrom a simple JNDI bind from my StartupClass's startUp
method using the following code [where configFileName is a valid
string]:
Context ctx = new InitialContext();
try {
CompositeName name =
new CompositeName("java:comp/env/ConfigFile");
ctx.bind(name, configFileName);
} catch(Exception e) {
System.err.println("\nException while trying to bind.\n");
e.printStackTrace();
I recieve the following exception:
Exception while trying to bind.
javax.naming.OperationNotSupportedException
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at javax.naming.NamingException.<init>(NamingException.java:114)
at
javax.naming.OperationNotSupportedException.<init>(OperationNotSupportedException.java:39)
at com.netscape.server.jndi.CompContext.bind(Unknown Source)
at com.netscape.server.jndi.java.javaURLContext.bind(Unknown Source)
at com.netscape.server.jndi.java.javaURLContext.bind(Unknown Source)
at javax.naming.InitialContext.bind(InitialContext.java:378)
at
com.getpaid.thinclient.config.ConfigService.initialize(ConfigService.java:123)
at
com.getpaid.thinclient.config.ConfigService.startService(ConfigService.java:40)
at
com.iplanet.ias.startup.StartupClass.startUp(StartupClass.java:53)
at com.kivasoft.engine.Engine.invokeStartUp(Unknown Source)
at com.kivasoft.engine.Engine.run(Compiled Code)
at com.kivasoft.engine.Engine.main(Unknown Source)
The same code works from a JBoss MBean (analagous to StartupClass).
Can you tell me what, if anything, I'm doing wrong?
Thank you,
Eric Kahler--
Senior Consultant
Sun Professional Services
iPlanet e-commerce Solutions
Sun Microsystems Australia Pty Ltd

Similar Messages

  • Probmel with Local EJB JNDI Binding

    Hi friends,
    I am using jboss server. I need to deployee one session bean and one entity bean. and I have done it. but it show me jndi binding like this
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookBean' to jndi 'local/BookBean@18722656'
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookFacadeBean' to jndi 'local/BookFacadeBean@9668715'
    but it should be bind jndi bninding like this
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookBean' to jndi 'BookBean'
    [BaseLocalProxyFactory] Bound EJB LocalHome 'BookFacadeBean' to jndi 'BookFacadeBean'
    I don't understand where I am comminting mistake. I am giving ejb-jar.xml mapping below.
    <?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>
         <description>BookEJB</description>
         <display-name>BookEJB</display-name>
         <enterprise-beans>
              <session>
                   <display-name>BookFacade</display-name>
                   <ejb-name>BookFacadeBean</ejb-name>
                   <local-home>com.ejb.book.service.BookFacadeHome</local-home>
                   <local>com.ejb.book.service.BookFacadeLocal</local>
                   <ejb-class>com.ejb.book.service.BookFacadeBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
              </session>
              <entity>
                   <description>EntityBean</description>
                   <display-name>BookEntity</display-name>
                   <ejb-name>BookBean</ejb-name>
                   <local-home>com.ejb.book.persistence.BookLocalHome</local-home>
                   <local>com.ejb.book.persistence.BookLocal</local>
                   <ejb-class>com.ejb.book.persistence.BookLocalBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <abstract-schema-name>book</abstract-schema-name>
                   <cmp-field>
                        <field-name>bookID</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookName</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookAuthor</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookVersion</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>bookPrice</field-name>
                   </cmp-field>
                   <primkey-field>bookID</primkey-field>
                   <query>
                        <description>Query By All</description>
                             <query-method>
                                  <method-name>findAll</method-name>
                                  <method-params></method-params>
                             </query-method>
                             <ejb-ql>SELECT OBJECT(u) FROM book AS u </ejb-ql>
                   </query>
                   <query>
                        <description>Query for findByBookName</description>
                        <query-method>
                             <method-name>findByPrimaryKey</method-name>
                                  <method-params>
                                       <method-param>java.lang.Integer</method-param>
                                  </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookID=?1</ejb-ql>
              </query>
                   <query>
                        <description>Query for findByBookName</description>
                        <query-method>
                             <method-name>findByBookName</method-name>
                                  <method-params>
                                       <method-param>java.lang.String</method-param>
                                  </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookName=?1</ejb-ql>
              </query>
              <query>
                        <description>Query for findByBookAuthor</description>
                        <query-method>
                             <method-name>findByBookAuthor</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookAuthor=?1</ejb-ql>
              </query>
              <query>
                   <description>Query for findByBookVersion</description>
                   <query-method>
                        <method-name>findByBookVersion</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>SELECT OBJECT(u) FROM book AS u     WHERE u.bookVersion=?1</ejb-ql>
              </query>
              <query>
                   <description>Query for findByBookPrice</description>
                   <query-method>
                        <method-name>findByBookPrice</method-name>
                        <method-params>
                             <method-param>java.lang.Float</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>SELECT OBJECT(u) FROM book AS u WHERE u.bookPrice=?1</ejb-ql>
              </query>
              </entity>
         </enterprise-beans>
         <assembly-descriptor>
              <container-transaction>
                   <method>
                        <ejb-name>BookBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <container-transaction>
                   <method>
                        <ejb-name>BookFacadeBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    I appreciate if you reply me on [email protected].
    Thanks in advance.
    TumoDav (UmaShankar)

    Hi friend,
    Thanks for replying me. But , I am unable to call this EJB by simple EJBClient (simple java file) when I am trying to call this ejb, then it show me this error :-
    javax.naming.NameNotFoundException: BookFacadeBean not bound
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
         at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
         at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
         at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
         at sun.rmi.transport.Transport$1.run(Transport.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
         at java.lang.Thread.run(Thread.java:595)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
         at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at EJBClient.EJBClient.BookEJBClient(EJBClient.java:45)
         at EJBClient.EJBClient.main(EJBClient.java:30)
    Here I am giving my ejb client.
    package EJBClient;
    import java.util.Iterator;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import com.ejb.book.service.BookFacadeBean;
    import com.ejb.book.service.BookFacadeHome;
    import com.ejb.book.service.BookFacadeLocal;
    import com.ejb.book.vo.BookVo;
    * @author UmaShankar
    public class EJBClient {
         * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              BookEJBClient();
         public static void BookEJBClient(){
              String providerURL = "jnp://localhost:1099";
              String factoryName = "org.jnp.interfaces.NamingContextFactory"; //org.jnp.interfaces.NamingContextFactory
              String factoryPkgs = "org.jboss.naming:org.jnp.interfaces";
              Properties prop = System.getProperties();
              prop.put("Context.PROVIDER_URL", providerURL);
              prop.put("java.naming.provider.url", providerURL);
              prop.put("java.naming.factory.initial", factoryName);
              prop.put("java.naming.factory.url.pkgs", factoryPkgs);
              try{
                   Context ctx = new InitialContext(prop);
                   Object obj = ctx.lookup("BookFacadeBean");
                   BookFacadeHome home = (BookFacadeHome)PortableRemoteObject.narrow(obj, BookFacadeHome.class);
                   BookFacadeLocal local = home.create();
                   //java.util.Hashtable allD = local.getBookName();
                   System.out.println("-------------Start-------------------");
                   System.out.println("BookName:-"+local.getBookName());
                   System.out.println("BookAuthor:-"+local.getBookAuthor());
                   if(allD.isEmpty()){
                        System.out.println("There is no record. Empty Hash");
                   java.util.Set set = allD.keySet();
                   for(Iterator it = set.iterator();it.hasNext();System.out.println("-----------------------------")){
                        Integer key = (Integer)it.next();
                        BookVo vo = (BookVo)allD.get(key);
                        System.out.println(vo.getBookId());
                        System.out.println(vo.getBookName());
                        System.out.println(vo.getBookAuthor());
                        System.out.println(vo.getBookVersion());
                        System.out.println(vo.getBookPrive());
              }catch(Exception e){
                   e.printStackTrace();
    }

  • Remove the Enter key binding from a JPopupMenu

    Hi,
    Does anyone know how to remove the Enter key binding from a JPopupMenu?
    So when the popupmenu is showing and you type Enter, nothing should happen and the menu should stay where it is.
    I have tried:
    popup.getActionMap().put("enter", null);
    popup.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");but the popup always disappears.
    Any ideas?
    Cheers,
    patumaire

    First of all, that is not the proper way to "remove" a key binding. Read the Swing tutorial on [How to Use Key Bindings|http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html#howto] for more information.
    However, we still have a couple of problems:
    a) the input map is dynamically built as the popup menu is displayed
    b) the input map is built for the root pane, not the popup menu
    The following seems to work:
    popup.show(...);
    InputMap map = getRootPane().getInputMap(JTable.WHEN_IN_FOCUSED_WINDOW);
    map.put(KeyStroke.getKeyStroke("ENTER"), "none");
    KeyStroke[] keys = map.allKeys();
    for (int i = 0; i < keys.length; i++)
         KeyStroke key = keys;
         Object action = map.get( key );
         System.out.println(key + " : " + action);

  • Accessing a binding from inside a servlet

    Hey all,
    So I'm attempting to access a binding from a servlet instead of using the ApplicationModule approach which is recognized as a bad idea (http://blogs.oracle.com/jdevotnharvest/2010/11/when_to_use_createrootapplicationmodule_in_oracle_adf.html). However, when the code is executing in the servlet the line BindingContent.getCurrentBindingsEntry() returns null! I think there's something missing in my configuration that's causing ADFm to not recognize the servlet as having a binding file. Anything stand out?
    So inside of a servlet I have the following:
    public class RSSNewsServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("AllPapers1Iterator");
    Row [] rows = dciter.getAllRowsInRange();
    Web.xml:
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <servlet-name>NewsServlet</servlet-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>NewsServlet</servlet-name>
    <servlet-class><path-to-servlet>.RSSNewsServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>NewsServlet</servlet-name>
    <url-pattern>/servlet/news.rss</url-pattern>
    </servlet-mapping>
    newsServletPageDef.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.56.60" id="newsServletPageDef"
    Package="<path-to-pagedefs>pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <iterator Binds="AllPapers1" RangeSize="25"
    DataControl="GatewayNewsAppModuleDataControl"
    id="AllPapers1Iterator"/>
    </executables>
    <bindings>
    <tree IterBinding="AllPapers1Iterator" id="AllPapers1">
    <nodeDefinition DefName="<path-to-model>AllPapers"
    Name="AllPapers10">
    <AttrNames>
    <Item Value="PapId"/>
    <Item Value="PapTitle"/>
    <Item Value="PapPublishDate"/>
    <Item Value="PapExpireDate"/>
    <Item Value="PapAuthor"/>
    <Item Value="PapType"/>
    <Item Value="PapIssueDate"/>
    <Item Value="PapFileName"/>
    <Item Value="PapUserName"/>
    <Item Value="PapPostedDate"/>
    <Item Value="PapModifiedDate"/>
    <Item Value="PapNeverExpire"/>
    <Item Value="PapFile"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    </bindings>
    </pageDefinition>
    DataBindings.cpx:
    <pageMap>
    <page path="/servlet/news.rss" usageId="MyAlmacTemplate_view_newsServletPageDef"/>
    </pageMap>
    <pageDefinitionUsages>
    <page id="MyAlmacTemplate_view_newsServletPageDef"
    path="com.almac.aurora.gateway.pageDefs.newsServletPageDef"/>
    </pageDefinitionUsages>

    when the code is executing in the servlet the line BindingContent.getCurrentBindingsEntry() returns null!The method BindingContext.getCurrentBindingsEntry() returns from the requestScope the variable with key "bindings". When using ADF Faces this variable is set at ADF Faces' Prepare Model phase (by the PageLifecycleImpl.prepareModel() method). But when using a plain servlet this variable is not set (because the ADF Faces' page lifecycle is not executed) and this is the reason why you get a null result. As a workaround you can use the following code in your servlet:
    BindingContext bctx = BindingContext.getCurrent();
    DCBindingContainer pagedef = bctx.findBindingContainerByPath(request.getServletPath());
    bctx.setCurrentBindingsEntry(pagedef); // Invoke this method only if for some reason you need the "bindings" variable set in the environmentDimitar

  • Error: Binding from workflow to workitem aborted

    Hi ,
    I am getting an error in binding which I am not able to resolve. Let me try to explain the scenario first.
    1) In the workflow a container element is existing with the name ZBUS2081 which is having reference to object type BUS2081.
    2) BUS2081 is having an <b>attribute</b> "Company code" which is again having reference to object type BUS0002. BUS0002 has a key field "CompanyCodeId" which is having reference to database table T001-BUKRS.
    3) In a particular step of the workflow there is a binding between ZBUS2081.Companycode.CompanyCodeId ->CCODE where CCODE is a task container element having dictionary reference T001-BUKRS.
    4) When the workflow is executing it is giving error in this particular step. The error description are "Binding from workflow to workitem aborted"         "ZBUS2081.Companycode.CompanycodeId of binding assignment is not available    " Error when determining attribute COMPANYCODE of object"
    5) When I check the container in the technical details I see that ZBUS2081.Companycode.CompanycodeId is set to a value. I also checked the corresponding database table for the invoice document and found that this value is existing.
    Can anybody please help me on this as to why this binding error is occuring?
    Thanks in advance,
    Abhishek

    Hi Kjetil,
    the workflow started when a document is parked. Its triggering event is BUS2081-Parked. Even I was thinking in the same lines that may be the workflow is trying to access database information which has not been updated at that moment.
    When I checked the attribute Companycode of object BUS2081 I even found that the source is set to "Database field" and not "Virtual".
    But when I check the workflow container ZBUS2081.Companycode.CompanycodeId is having the correct value. This means the data <b>has</b> been fetched correctly from the database.
    Hence I feel if we cannot use an attribute with object reference directly in the binding, rather use a container operation to assign the value to another workflow container element and then use this element in the binding.
    Any inputs from any body to confirm this are welcome.
    regards,
    Abhishek

  • Change of settlement control (not binding) from 2 to 3

    Dear expert
    we want to change in plant xxxx settlement control (not binding) from 2 to 3. How can be do that. transaction has already been made in the plant.

    Hi Amit,
    As far as I understand you are making reference to the Price determination control field MLAST.
    The change of price determination control using TA CKMM should be done shortly before     
    running the MM period shift (Transaction MMPV) at month end. This procedure will ensure,
    that status 'newly created'  remains in the prior period unchanged. Please check the note 703604
    which provides a detailed explanation about how to execute transaction CKMM to change
    price determination from '2' to '3'.
    In addition, please read the note 384553 carefully as it explains what happens if     
    CKMM is executed.                                                        
    I hope helps.
    Regards,
    MLM

  • Binding from workflow to work item aborted

    Hi,
    In my workflow  the first two steps are  multi condition.
    after my second condition  i have created activity   step   - Task   and  binding the  bapi attribute value.
    i checked binding  no error.
    I am getting error in this part.
    The error is
    Workflow 'TEST' step number 1039: work item could not be created                          
    Source (expression '&PurchaseRequisition.Zvalue&') of binding assignment is not available   
    Error in the evaluation of expression '&PurchaseRequisition<???>.Zvalue&' for item '20'     
    Step 15 of WS23000111: Binding from workflow to work item aborted                               
    Error when determining attribute 'Zvalue' of object instance '[BO.BUS2105.001039]'   
    Step 15 of WS23000111: Binding from workflow to work item aborted
    Message no. WFEA031
    Diagnosis
    Serious errors have occurred in the binding from workflow to work item in step 15 of multistep task WS23000111. As a consequence, workflow 1039 has been forced into error status.
    Procedure
    "Change Workflow Container" then "Restart After Error" may suffice. It is probable, however, that the binding definition in WS23000111, step 15will have to be changed.
    pl help me to proceed further.
    Thnks in advance.
    sharma

    Hi,
    Seems that your custom BOR is not delegated to the supertype, please do the same in SWO6 and
    also check the binding from event to workflow.
    Thanks and Regards,
    Swaminathan

  • I am ready to order my iphoto picture book, but I want to change the binding from wirebound to hardcover.  Does anyone know how I can do that without losing my already assembled photo pages?

    I am ready to order my iphoto picture book, but I want to change the binding from wirebound to hardcover.  Does anyone know how I can do that without losing my already-assembled photo pages?

    Yes - select the book and duplicate it (Command - D) in case of problems - open it and click change theme and select the theme and the new style of binding
    Before ordering your book preview it using this method - http://support.apple.com/kb/HT1040 - and save the resulting PDF for reference - the delivered book will match it.
    then order after you have carefully checked the preview
    LN

  • How to setup a JNDI connection from Crystal report 12 (2008) ?

    I've CR 12 (2008)
    I've a report actually bind to datasource via DSN to a sql server.
    Now we need to migrate this connection to JDBC.
    So i downloaded microsft sql driver for jdbc and copied as
    C:\Program Files (x86)\Business Objects\Common\4.0\java/lib/external/sqljdbc4.jar
    I edited CRConfig.xml. adding this full path and file name at <Classpath>
    The parameters i entered are:
    URL: jdbc:sqlserver://10.1.2.40:1433;DatabaseName=CPR;username=selyon;password=......
    class name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    in the second page i entere my usernmae, my password and the db name,
    but when click on 'finish' CR tell me 'unable to fine JNDI driver'.
    What's the problem now

    Sorry, but I'm not on a home pc, I'm working on a virtualized pc with a long chain of permissions ... so I cannot simply download and run an utility...
    Instead... I think (I WAS thinking) someone from SAP can tell me this info ... Probably I'll buy a paid assistance ticket... But really it's a strange thing that a simply connection from a (so) paid software need a so difficult problem solving routine..
    I edited my environment variales: JAVA, PATH; CLASSPATH; JAVA_DIR, and a long list of others ... to ALL point to ALL of directory containing used jars...
    .. I asked my SysAdmin to edit CrConfig.xml and it's done ... classpath are rights, jdbc infos are also ok, ...
    .. but none ...

  • Error in EJB JNDI Binding for EMP Bean

    Hi friends,
    I need to call a ejb from second ejb ( entity bean from a sission bean). I have defined all xml mapping in ejb.xml.jar and server specific jar file (jboss.xml.jar). I am using boss-4.0.5.GA. But when I am calling that session bean from simple desk top client. It show me this error
    23:48:59,578 ERROR [STDERR] javax.naming.NameNotFoundException: UserLocalHome not bound
    23:48:59,578 ERROR [STDERR]      at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    23:48:59,578 ERROR [STDERR]      at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    23:48:59,578 ERROR [STDERR]      at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    23:48:59,578 ERROR [STDERR]      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    23:48:59,578 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.transport.Transport$1.run(Transport.java:153)
    23:48:59,578 ERROR [STDERR]      at java.security.AccessController.doPrivileged(Native Method)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    23:48:59,578 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:595)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
    23:48:59,578 ERROR [STDERR]      at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    23:48:59,578 ERROR [STDERR]      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    23:48:59,578 ERROR [STDERR]      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    23:48:59,578 ERROR [STDERR]      at javax.naming.InitialContext.lookup(InitialContext.java:351)
    23:48:59,578 ERROR [STDERR]      at com.ejb.service.UserFacadeBean.getHome(UserFacadeBean.java:51)
    23:48:59,578 ERROR [STDERR]      at com.ejb.service.UserFacadeBean.getAll(UserFacadeBean.java:74)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    23:48:59,578 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
    23:48:59,578 ERROR [STDERR]      at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
    23:48:59,578 ERROR [STDERR]      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    23:48:59,578 ERROR [STDERR]      at org.jboss.ejb.Container.invoke(Container.java:954)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    23:48:59,578 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
    23:48:59,578 ERROR [STDERR]      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    23:48:59,578 ERROR [STDERR]      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    23:48:59,578 ERROR [STDERR]      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    23:48:59,578 ERROR [STDERR]      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    23:48:59,578 ERROR [STDERR]      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    23:48:59,578 ERROR [STDERR]      at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
    23:48:59,578 ERROR [STDERR]      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    23:48:59,578 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    23:48:59,578 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
    23:48:59,578 ERROR [STDERR]      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.Transport$1.run(Transport.java:153)
    23:48:59,593 ERROR [STDERR]      at java.security.AccessController.doPrivileged(Native Method)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    23:48:59,593 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:595)
    23:48:59,593 ERROR [STDERR] java.lang.NullPointerException
    23:48:59,593 ERROR [STDERR]      at com.ejb.service.UserFacadeBean.getAll(UserFacadeBean.java:75)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    23:48:59,593 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
    23:48:59,593 ERROR [STDERR]      at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
    23:48:59,593 ERROR [STDERR]      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    23:48:59,593 ERROR [STDERR]      at org.jboss.ejb.Container.invoke(Container.java:954)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    23:48:59,593 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
    23:48:59,593 ERROR [STDERR]      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    23:48:59,593 ERROR [STDERR]      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    23:48:59,593 ERROR [STDERR]      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    23:48:59,593 ERROR [STDERR]      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    23:48:59,593 ERROR [STDERR]      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    23:48:59,593 ERROR [STDERR]      at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
    23:48:59,593 ERROR [STDERR]      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    23:48:59,593 ERROR [STDERR]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    23:48:59,593 ERROR [STDERR]      at java.lang.reflect.Method.invoke(Method.java:585)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.Transport$1.run(Transport.java:153)
    23:48:59,593 ERROR [STDERR]      at java.security.AccessController.doPrivileged(Native Method)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    23:48:59,593 ERROR [STDERR]      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    23:48:59,593 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:595)
    23:48:59,593 INFO [STDOUT] exit from getAll() method.....
    Can any one help me. how can I resolve it. When I see server log. when I found then one of bean is not perperly bind with jndi name. it showing message like this.
    23:48:21,187 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'FtacostManagerBean' to jndi 'local/FtacostManagerBean@27432016'
    It seems like , it unable to bind Manager Bean with local home. but I am not sure. Please help me. how can I resulve it.
    Here I am sending my ejb config files.
    JBoss.xml.jar
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
    <jboss>
    <enterprise-beans>
    <!--
    To add beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called jboss-beans.xml that contains
    the <session></session>, <entity></entity> and <message-driven></message-driven>
    markup for those beans.
    -->
    <entity>
    <ejb-name>UserBean</ejb-name>
    <local-jndi-name>UserLocalHome</local-jndi-name>
    </entity>
         <session>
    <ejb-name>UserFacadeBean</ejb-name>
    <jndi-name>UserFacadeHome</jndi-name>
    <ejb-local-ref>
    <ejb-ref-name>User</ejb-ref-name>
    <local-jndi-name>UserLocalHome</local-jndi-name>
    </ejb-local-ref>
    </session>
    <!--
    write a merge file jboss-webservices.ent for webservice-description
    -->
    </enterprise-beans>
    <!--
    To specify your own assembly descriptor info here, add a file to your
    XDoclet merge directory called jboss-assembly-descriptor.xml that contains
    the <assembly-descriptor></assembly-descriptor> markup.
    -->
    <assembly-descriptor>
    <!-- message destinations -->
    <!--
    To specify additional message-destination elements, add a file in the merge
    directory called jboss-message-destinations.ent that contains them.
    -->
    </assembly-descriptor>
    <resource-managers>
    </resource-managers>
    <!--
    | for container settings, you can merge in jboss-container.xml
    | this can contain <invoker-proxy-bindings/> and <container-configurations/>
    -->
    </jboss>
    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 >
    <description>Umashankar beans</description>
    <display-name>Programmed by umashnakar</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session>
    <display-name>UserFacade</display-name>
    <ejb-name>UserFacadeBean</ejb-name>
    <home>com.ejb.service.UserFacadeHome</home>
    <remote>com.ejb.service.UserFacadeRemote</remote>
    <ejb-class>com.ejb.service.UserFacadeBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <!-- Entity Beans -->
    <entity>
         <description>User Bean Made by Uma</description>     
         <display-name>This is local user Entity</display-name>
         <ejb-name>UserBean</ejb-name>
         <local-home>com.ejb.persistence.UserLocalHome</local-home>
         <local>com.ejb.persistence.UserLocal</local>
         <ejb-class>com.ejb.persistence.UserLocalBean</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>java.lang.Integer</prim-key-class>
         <reentrant>false</reentrant>
         <abstract-schema-name>user</abstract-schema-name>
              <cmp-field>
              <field-name>cuId</field-name>
              </cmp-field>
              <cmp-field>
              <field-name>accessCode</field-name>
              </cmp-field>
              <cmp-field>
              <field-name>password</field-name>
              </cmp-field>
              <cmp-field>
              <field-name>creationDate</field-name>
              </cmp-field>
              <cmp-field>
              <field-name>siteId</field-name>
              </cmp-field>
              <primkey-field>cuId</primkey-field>
              <query>
                        <description>Query by accessCode</description>
                        <query-method>
                             <method-name>findByAccessCode</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>                    
                        <ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.accessCode = ?1</ejb-ql>
              </query>
              <query>
                        <description>Query by accessCode</description>
                        <query-method>
                             <method-name>findByPassword</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.password = ?1</ejb-ql>
              </query>
              <query>
                        <description>Query by accessCode</description>
                        <query-method>
                             <method-name>findByCreationDate</method-name>
                             <method-params>
                                  <method-param>java.sql.Timestamp</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.creationDate = ?1</ejb-ql>
              </query>
              <query>
                        <description>Query by accessCode</description>
                        <query-method>
                             <method-name>findBySiteId</method-name>
                             <method-params>
                                  <method-param>java.lang.Integer</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(u) FROM user AS u WHERE u.siteId = ?1</ejb-ql>
              </query>
              <query>
                        <description>Query by accessCode</description>
                        <query-method>
                             <method-name>findAll</method-name>
                             <method-params/>
                        </query-method>
                             <ejb-ql>SELECT OBJECT(u) FROM user AS u </ejb-ql>
              </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor >
              <container-transaction>
    <method>
    <ejb-name>UserBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>UserFacadeBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    Please rep[y me on [email protected]. I appreciate it if you come on google talk.
    Thanks in Advance.
    UmaShankar(TumoDev)
    Software Engineer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    Hi,
    According to WAS 6 , every opened connection has to be commited (or rolledback) explicitly (didnt try autocommit) before closing. Even if all you have done with that connection is a SELECT Query.
    This has apparently solved the same problem I was getting. implement it and see whether it helps you.

  • JNDI binding issue

    Hi everyone, I'm having an issue with a not bound exception. According to the logs, I'm getting the not bound exception with the following details:
    The excerpt is here: 04/24/08 11:44:42.692 Info: [ProcessWrapper] org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'myDataSource' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: WRP not bound]
    It looks for me that Spring is doing the lookup correctly but failing to find the resource in JNDI. What I found for binding in the log is following.
    04/24/08 11:44:31.302 Info: [ProcessWrapper] 11:44:31,302 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultD S' to JNDI name 'javaefaultDS'
    04/24/08 11:44:31.552 Info: [ProcessWrapper] 11:44:31,552 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=J msXA' to JNDI name 'java:JmsXA'
    04/24/08 11:44:31.614 Info: [ProcessWrapper] 11:44:31,614 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MACRAE' to JNDI name 'java:MACRAE'
    We can see these JNDI names are successfully bound. WRP is the app which I am trying to run, MACRAE is another app that works in that environment. The web server is JBoss running in a DataSynapse grid server. Any tips on how to get the binding fixed?

    OK, I seem to be getting a new exception, not sure if I did any change but ran into this exception in the logs,
    11/08/24 18:45:08 ----YOGI----the exception from this specific block is javax.naming.Reference cannot be cast to javax.sql.DataSource*
    From what I read on the web, this is prevalent in glassfish and jboss. The reason could be that missing j2ee.jar in classpath or duplicate jdbc jars. I added j2ee.jar to my application library in oc4j dint resolve the issue. I removed jdbc jar from the OAS lib folder and restarted, it dint help.
    Any other clues, anyone?

  • JNDI bind/rebind and object state question

    Hi,
    I have an object that is part of an EAR application that is deployed into an app server. I load a Webapp that initializes an object and then binds it to an initial context under java:comp/env setting some initial state.
    However, when I access the object from an MDB as part of the EAR application, the state, when retrieved from the same context, was not retained. Here is the code I am using to bind the object to the context:
    if (!object.isRunning()) {
           System.out.println("Starting App...");
           object.start();
           try {
               getNamingContext().bind(object);
           } catch (Exception e) {
               System.out.println("Name bound already, rebinding...");
               try {
                   getNamingContext().rebind(object);
                   e.printStackTrace();
               } catch (Exception e1) {
                   e1.printStackTrace();
           System.out.println("Broker started...");
       }When I retrieve the object from the initial context as part of a message received within an MDB, the state is such that the object is always failing the .isRunning method test and subsequently throws an exception.
    What am I doing wrong? Is this related to the fact that possibly the WAR and the MDB create duplicate contexts when I expect there to be only one?
    Any insight is greatly appreciated.
    Thanks,
    John

    following procedure works fine for now, if there is any straight forward solutions,
    that will be helpful.
    1) Create the Subcontexts for each of the sub entries in the jndi name tree
    2) bind the object to the last entry in the tree.
    i.e if the jndi tree name is "one.two.three", and the bind object is Obj
    ctx = ctx.createSubcontext("one");
    ctx = ctx.createSubcontext("two");
    ctx = ctx.bind("three", obj);
    Thanks,
    Gangs.
    "Gangadhar" <[email protected]> wrote:
    >
    Hi,
    I am trying to bind the local object to the Weblogic JNDI, using the
    code below.
    It works fine if the bind name is a straight forward String(not a tree).
    It is
    throwing naming Exception when i am trying to bind into a new tree.
    Thanks,
    Gangs.
    //GETTING THE INITIAL CONTEXT:
    private Context getInitialContext() throws NamingException {
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    h.put(Context.SECURITY_PRINCIPAL, "user");
    h.put(Context.SECURITY_CREDENTIALS, "password");
    h.put(Context.PROVIDER_URL, url);
    return new InitialContext(h);
    } catch (NamingException ne) {
    log("We were unable to get a connection to the WebLogic server
    at "+url);
    log("Please make sure that the server is running.");
    throw ne;
    private registerObject()
    throws NamingException
    // Lookup the beans home using JNDI
    Context ctx = getInitialContext();
    try{
    //This binding works fine.
    String bname = "Ganga";
    ctx.bind("plainname", bname);
    //This one throws an Naming Exception..
    ctx.rebind("one.two.three", bname);
    } catch(javax.naming.NameAlreadyBoundException nlb){
    System.out.print(nlb.getMessage());
    System.exit(0);
    }catch(javax.naming.directory.InvalidAttributesException iae){
    System.out.print(iae.getMessage());
    System.exit(0);
    }catch(NamingException ne){
    System.out.print(ne.getMessage());
    System.exit(0);
    Exception msg is : Unable to resolve 'one.two.three' Resolved: '' Unresolved:'one'

  • JNDI bind

    When I try to bind an Object to the JNDI tree in WebLogic (doesn't matter
    which version), if the class of this object is not part of the CLASSPATH, it
    throws an exception. But I tried the same exercise with JBoss, and it
    doesn't requires that the class should be part of JBoss CLASSPATH.
    My question is which implementation is right? (If there is a right or wrong
    answer here. But it seems that JBoss has the most reliable and flexible
    implementation... Any concerns of why WebLogic works the way it does?
    Thanks in advance,
    Marcelo.

    Don Ferguson wrote:
    >
    Is this from a Java client? If so, it sounds like JBoss may be network class
    loading the class from the client. That's pretty unlikely IMHO. Isn't it more likely that the JBoss SPI stores /
    serialises the object to be bound directly from the client rather than passing
    it to the server instance by RMI before storing it, as WLS does.
    I'm guessing that the poster hasn't tried looking the object up from within the
    JBoss server JVM - I think this would generate the same NoClassDef exception
    that WLS throws at bind time.
    This is flexible, as you say, but it is a
    security hole large enough to drive a truck through.
    Marcelo Caldas wrote:
    When I try to bind an Object to the JNDI tree in WebLogic (doesn't matter
    which version), if the class of this object is not part of the CLASSPATH, it
    throws an exception. But I tried the same exercise with JBoss, and it
    doesn't requires that the class should be part of JBoss CLASSPATH.
    My question is which implementation is right? (If there is a right or wrong
    answer here. But it seems that JBoss has the most reliable and flexible
    implementation... Any concerns of why WebLogic works the way it does?
    Thanks in advance,
    Marcelo.

  • DataSource-class pool-JNDI-bind-lookup

    Hi,
    I am a beginner in this subject and it is confused. I read that
    the best way to use the connections is from a DataSource. There
    are 2 ways to configure it:
    1- From the data-source.xml file
    2- Or using InitialContext, Context and bind method from a java
    program loaded in the startup.
    If so, which one is better?
    On the other hand, there are some classes I can use, for
    instance:
    1- OracleConnectionCacheImpl
    2- OracleConnectionPoolDataSource
    etc.
    which one is better?
    Thank you very much for any comment.
    Andres.

    Hi:
    upon further research, i find that the data
    that was used in State class at binding does not change on any update,
    like via foll -
    State s = (State)ic.lookup(JNDINAME);
    s.addHashtableEntry (key, val); or
    s.setDesc ("new desc");
    next time i lookup State class the hashtable entry is missing and desc is
    old and not "new desc".
    any help appreciated.
    thanks
    rajans
    Rajan Sadasivan wrote:
    Hi:
    I am using jdk1.3, weblogic6.0
    I am binding a state class like ->
    public class State implements Serializable {
    private String desc;
    private Hashtable sessions;
    onto the JNDI tree. Binding is done like initialCxt.bind (name,
    _state);
    and state's sessions has one entry in it and state's desc is set.
    I then use another client to do _initialCxt.lookup (name) on same
    weblogic JVM.
    The _state object is returned with correct value of desc; but the
    sessions
    hashtable is empty and the single entry is gone. I do see also the the
    State's finialize () method is called.
    Can anyone explain why i am losing hashtable information ?
    How do I make this work in weblogic jndi with hashtable info ?
    thanks
    rajans

  • I can't figure out data binding from a web service.

    Hi,
    I've been trying to figure out how to connect a TreeTable control with data from a non-SAP web server. Here's what I have so far;
        I have a sample program that uses json in a variable called oData.
        I have a TreeTable control named oTable.
        I create a model;
            var oModel = new sap.ui.model.json.JSONModel();
        I feed the oData variable into it;
            oModel.setData(oData);
        Finally, I feed the oModel to the oTable;
            oTable.setModel(oModel);
    That all makes sense. What I want to do is get the data from a web service. The only examples I've been able to find show how to configure an SAP data service and then connect to that. They don't give any details of the format that the SAP data service is sending. I don't have access to an SAP system so I can't set one up to reverse-engineer the data. I'm going to be writting my own oData service for this so I need a couple of things;
        1. An example of json or xml data as it's sent from a web server.
        2. An example of how you pull that data from the web service to an SAP ui model.
    I could really use some help. I haven't been able to find any examples that make sense to me.

    Hi Joe
    Here is an small example. Maybe it is useful to you.
    In this example, I  bind the tree to /root and you can see that we have 0: 1: elements under each element recursively.
    Thanks
    -D

Maybe you are looking for

  • Doubt in BDC

    I have a doubt in BDC, They used a standard SAP program (RSBDCBTC_SUB and RFBIBL00) for upload the data for the transaction FBB1. they don’t want the particular record . They used a session method for upload the data. I know only the session name. ho

  • ITunes 10.4.1 not responding

    Beach ball appears as soon as I load up Itunes. I have tried re-starting, and force quitting but nothing seems to cure it. does anyone have any ideas on how to takle this problem

  • Query related to datasubsetting

    hi, How is datasubsetting helpful in olite applications? How and in which scenarios can it be used?? In my application I have various uses and each uses has access to particular processes, here will datasubsetting be helpful for me to give access to

  • Problem in periodic job scheduling in LBWE

    hi, i have activated the Material movements datasource 2LIS_03_BF. Filled up the set up table. now when i try to schedula a job in jobcontrol, under the tab *immediate* the immediate start check box is checked and disabled. the periodic job  check bo

  • Drag and drop parts of an image

    Is there a way to display an image (such as a scanned page) and then have areas that can be dragged and dropped? For instance, suppose the scanned page has some text fields. I would like some of text fields in the scanned form to have boxes around th