Javax.naming.NameNotFoundException: jms/QueueConnectionFactory not found

Hi,
I wrote a Java JMS client that connect to Oracle9iAs 9.0.2.1
using OC4J 9.0.3.
I got the error javax.naming.NameNotFoundException: jms/QueueConnectionFactory not found?
first I'm a bit confused about which rmi port to use to connect
to Oracle9ias, I found there is 7 ports open from 3101 to 3107?
How could I I know which port my OC4J_Home is using??
thanks
Ahmed

thanks for your help, I know now that i'm connecting to the right port, however, i'm still getting the error message
error javax.naming.NameNotFoundException: jms/QueueConnectionFactory not found?
note that i'm not getting such message on OC4J standalone.
I know that Oracle donestn't recommend the use of ligth
JMS only AQ, becouse light oracle JMS have some bugs,
is this one of the bugs?
any body have a idea what could be the probelm?
Ahmed

Similar Messages

  • Javax.naming.NameNotFoundException: buslogic.HRAppFacade not found, help!!!

    I have followed the tutorial on http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/ejb_30.htm to create my own EJB with Jdeveloper, but I got some errors. Please help.
    When I run the client, it gave out the following errors:
    javax.naming.NameNotFoundException: buslogic.HRAppFacade not found
         at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at client.HRAppFacadeClient.main(HRAppFacadeClient.java:15)
    Process exited with exit code 0.
    I have created the entity and facade (with interface), but the client couldn't lookup the facade, giving out the above error. How to solve the problm? Thanks.
    The following is my source code:
    Employees.java
    package buslogic.persistence;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    @Entity
    @NamedQueries({
    @NamedQuery(name = "Employees.findAll", query = "select o from Employees o"),
    @NamedQuery(name = "Employees.findEmployeeById", query = "select o from Employees o where o.empid = :empid")
    @Table(name = "\"employees\"")
    public class Employees implements Serializable {
    @Id
    @Column(name="empid")
    private int empid;
    @Column(name="name")
    private String name;
    @Column(name="phone")
    private int phone;
    public Employees() {
    public int getEmpid() {
    return empid;
    public void setEmpid(int empid) {
    this.empid = empid;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public int getPhone() {
    return phone;
    public void setPhone(int phone) {
    this.phone = phone;
    (HRAppFacadeBean.java)
    package buslogic;
    import buslogic.persistence.Employees;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(name="HRAppFacade")
    public class HRAppFacadeBean implements HRAppFacade, HRAppFacadeLocal {
    @PersistenceContext(unitName="EJB_Project")
    private EntityManager em;
    public HRAppFacadeBean() {
    public Object mergeEntity(Object entity) {
    return em.merge(entity);
    public Object persistEntity(Object entity) {
    em.persist(entity);
    return entity;
    /** <code>select o from Employees o</code> */
    public List<Employees> queryEmployeesFindAll() {
    return em.createNamedQuery("Employees.findAll").getResultList();
    /** <code>select o from Employees o where o.empid = :empid</code> */
    public Employees queryEmployeesFindEmployeeById(int empid) {
    return (Employees)em.createNamedQuery("Employees.findEmployeeById").setParameter("empid", empid).getSingleResult();
    public void removeEmployees(Employees employees) {
    employees = em.find(Employees.class, employees.getEmpid());
    em.remove(employees);
    (HRAppFacade.java)
    package buslogic;
    import buslogic.persistence.Employees;
    import java.util.List;
    import javax.ejb.Remote;
    @Remote
    public interface HRAppFacade {
    Object mergeEntity(Object entity);
    Object persistEntity(Object entity);
    List<Employees> queryEmployeesFindAll();
    Employees queryEmployeesFindEmployeeById(int empid);
    void removeEmployees(Employees employees);
    (HRAppFacadeLocal.java)
    package buslogic;
    import buslogic.persistence.Employees;
    import java.util.List;
    import javax.ejb.Local;
    @Local
    public interface HRAppFacadeLocal {
    Object mergeEntity(Object entity);
    Object persistEntity(Object entity);
    List<Employees> queryEmployeesFindAll();
    Employees queryEmployeesFindEmployeeById(int empid);
    void removeEmployees(Employees employees);
    }

    I hit the exact same error. In my case it was due to missing "@Id" line in Departments.java. I must have accidently deleted it when pasting in some code.
    (my clue was the errors I got when starting imbedded OC4J)
    This section of Departments.java should read as follows:
    public class Departments implements Serializable {
    @Id
    @GeneratedValue(strategy=SEQUENCE, generator="DEPARTMENTS_SEQ")
    @Column(name="DEPARTMENT_ID", nullable = false)
    After fixing this, I ran a "make" of "HRApp", restarted the embedded OC4J server (terminate it, then right click HRAppFacadeBean.java, and click Run).
    Then ran the application...

  • Javax.naming.NameNotFoundException, msg=SessionEJB not bound

    Hi everybody
    I am very new to jdeveloper and ejb3.0
    I tried to build a simpleapplication having ejb,jsf as a template in jdeveloper as per the example available here
    http://www.oracle.com/technology/obe/obe1013jdev/10131/ejb_and_jpa/master-detail_pagewith_ejb.htm
    I tried as per the example and deployed in to JBoss3.0.2 application server and try to access the jsf page and i am getting the exceptions like
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: javax.naming.NameNotFoundException, msg=SessionEJB not bound
         oracle.adf.model.adapter.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:178)
         oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:76)
         oracle.adf.model.BindingContext.get(BindingContext.java:457)
         oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:280)
         oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:248)
         oracle.adf.model.binding.DCUtil.findContextObject(DCUtil.java:383)
         oracle.adf.model.binding.DCIteratorBinding.<init>(DCIteratorBinding.java:127)
         oracle.jbo.uicli.binding.JUIteratorBinding.<init>(JUIteratorBinding.java:60)
         oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding.<init>(JUMethodIteratorDef.java:138)
         oracle.jbo.uicli.binding.JUMethodIteratorDef.createIterBinding(JUMethodIteratorDef.java:93)
         oracle.jbo.uicli.binding.JUMethodIteratorDef.createIterBinding(JUMethodIteratorDef.java:84)
         oracle.adf.model.binding.DCIteratorBindingDef.createExecutableBinding(DCIteratorBindingDef.java:277)
         oracle.adf.model.binding.DCBindingContainerDef.createExecutables(DCBindingContainerDef.java:296)
         oracle.adf.model.binding.DCBindingContainerDef.createBindingContainer(DCBindingContainerDef.java:425)
         oracle.adf.model.binding.DCBindingContainerReference.createBindingContainer(DCBindingContainerReference.java:54)
         oracle.adf.model.binding.DCBindingContainerReference.getBindingContainer(DCBindingContainerReference.java:44)
         oracle.adf.model.BindingContext.get(BindingContext.java:483)
         oracle.adf.model.BindingContext.findBindingContainer(BindingContext.java:313)
         oracle.adf.model.BindingContext.findBindingContainerByPath(BindingContext.java:633)
         oracle.adf.model.BindingRequestHandler.isPageViewable(BindingRequestHandler.java:265)
         oracle.adf.model.BindingRequestHandler.beginRequest(BindingRequestHandler.java:169)
         oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:161)
         org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
    In this JSF page i am accesing data from ejb
    Please help me to resolve this issue
    thanks
    shirdhi

    I don't think Tomcat is actually an EJB container:
    http://tomcat.apache.org/faq/misc.html#ejb

  • EJB javax.naming.NameNotFoundException:

    Hi,
    I have EJB deployed in JRUN. I am trying to run Client program. It is giving the following error
    javax.naming.NameNotFoundException: ejbT.test1Home not found
    at allaire.ejipt._NamingContext.lookup(_NamingContext.java:73)
    at allaire.ejipt._ClientContext.lookup(_ClientContext.java:113)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at ejbT.testClient.main(testClient.java:44)
    I checked <ejb-name> in ejb-jar.xml and jrun-ejb-jar.xml file .. they are the same.
    What can be the problem.
    Can some please help me.
    Thanks in advance.

    Does the JNDI name in your client match that of your EJB?

  • Javax.naming.NameNotFoundException in Jdeveloper 10g

    HI,
    I just migrate my source code from Jdeveloper 9 to Jdeveloper 10g. Since then, all my codes do not work properly.
    I cut and pasted from old version data-source.xml to 10g data-source.xml. However, when I run the project, I got javax.naming.NameNotFoundException:jdbc/mbciwebEjb not found. I check my data-souces.xml which in embeded-oc4j/config folder. The definition is there.
    Can anybody help me?
    Thanks

    ganesh wrote:
    using WLS 8.1:
    deployed all session beans in jar1
    deployed all entity beans in jar2
    session code trying to jndi lookup entity bean, using localhome interface.
    the entity bean descriptor has <local-jndi-name> tag specified
    but jndi lookup from session bean is failing, is this because session bean is in different jar.
    what is solution please
    javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: While trying to look up /app/ejb/ejbs2.jar#UserEntity/local-home in /app/ejb/ejbs1.jar#UserManagerBean.; remaining name '/app/ejb/ejbs2/jar#UserEntity/local-home'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
         at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:148)Are these two jar deployed in the same application or different
    applications?
    -- Prasad

  • Problem with ADF BC 11G and datasource : javax.naming.NameNotFoundException

    Hi,
    My application works with ADF BC 10G but does not work with ADF BC 11g. In both cases I use the same data source.
    My application uses only the BC4J from ADF.
    The setting of the datasource in my EAR is only in the web.xml and weblogic.xml, as in 10g version.
    What have I forgotten?
    Thanks.
    ## Detail 0 ##
    javax.naming.NameNotFoundException: DataSourceContext could not locate a DataSource for the name: jdbc/datasource
         at oracle.jbo.server.DataSourceContext.lookup(DataSourceContext.java:109)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1404)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)
    The setting is :
    web.xml
         <resource-ref>
              <description>JDBC connection</description>
              <res-ref-name>jdbc/datasource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
    weblogic.xml
    <weblogic-web-app>
         <description>Web Application</description>
         <weblogic-version></weblogic-version>
         <reference-descriptor>
              <resource-description>
                   <res-ref-name>jdbc/datasource</res-ref-name>
                   <jndi-name>jdbc/datasource</jndi-name>
              </resource-description>
         </reference-descriptor>
    </weblogic-web-app>
    this code finds the datasource :
    InitialContext initialContextForDatasource = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource) initialContextForDatasource.lookup("java:comp/env/jdbc/datasource");
    There is no error in the logs about data source
    Edited by: jdev user on Nov 24, 2010 11:16 AM
    Edited by: jdev user on Nov 25, 2010 10:59 AM

    A change in the problem :
    This code finds the datasource :
    InitialContext initialContextForDatasource = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource) initialContextForDatasource.lookup("java:comp/env/jdbc/datasource");
    There is no error in the log about data source :
    <BEA-001124> <Created Connection Pool named DS .>
    <BEA-001174> <Creating Data Source named DS , JNDI Name = jdbc/datasource.>
    <BEA-001512> <Data Source DS has been successfully created.>
    but the applicationModule don't find the data source :
    ## Detail 0 ##
    javax.naming.NameNotFoundException: DataSourceContext could not locate a DataSource for the name: jdbc/datasource
         at oracle.jbo.server.DataSourceContext.lookup(DataSourceContext.java:109)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1404)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:309)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
    Edited by: jdev user on Nov 25, 2010 1:40 PM

  • Javax.naming.NameNotFoundException: SessionEJBBean not found

    Please help I am getting error: javax.naming.NameNotFoundException: SessionEJBBean not found.
    I am using JDeveloper 10g as editor.
    The embedded server is running, SessionEJBBean is also there. I have restarted the computer, changed 'SessionEJB' from 'SessionEJBBean'. Yet No success. This is what I get.:
    javax.naming.NameNotFoundException: SessionEJBBean not found
    at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at friends.SessionEJBClient.main(SessionEJBClient.java:11)
    Process exited with exit code 0.
    SessionEJBClient.java
    package friends;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class SessionEJBClient {
    public static void main(String [] args) {
    try {
    final Context context = getInitialContext();
    SessionEJB sessionEJB = (SessionEJB)context.lookup("SessionEJBBean");
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    // Get InitialContext for Embedded OC4J
    // The embedded server must be running for lookups to succeed.
    return new InitialContext();
    }Thank you.

    Thanks Karma-9 for your reply. My issue has got resolved as I followed this link:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/ejb_30.htm
    However I have now new problem in hand, when I am trying to insert data in database
    using JSP. I am having problem with request.getParameter(). It is not
    recognised by JSP. A red underline is being shown below
    request.getParameter(). One more thing, in JSP page, if I take cursor over
    'request' in request.getParameter, it shows, 'Name request not found'. When
    I take cursor over 'getParameter' in request.getParameter, it shows, 'Method
    getParameter (java.lang.String) not found in<unknown>'.
    This is my code:
    MyPage.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.sql.*, javax.naming.Context,
    javax.naming.InitialContext, javax.naming.NamingException,
    friendspackage.*, java.text.*, java.util.*"%>
    <%!
    public void jspInit () {
    String name, city;
    name = request.getParameter("name");
    city = request.getParameter("city");
    try {
    final Context context = getInitialContext();
    SessionFriends sessionFriends =
    (SessionFriends)context.lookup("SessionFriends");
    sessionFriends.addFriends("name","city");
    //System.out.println( "Success" );
    } catch (Exception ex) {
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException {
    // Get InitialContext for Embedded OC4J
    // The embedded server must be running for lookups to succeed.
    return new InitialContext();
    %>MyPage.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=windows-1252"></meta>
    <title>My Friends</title>
    </head>
    <body>
    <form name="MyFriends" action="MyFriends.jsp" method="post">
    Name:
    <input type="text" name="name">
    City:
    <input type="text" name="city">
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>Please let me know if I have to make any changes in web.xml which is:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    </web-app>Thank you again.
    Anurag

  • Javax.naming.NameNotFoundException: UserBeanRef not found

    Can someone help me out ?
    I am still new using Sun Application Server provided with J2EE 1.4 SDK and accessing Oracle.
    I am getting "javax.naming.NameNotFoundException: UserBeanRef not found"
    This is taken from the ejb-jar.xml of my enterpise bean jar file
    <ejb-local-ref>
    <ejb-ref-name>UserBeanRef</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>LocalUserHome</local-home>
    <local>LocalUser</local>
    <ejb-link>UserBean</ejb-link>
    </ejb-local-ref>
    ... and this is the code I am using to invoke (trying actually) the bean
    InitialContext ic = new InitialContext();
    Object o = ic.lookup("UserBeanRef");
    LocalUserHome home = (LocalUserHome) o;
    user = home.findByPrimaryKey(username);
    I can't understand what's wrong with this ?? any suggestions please

    use the following code for the lookup:
    Object o = ic.lookup("java:comp/env/UserBeanRef");

  • Javax.naming.NameNotFoundException: java:comp/UserTransaction not found

    Hi,
    trying to obtain UserTransaction from client:
    UserTransaction t = (UserTransaction)context.lookup("java:comp/UserTransaction");
    but I get this error:
    javax.naming.NameNotFoundException: java:comp/UserTransaction not found
         at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
    Any help?

    The problem has been resolved. It was a usage-related issue. Thank you all.

  • Javax.naming.NameNotFoundException: Bean not found

    HI,
    we are getting javax.naming.NameNotFoundException: Bean not found exception often, it is not so frequent but it is consistent
    javax.naming.NameNotFoundException: Bean not found
         at com.evermind.server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)
         at com.evermind.server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:256)
         at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:196)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.xxxxx.yyyyy.framework.jndi.EJBLocator.lookup(Unknown Source)
         at com.xxxxx.yyyyy.managed.MBean.releaseAllLocks(Unknown Source)
         at com.xxxxx.yyyyy.managed.MenuBean.clearAllEnqueue(Unknown Source)
         at com.xxxxx.yyyyy.managed.MenuBean.resources(Unknown Source)
         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 com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:95)
         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
         at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
         at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
         at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
         at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at com.xxxxx.yyyyy.filter.DWRLoginFilter.doFilter(Unknown Source)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
         at com.xxxxx.wtf.yyyyy.yyyyy.doFilter(WssoLiteLogonFilter.java:260)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    any help is highly appreciated

    Hi.
    Do you use remote invocation in same application or EJB module? Look [http://forums.sun.com/thread.jspa?threadID=5405443] - some notes about bean referencing

  • Javax.naming.NameNotFoundException: java:comp/EJBContext not found

    I get the following exception when I hit my login page:
    javax.naming.NameNotFoundException: java:comp/EJBContext not found
    at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:60)
    at com.evermind.naming.FilterContext.lookup(FilterContext.java:126)
    at com.evermind.server.ApplicationClientContext.lookup(ApplicationClientContext.java:63)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.jboss.seam.util.EJB.getEJBContext(EJB.java:115)
    at org.jboss.seam.util.Transactions.isEJBCTransactionActiveOrMarkedRollback(Transactions.jav
    a:111)
    at org.jboss.seam.util.Transactions.isTransactionActiveOrMarkedRollback(Transactions.java:54
    at org.jboss.seam.web.ExceptionFilter.rollbackTransactionIfNecessary(ExceptionFilter.java:12
    8)
    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
    at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
    at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:61
    7)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatche
    r.java:368)
    at com.evermind.server.http.HttpRequestHandler.doDispatchRequest(HttpRequestHandler.java:889
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:797)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:607)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:376)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:161)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:142)
    at oracle.oc4j.network.ServerSocketReadHandler$ClientRunnable.run(ServerSocketReadHandler.ja
    va:275)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    I'm using JBoss Seam as my web framework, and the Seam container is starting up successfully after deploying my WAR file. I get this stacktrace when I hit my first page.
    I googled "java:comp/EJBContext" and it looks like it's a standard EJB3 resource which should be available. Any ideas?

    I figured out how to get JBoss Seam working with OC4J 11 and wrote it up here:
    http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamOC4J11g
    By the way, the solution to this particular problem was I didn't need to have any content in my jndi.properties at all, and I was trying to use java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory (or com.evermind.server.rmi.RMIInitialContextFactory).

  • Struts javax.naming.NameNotFoundException: name not found

    Hi.
    I'm developing a my first struts web application an I'm getting: javax.naming.NameNotFoundException: control_seguros not found
    This is my META -INF/context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/control_seguros">
    <Resource auth="Container" driverClassName="org.postgresql.Driver" name="jdbc/control_seguros" password="seguros" type="javax.sql.DataSource" url="jdbc:postgresql://localhost/control_seguros" username="seguros"/>
    </Context>
    web.xml
    <resource-ref>
    <description>Conexión Base de Datos</description>
    <res-ref-name>jdbc/control_seguros</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    action code
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    // Look up our data source
    DataSource ds = (DataSource) envCtx.lookup("jdbc/control_seguros");
    // Allocate and use a connection from the pool
    Connection conn = ds.getConnection();
    conn.close();
    How can i solve this? I'm using Glassfish v3 prelude. One more thing: i'm not sure if it's relevant, but i create meta-inf folder and content.xml manually. I'd like to know how the application determinates that the database connection settings are in this xml.

    1. To use local interfaces in Glassfish your client & bean must be in same EAR or EJB module.
    2. @Sateless(name=) it's only the name of bean and in fact the bean interface is stored under different name then processPayment, it can be something like
    packege.className.
    3. I assume that you can't use EJB annotation is servlet.
    4. If indeed you need to use lookup, you need perform following steps (only in Glassfish context).
    a) if you are in same EAR as servlet use in web.xml resource ref like in following eg.
        <ejb-local-ref>
            <ejb-ref-name>Custom name, this name you will use in WAR</ejb-ref-name> <!---->
            <ejb-ref-type>Session</ejb-ref-type>
            <local-home/> <!-- Beans are homeles ->
            <local>eu.softper.aleksandra.ewidencje.book.BookLocal</local> <!-- Your's bean local interface -->
            <ejb-link>Your bean name - here</ejb-link>
        </ejb-local-ref>b)if outside EAR you need to use server specific deployment, if server allows to pass local ref outside application. Glassfish does not.

  • Javax.naming.NameNotFoundException: CartBean not found

    I follow step by step the example from the tutorial chapter 25 " Session Bean Examples" and I get "javax.naming.NameNotFoundException: CartBean not found ....." after I run "appclient -client CartAppClient.jar" from my window terminal.
    I built the application and the client correctly What do I get this error?
    Thanks

    I am also having the same problem, using SJS AppServer 8.1. I followed all the instruction from the tutorial but got the following after running the client:
    ========================================================
    Caught an unexpected exception!
    javax.naming.NameNotFoundException: CartBean not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:185)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:157)
    at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:101)
    at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    ========================================================
    Does anyone know why the CartBean could not be found after setting the JNDI name and the EJB ref for the Client?
    Thanks and regards.

  • Failed:javax.naming.NameNotFoundException: QueueConnectionFactory

    hi all
    I have the problem how to solve this problem? when i was lookup through jndiname it was error but i declared it in a descriptor.
    Error :
    init:
    deps-jar:
    compile-single:
    run-single:
    Jndi lookup failed:javax.naming.NameNotFoundException: QueueConnectionFactory not found
    Java Result: 1
    BUILD SUCCESSFUL (total time: 4 seconds)
    Here is the code...
    That is Main....
    public static void main(String[] args) {
    Context jndiContext = null;
    ConnectionFactory connectionfactory = null;
    Connection connection = null;
    Session session = null;
    Destination destination = null;
    MessageProducer messageProducer = null;
    TextMessage message = null;
    final int NUM_MSGS = 3;
    try{
    jndiContext = new InitialContext();
    }catch(NamingException ex){
    System.err.println("Could not Create JNDI.");
    System.exit(1);
    try
    connectionfactory = (ConnectionFactory)jndiContext.lookup("jms/QueueConnectionFactory");
    destination = (Queue)jndiContext.lookup("jms/SimpleMessageBean");
    }catch(NamingException e){
    System.err.println("Jndi lookup failed:" + e.toString());
    System.exit(1);
    try{
    connection = connectionfactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    messageProducer = session.createProducer(destination);
    message = session.createTextMessage();
    for(int i=0; i < NUM_MSGS; i++){
    message.setText("This is a message " + (i+1));
    System.out.println("Sending message " + message.getText());
    messageProducer.send(message);
    }catch(javax.jms.JMSException e){
    System.err.println("Exception occured: " + e.toString());
    }finally
    if(connection == null){
    try{
    connection.close();
    }catch(JMSException e){                    
    System.exit(0);
    In Message Bean....
    @MessageDriven(activationConfig = {
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
    @ActivationConfigProperty(propertyName = "connectionFactoryJndiName", propertyValue="jms/QueueConnectionFactory")
    public class SimpleMessage implements MessageListener {
    public static final Logger logger = Logger.getLogger("SimpleMessage");
    /** Creates a new instance of SimpleMessage */
    public SimpleMessage() {
    public void onMessage(Message message){
    TextMessage msg = null;
    try{
    if(message instanceof TextMessage)
    msg = (TextMessage)message;
    logger.info("Message Bean: Message Received:" + msg.toString());
    }else{
    logger.warning("Wrong Type:" + msg.getClass().getName());
    }catch(Throwable te){
    te.printStackTrace();
    In descriptor...
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <name>SimpleMessage</name>
    <ejb>
    <ejb-name>SimpleMessage</ejb-name>
    <mdb-connection-factory>
    <jndi-name>jms/QueueConnectionFactory</jndi-name>
    </mdb-connection-factory>
    </ejb>
    <cmp-resource>
    <jndi-name>jms/SimpleMessage</jndi-name>
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    Thank you for reply..
    Chris

    Connection Factories and Queues are global resources that must be created through either
    the admin console or the asadmin CLI command. Those global resources are then referred to
    by your application code. Please see the JMS portion of the Java EE 5 tutorial :
    http://java.sun.com/javaee/5/docs/tutorial/doc/
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Javax.naming.NameNotFoundException for foreign JMS Connection factory

    I have a foreign jms server configured and when I try and test it I get a Name not found exception.
              javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms]; remaining name 'SSLQueueConnectionFactory'
              The config.xml looks ok
              <ForeignJMSServer
              ConnectionURL="ssl://eaid1-jms.ges.symantec.com:7243"
              JNDIProperties="" Name="JMS Proxy Dev" Targets="TeamWorksServer">
              <ForeignJMSConnectionFactory
              LocalJNDIName="jms.SSLQueueConnectionFactory"
              Name="MyForeign JMS Connection Factory"
              PasswordEncrypted="{3DES}Es94ikW1TZzBFyDp+3/gktRtDaHWI6j/"
              RemoteJNDIName="SSLQueueConnectionFactory" Username="weblogicUser"/>
              <ForeignJMSDestination LocalJNDIName="jms.WEBLOGIC.TEST.QUEUE"
              Name="MyForeign JMS Destination" RemoteJNDIName="WEBLOGIC.TEST.QUEUE"/>
              </ForeignJMSServer>
              The code i took from the QueueSend example
              package com.symantec.utils.jms;
              import java.io.BufferedReader;
              import java.io.IOException;
              import java.io.InputStreamReader;
              import java.util.Hashtable;
              import javax.jms.*;
              import javax.naming.Context;
              import javax.naming.InitialContext;
              import javax.naming.NamingException;
              /** This example shows how to establish a connection
              * and send messages to the JMS queue. The classes in this
              * package operate on the same JMS queue. Run the classes together to
              * witness messages being sent and received, and to browse the queue
              * for messages. The class is used to send messages to the queue.
              * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
              public class QueueSend
              // Defines the JNDI context factory.
              public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
              // Defines the JMS context factory.
              public final static String JMS_FACTORY="jms.SSLQueueConnectionFactory";
              // Defines the queue.
              public final static String QUEUE="WEBLOGIC.TEST.QUEUE";
              private QueueConnectionFactory qconFactory;
              private QueueConnection qcon;
              private QueueSession qsession;
              private QueueSender qsender;
              private Queue queue;
              private TextMessage msg;
              * Creates all the necessary objects for sending
              * messages to a JMS queue.
              * @param ctx JNDI initial context
              * @param queueName name of queue
              * @exception NamingException if operation cannot be performed
              * @exception JMSException if JMS fails to initialize due to internal error
              public void init(Context ctx, String queueName)
              throws NamingException, JMSException
              qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup(queueName);
              qsender = qsession.createSender(queue);
              msg = qsession.createTextMessage();
              qcon.start();
              * Sends a message to a JMS queue.
              * @param message message to be sent
              * @exception JMSException if JMS fails to send message due to internal error
              public void send(String message) throws JMSException {
              msg.setText(message);
              qsender.send(msg);
              * Closes JMS objects.
              * @exception JMSException if JMS fails to close objects due to internal error
              public void close() throws JMSException {
              qsender.close();
              qsession.close();
              qcon.close();
              private static void readAndSend(QueueSend qs)throws IOException, JMSException
                   BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
              String line=null;
              boolean quitNow = false;
              do {
              System.out.print("Enter message (\"quit\" to quit): \n");
              line = msgStream.readLine();
              if (line != null && line.trim().length() != 0) {
              qs.send(line);
              System.out.println("JMS Message Sent: "+line+"\n");
              quitNow = line.equalsIgnoreCase("quit");
              } while (! quitNow);
              private static InitialContext getInitialContext(String url)
              throws NamingException
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
              env.put(Context.PROVIDER_URL, url);
              return new InitialContext(env);
              /** main() method.
              * @param args WebLogic Server URL
              * @exception Exception if operation fails
              public static void main(String[] args) throws Exception
              InitialContext ic = getInitialContext("t3://tus1bpmappdin01.ges.symantec.com:7501");
              QueueSend qs = new QueueSend();
              qs.init(ic, QUEUE);
              readAndSend(qs);
              qs.close();
              Any suggestions would be appreciated
              Regards

    I have a foreign jms server configured and when I try and test it I get a Name not found exception.
              javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms]; remaining name 'SSLQueueConnectionFactory'
              The config.xml looks ok
              <ForeignJMSServer
              ConnectionURL="ssl://eaid1-jms.ges.symantec.com:7243"
              JNDIProperties="" Name="JMS Proxy Dev" Targets="TeamWorksServer">
              <ForeignJMSConnectionFactory
              LocalJNDIName="jms.SSLQueueConnectionFactory"
              Name="MyForeign JMS Connection Factory"
              PasswordEncrypted="{3DES}Es94ikW1TZzBFyDp+3/gktRtDaHWI6j/"
              RemoteJNDIName="SSLQueueConnectionFactory" Username="weblogicUser"/>
              <ForeignJMSDestination LocalJNDIName="jms.WEBLOGIC.TEST.QUEUE"
              Name="MyForeign JMS Destination" RemoteJNDIName="WEBLOGIC.TEST.QUEUE"/>
              </ForeignJMSServer>
              The code i took from the QueueSend example
              package com.symantec.utils.jms;
              import java.io.BufferedReader;
              import java.io.IOException;
              import java.io.InputStreamReader;
              import java.util.Hashtable;
              import javax.jms.*;
              import javax.naming.Context;
              import javax.naming.InitialContext;
              import javax.naming.NamingException;
              /** This example shows how to establish a connection
              * and send messages to the JMS queue. The classes in this
              * package operate on the same JMS queue. Run the classes together to
              * witness messages being sent and received, and to browse the queue
              * for messages. The class is used to send messages to the queue.
              * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
              public class QueueSend
              // Defines the JNDI context factory.
              public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
              // Defines the JMS context factory.
              public final static String JMS_FACTORY="jms.SSLQueueConnectionFactory";
              // Defines the queue.
              public final static String QUEUE="WEBLOGIC.TEST.QUEUE";
              private QueueConnectionFactory qconFactory;
              private QueueConnection qcon;
              private QueueSession qsession;
              private QueueSender qsender;
              private Queue queue;
              private TextMessage msg;
              * Creates all the necessary objects for sending
              * messages to a JMS queue.
              * @param ctx JNDI initial context
              * @param queueName name of queue
              * @exception NamingException if operation cannot be performed
              * @exception JMSException if JMS fails to initialize due to internal error
              public void init(Context ctx, String queueName)
              throws NamingException, JMSException
              qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup(queueName);
              qsender = qsession.createSender(queue);
              msg = qsession.createTextMessage();
              qcon.start();
              * Sends a message to a JMS queue.
              * @param message message to be sent
              * @exception JMSException if JMS fails to send message due to internal error
              public void send(String message) throws JMSException {
              msg.setText(message);
              qsender.send(msg);
              * Closes JMS objects.
              * @exception JMSException if JMS fails to close objects due to internal error
              public void close() throws JMSException {
              qsender.close();
              qsession.close();
              qcon.close();
              private static void readAndSend(QueueSend qs)throws IOException, JMSException
                   BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
              String line=null;
              boolean quitNow = false;
              do {
              System.out.print("Enter message (\"quit\" to quit): \n");
              line = msgStream.readLine();
              if (line != null && line.trim().length() != 0) {
              qs.send(line);
              System.out.println("JMS Message Sent: "+line+"\n");
              quitNow = line.equalsIgnoreCase("quit");
              } while (! quitNow);
              private static InitialContext getInitialContext(String url)
              throws NamingException
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
              env.put(Context.PROVIDER_URL, url);
              return new InitialContext(env);
              /** main() method.
              * @param args WebLogic Server URL
              * @exception Exception if operation fails
              public static void main(String[] args) throws Exception
              InitialContext ic = getInitialContext("t3://tus1bpmappdin01.ges.symantec.com:7501");
              QueueSend qs = new QueueSend();
              qs.init(ic, QUEUE);
              readAndSend(qs);
              qs.close();
              Any suggestions would be appreciated
              Regards

Maybe you are looking for

  • Custom class for GRC provisioning framework 2 on IDM 7.2

    Hello, I am currently trying to modify the GRC provisioning framework validation workflow in order to validate privileges on roles rather than each privilege individualy. After reading through the code, I tried to create a class which would extract t

  • Solaris 10 on a T2000 - no GUI

    Hi, I try to install Solaris 11/06 on a T2000, but the installer runs in text-modus. Also after the install I only have console, no GUI. In this document (http://docs-pdf.sun.com/817-0544/817-0544.pdf) they say you need at least 384 MB, but I have 32

  • DocPrintJob + Book + Landscape ????

    Hi!!! I have an application that needs to manipulate events from de printer job. Then I'm using DocPrintJob for this. But I'm in trouble, because I need to print many pages (depending on the user's choice) in landscape. My code seems like this: DocFl

  • Time Machine deleting backups, says disk is full when there's lots of space

    I recently successfully duplicated the sparse disk image bundles for two computers to a 1TB drive. Time Machine has been working just fine for weeks with this new setup and was backing up normally. Then I began getting "Disk is full" errors and Time

  • Superdrive is not working

    Hi, I did not expect that to happen from my Powerbook especially now that I have a deadline for tommorow to catch. My syperdive was normally working until yesterday night. Now it won't import any cd's/dvd's. It does not try either (i.e. I can hear no