OC4J Configuration - javax.naming.NameNotFoundException

Here is a description of the problem we are having:
The Problem
     We have a remote client that wishes to invoke services
that we are
going to provide. These services will be accessible via a JNDI
lookup from
the client's JVM. The client, is operating in a JRE, version
1.2.2, but is
an in-house Java Server Engine (developed before the Servlet API
specification) and not a command line client application. It is
desirable to
do a simple JNDI lookup from the RMIInitialContext and gain
access to the
services (Home Interface). Attached is a demonstration of a
client
application doing a lookup against the deployment shown below
(orion-ejb-jar.xml ). Notice the name of the service in the
lookup on the
client application are exactly the same as the location
declaration of the
session deployment element of the orion-ejb-jar.xml. The service
(EJB, not
attached) was deployed without any errors. The exception we are
getting is:
Exception in thread "main" javax.naming.NameNotFoundException:
DAServicesDemo not found
at com.evermind.server.rmi.RMIContext.lookup
(RMIContext.java:121)
at javax.naming.InitialContext.lookup
(InitialContext.java:350)
at test.RemoteServiceClient.main
(RemoteServiceClient.java:26)
     The RMI server has been configured with the default
settings, and is
listening on port 8474
The Source
package test;
import ORG.oclc.da.beans.*;
import javax.naming.*;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
public class RemoteServiceClient
     public static void main(String[] args)
     throws NamingException, CreateException,
RemoteException,
Exception{
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"com.evermind.server.rmi.RMIInitialContextFactory");
h.put
(Context.PROVIDER_URL, "ormi://risc14.dev.oclc.org:8474");
InitialContext context = new InitialContext(h);
DAServicesDemoHome remoteServiceHome =
(DAServicesDemoHome) (new
InitialContext(h)).lookup("DAServicesDemo");
DAServicesDemo remoteService =
(DAServicesDemo)remoteServiceHome.create();
System.out.println("Here it is: " +
remoteService.getContentGroup());
C_DemoServices remoteService = new C_DemoServices();
String result = remoteService.getContentGroup();
System.out.println("This is the result form the remote
service: " +
result);
EJB-jar.xml
<ejb-jar>
<description>
Proof of concept application for the integration of DA to
CORC
</description>
<display-name>Digital Archive Remote Services</display-name>
<enterprise-beans>
<session>
<ejb-name>DAServicesDemo</ejb-name>
<home>ORG.oclc.da.beans.DAServicesDemoHome</home>
<remote>ORG.oclc.da.beans.DAServicesDemo</remote>
<ejb-class>ORG.oclc.da.beans.DAServicesDemoBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>DAServicesDemo</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Orion-ejb.jar
<orion-ejb-jar deployment-version="1.0.2.2" deployment-
time="ea2215b915">
     <enterprise-beans>
          <session-deployment name="DAServicesDemo"
location="DAServicesDemo"
wrapper="DAServicesDemoHome_StatelessSessionHomeWrapper1"
timeout="1800"
persistence-filename="DAServicesDemo" />
     </enterprise-beans>
     <assembly-descriptor>
          <default-method-access>
               <security-role-mapping
name="&lt;default-ejb-caller-role&gt;" impliesAll="true" />
          </default-method-access>
     </assembly-descriptor>
</orion-ejb-jar>
Any help would be greatly appreciated, thanks in advanced...

Hi Jonathan,
If I understand you correctly, you are trying to access an EJB in
OC4J from a separate, external JVM. If that is correct, then, in
order to achieve that, the (EJB) home interface "stub" class must
be located in the client's JVM. Unfortunately, I haven't figured
out how to do that, and therefore, as far as I can see, the only
two client options available are:
1. Web-based client -- servlet or JSP
2. Application client -- standalone java application.
However, for both options, the client must also be deployed to
OC4J. I don't know how to obtain "stub" classes generated by OC4J
so that I can give external clients access to them.
According to the J2EE spec, application clients need to be run
within containers, too -- albeit thin containers. I presume that
means you need 2 instances of OC4J running -- one for the server
and one for the client. Seems a bit "heavy" to me, so for now I'm
going with the web-based (servlet) client and having external
java classes communicate with the servlet.
Hope this has been of assistance to you,
Avi.

Similar Messages

  • Javax.nameing.NameNotFoundException when connection to Standalone OC4J

    I have installed a standalone OC4J 10.1.3 for a testing purposes.
    It is an out-of-the-zip-file installation, so I have not configured anything except for the administrator password.
    I can start/stop the serveren and access the Oracle Enterprise Manager from both the local server and remote PC's. I can browse the instance as expected and everything seems to work.
    When creating a testing a connection from JDeveloper on a remote PC I receive the following exception:
    Error while getting remote MBeanServer for url: ormi://<the correct server name>:23791/default
    Error reading application-client descriptor: Error communication with server oc4j:internal/ResourceFinder not found; nested exception is:
    javax.nameing.NameNotFoundException: oc4j:internal/ResourceFinder not found
    -- Regards Flemming

    I have installed a standalone OC4J 10.1.3 for a testing purposes.
    It is an out-of-the-zip-file installation, so I have not configured anything except for the administrator password.
    I can start/stop the serveren and access the Oracle Enterprise Manager from both the local server and remote PC's. I can browse the instance as expected and everything seems to work.
    When creating a testing a connection from JDeveloper on a remote PC I receive the following exception:
    Error while getting remote MBeanServer for url: ormi://<the correct server name>:23791/default
    Error reading application-client descriptor: Error communication with server oc4j:internal/ResourceFinder not found; nested exception is:
    javax.nameing.NameNotFoundException: oc4j:internal/ResourceFinder not found
    -- Regards Flemming

  • JNDI lookup from OC4J to weblogic throws javax.naming.NameNotFoundException

    Hi All,
    We have the below setup in our production environment.
    EJB application is deployed in the Weblogic 10.3.4.0 Server on Sun Solaris. The EJB version is 3.0
    OC4J 10.2.0 is running on another Sun Solaris machine.
    There are 2 webservice applications WEBSERV1 & TestSoapEJB running on this OC4J container.
    We need to do lookup the EJBs deployed on the Weblogic server. For this we used the below logic in the web service's Stateless session bean:
    String weblogicURL = "";
    Properties props = new Properties();
    try
    props.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("wl.properties"));
    weblogicURL     = props.getProperty("weblogicURL");     
    catch (FileNotFoundException e)
    e.printStackTrace();
    catch (IOException e)
    e.printStackTrace();
    Context ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.SECURITY_PRINCIPAL,"weblogic");
    ht.put(Context.SECURITY_CREDENTIALS,"weblogic654");
    ht.put(Context.PROVIDER_URL, weblogicURL);
    ctx = NamingManager.getInitialContext(ht) ;
    // tried using //ctx = new InitialContext(ht); same behavior.
    TestEJB.AdministratorEJB ejb = (TestEJB.AdministratorEJB) ctx.lookup("TestEJB#TestEJB.AdministratorEJB");
    ctx.close();
    When we first test first WEBSER1, the lookup is fine.
    But when we test the second webservice WEBSER2, the webservice name itself not able to lookup: It gives the below error:
    javax.naming.NameNotFoundException: remaining name: env/TestSoapEJB
    Below is the stack throws thrown on browser:
    500 Internal Server Error
    javax.naming.NameNotFoundException: remaining name: env/TestSoapEJB     
    at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)     
    at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)     
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)     
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:59)     
    at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:64)     
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)     
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)     
    at javax.naming.InitialContext.lookup(InitialContext.java:392)     
    at oracle.j2ee.ws.SessionBeanRpcWebService.init(SessionBeanRpcWebService.java:65)     
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.loadServlet(HttpApplication.java:2354)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.findServlet(HttpApplication.java:4795)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2821)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:680)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     
    at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     
    at java.lang.Thread.run(Thread.java:662)
    It seems that, the OC4J is looking in Weblogic context. But it should be looking in its own context. How to resolve this issue.
    The same case happens if i restart the OC4J and first test the TestSoapEJB the lookup is fine . But if i test the WEBSERV1 , it throws the same error as above. In short, if one of the webservices lookup is working fine, the other webservice is not working. At the same time only one webservice's lookup is working.
    Kindly help me to resolve this issue.
    regards,
    Zia
    Edited by: PT Expert on Sep 9, 2012 3:16 AM

    I work now more that two days on this error!!!
    -> I remade my complete jdev project, it did not work!
    -> I deleted the jdev/system/j2ee/oc4j/workspace dir
    -> I search for some .lock files
    -> and many more tries!!! But without success...
    Is there a way to reset the Embedded OC4J?

  • Javax.naming.NameNotFoundException: error in whil calling EJB Bean

    Dear friends,
    I have created (Bean Managed Entity) a remote,home and bean objects for adding a country in a database. When i convert
    into jar and and deploy means, its working fine. But if i put into a package means it does work
    and raise "javax.naming.NameNotFoundException" error.
    i keep my files as following folder structure
    d:\siva\projects\ShopCart\
    (under this )
    CountryMas.java
    CountryHome.java
    CountryBean.java
    CountryMasPK.java
    <meta-inf>
    ejb-jar.xml
    weblogic-ejb-jar.xml
    and deployed in weblogic 6.1 using console.
    i have copied the source code here with
    Remote interface
    package ShopCart;
    import javax.ejb.*;
    import javax.rmi.*;
    public interface CountryMas extends EJBObject {
    Home Interface
    package ShopCart;
    import javax.ejb.*;
    import java.rmi.*;
    public interface CountryHome extends EJBHome {
         public CountryMas create(String Cname) throws CreateException,RemoteException;
         public CountryMas findByPrimaryKey(CountryMasPK pk) throws      
    FinderException,RemoteException;
    BEAN OBJECT
    package ShopCart;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.sql.*;
    import javax.ejb.*;
    import javax.naming.*;
    public class CountryBean implements EntityBean {
         private EntityContext ctx;
         private int CountryId;
         private String CountryName;
         public void setEntityContext(EntityContext ctx){
              this.ctx = ctx;
         public void unsetEntityContext(){
              this.ctx = null;
         public void ejbActivate(){
         public void ejbPassivate(){
         public void ejbLoad(){
         public void ejbStore(){
         public void ejbRemove(){
              Connection con = null;
              PreparedStatement ps = null ;
              try {
                   con = getConnection();
                   ps = con.prepareStatement("Delete from CountryMas where id=?");
                   ps.setInt(1,CountryId);
                   if (ps.executeUpdate() !=1) {
                        String Error = "JDBC did not create any row";
                        throw new CreateException (Error);
              }catch (Exception e){
                   System.out.println (e);
         public CountryMasPK ejbCreate(String Cname) throws CreateException {
              this.CountryName =Cname;
              Connection con = null;
              PreparedStatement ps = null ;
              try {
                   con = getConnection();
                   ps = con.prepareStatement("insert into CountryMas values(?)");
                   ps.setString (1,CountryName);
                   if (ps.executeUpdate() !=1) {
                        String Error = "JDBC did not delete any row";
                        throw new CreateException (Error);
                   con.commit();
              }catch (Exception e){
                   System.out.println (e);
              int PKid=0;
              ResultSet rs;
              PreparedStatement ps1 = null;
              try {
                   ps1 = con.prepareStatement("select max(id) as Mid from CountryMas");
                   rs = ps1.executeQuery();
                   PKid = rs.getInt("mid");
              }catch(Exception e){
                   System.out.println (e);
              return new CountryMasPK(PKid);
         public void ejbPostCreate(String Cname) throws CreateException {
         private Connection getConnection()throws SQLException {
              InitialContext initCtx = null;
              DataSource ds = null;
              try{
                   initCtx = new InitialContext ();
                   ds = (javax.sql.DataSource)
                        initCtx.lookup("java:comp/env/jdbc/ShopCartPool");
              }catch(Exception e){
                   System.out.println(e);
              return ds.getConnection();           
         public CountryMasPK ejbFindByPrimaryKey(CountryMasPK pk)throws ObjectNotFoundException {
              Connection con= null;
              PreparedStatement ps = null ;
              try{
                   con = getConnection();
                   ps = con.prepareStatement("select cname from CountryMas where id=?");
                   ps.setInt(1,pk.ID);
                   ps.executeQuery();
                   ResultSet rs= ps.getResultSet();
                   if (rs.next()){
                        this.CountryName = rs.getString(1);
              }catch(Exception e){
                   System.out.println(e);
              //return new CountryMasPK(pk.i);
              return pk;
    PRIMARY KEY OBJECT
    package ShopCart;
    import java.io.Serializable;
    public class CountryMasPK implements java.io.Serializable {
         public int ID;
         public CountryMasPK(int ID){
              this.ID =ID;
         public CountryMasPK(){
         public CountryMasPK(CountryMasPK pk){
                   this.ID = pk.ID;
         public String toString(){
                   return new Integer(ID).toString();
         public int hashCode(){
              return new Integer(ID).hashCode();
         public boolean equals(Object countrymas){
              //return ((CountryMasPK)countrymas).ID.equals(ID);
              return true;
    EJB-JAR.XML
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC
    '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
    'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>ShopCart</ejb-name>
    <home>ShopCart.CountryHome</home>
    <remote>ShopCart.CountryMas</remote>
    <ejb-class>ShopCart.CountryBean</ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class>ShopCart.CountryMasPK</prim-key-class>
    <reentrant>False</reentrant>
    <resource-ref>
    <res-ref-name>jdbc/ShopCartPool</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>ShopCart</ejb-name>
         <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    WEBLOGIC-EJB-JAR.XML
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>ShopCart</ejb-name>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/ShopCartPool</res-ref-name>
         <jndi-name>ShopCartDataSource</jndi-name>
    </resource-description>
    </reference-descriptor>
    <jndi-name>Country</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    i converted jar file like this
    d:\siva\projects\> set claapath=%classpath%;.;
    cd d:\siva\projects\ShopCart > javac *.java
    cd d:\siva\projects\ShopCart > jar -cvf Sh.jar *
    cd..
    d:\siva\projects> java weblogic.ejbc ShopCart\Sh.jar ShopCart\Shop.jar
    and deployed using weblogic 6.1 console
    and client code as follows
    Client.java
    import java.io.*;
    import javax.naming.*;
    import javax.ejb.*;
    import javax.rmi.*;
    import java.util.*;
    import ShopCart.*;
    class Client {
         public static void main(String args[]){
              Context ctx=null;
              try{
                   Properties pr = new Properties();
                   pr.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
                   pr.put(Context.PROVIDER_URL,"t3://localhost:7001");
                   ctx= new InitialContext(pr);
                   Object obj = ctx.lookup("Country");
                   CountryHome cm = (CountryHome)
    javax.rmi.PortableRemoteObject.narrow(obj,CountryHome.class);
                   cm.create(args[0]);
                   System.out.println ("Creating Country " + args[0] +" ..... [Done]");          
              }catch (Exception e){
                   System.out.println(e);
    when i run this file it raise the error
    D:\Siva\Projects>java Client.java
    Exception in thread "main" java.lang.NoClassDefFoundError: Client/java
    D:\Siva\Projects>java Client
    javax.naming.NameNotFoundException: Unable to resolve Country. Resolved: '' Unre
    solved:'Country' ; remaining name ''
    D:\Siva\Projects>
    This is the error message. Please observe it and do let me know what would be the error. There
    would be small configuration error. But i couldn't locate it . plz help me somebody.
    Thanx & Regards,
    Siva.

    you need to use the name java:comp/env/Country in the client.
    and the client deployment descriptor will need an ejb-ref entry:
    <ejb-ref>
      <ejb-ref-name>
        Country
      </ejb-ref-name>
      <ejb-ref-type>
        Session
      </ejb-ref-type>
      <home>
        ShopCart.CountryHome
      </home>
      <remote>
        ShopCart.CountryMas
      </remote>
    </ejb-ref>toby

  • Javax.naming.NameNotFoundException: Name java:comp is not bound in this Con

    Hi
    I have developed a search servlet and deployed it in tomcat 4.0.3 and connected to mysql database through jdbc by specifying jndi.
    I have coded JNDI lokkup name as "java:comp/env/jdbc/KgoogleDB"
    I have added a context in server.xml file of tomcat for DBCP connection pooling .I have tested this in windows and it is running well in it.
    But when i hosted this in linux i got error like this
    INIT OF SEARCH SERVLET
    Error in file reading Connection refused
    File Not Found
    javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    at javax.naming.InitialContext.lookup(InitialContext.java:354)
    at DbConnect.getConnection(DbConnect.java:35)
    at QueryDetails.Query(QueryDetails.java:32)
    at Search.doPost(Search.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446)
    at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
    at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
    at java.lang.Thread.run(Thread.java:536)
    Connection ID null
    Entered FINALLY
    =================================
    What would be the cause of this error?.Please help me.
    My server.xml context is
    - <Host className="org.apache.catalina.connector.warp.WarpHost" name="www.keralagoogle.com" debug="0" appBase="/domains/www.yy.com/tomcat/webapps" unpackWARs="true">
    - <Context path="/yyjava" docBase="/domains/www.yy.com/tomcat/webapps/yyjava" debug="0" reloadable="true" crossContext="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_KgoogleDB." suffix=".txt" timestamp="true" />
    <Resource name="jdbc/KgoogleDB" auth="Container" type="javax.sql.DataSource" />
    - <ResourceParams name="jdbc/KgoogleDB">
    - <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    - <!--
    Maximum number of dB connections in pool. Make sure you
              configure your mysqld max_connections large enough to handle
              all of your db connections. Set to 0 for no limit.
    -->
    - <parameter>
    <name>maxActive</name>
    <value>500</value>
    </parameter>
    - <!--
    Maximum number of idle dB connections to retain in pool.
              Set to 0 for no limit.
    -->
    - <parameter>
    <name>maxIdle</name>
    <value>300</value>
    </parameter>
    - <!--
    Maximum time to wait for a dB connection to become available
              in ms, in this example 10 seconds. An Exception is thrown if
              this timeout is exceeded. Set to -1 to wait indefinitely.
    -->
    - <parameter>
    <name>maxWait</name>
    <value>12000</value>
    </parameter>
    - <!-- MySQL dB username and password for dB connections
    -->
    - <parameter>
    <name>username</name>
    <value>pratap</value>
    </parameter>
    - <parameter>
    <name>password</name>
    <value>ky67yumXg</value>
    </parameter>
    - <!-- Class name for mm.mysql JDBC driver
    -->
    - <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    - <!--
    The JDBC connection url for connecting to your MySQL dB.
              The autoReconnect=true argument to the url makes sure that the
              mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
              connection. mysqld by default closes idle connections after 8 hours.
    -->
    - <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/kgoogle?</value>
    </parameter>
    </ResourceParams>
    </Context>
    ==============================
    Please help me find if i have to change the syntax for linux in the above code.
    Thanks in Advance
    Prathap

    hi
    Thanks for your advise.
    But when i chenged my web.xml and jndi name in my servlet file i got error like this
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    at javax.naming.InitialContext.lookup(InitialContext.java:354)
    at DbConnect.getConnection(DbConnect.java:35)
    at QueryDetails.Query(QueryDetails.java:32)
    at Search.doPost(Search.java:66)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
    et.java:446)
    at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.jav
    a:216)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
    torBase.java:475)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve
    .java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
    rValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
    468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
    r.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
    va:1107)
    at java.lang.Thread.run(Thread.java:536)
    Connection ID null
    Entered FINALLY
    Please help me
    Thanks in Advance
    Prathap

  • 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

    I am using Weblogic 7.0 and while deploying an EJB during startup I get this error?
    Somehow, this application deployed in some developers' machines and failed on
    others. I have no idea why? Pls help!
    Wen
    [exec] weblogic.ejb20.UnDeploymentException: cps_server_ejb.jar; nested exception
    is:
    [exec] javax.naming.NameNotFoundException: Unable to resolve 'app/ejb/cps_server_ejb.jar#StatefulWorkflowEJB'
    Resolved: 'app/ejb' Unresolved:
    'cps_server_ejb.jar#StatefulWorkflowEJB' ; remaining name 'cps_server_ejb.jar#StatefulWorkflowEJB'
    [exec] javax.naming.NameNotFoundException: Unable to resolve 'app/ejb/cps_server_ejb.jar#StatefulWorkflowEJB'
    Resolved: 'app/ejb' Unresolved:'cps
    serverejb.jar#StatefulWorkflowEJB' ; remaining name 'cps_server_ejb.jar#StatefulWorkflowEJB'
    [exec] at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:858)
    [exec] at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:223)
    [exec] at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:187)
    [exec] at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
    [exec] at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
    [exec] at weblogic.ejb20.deployer.EJBDeployer.cleanupAppContext(EJBDeployer.java:1739)
    [exec] at weblogic.ejb20.deployer.EJBDeployer.rollback(EJBDeployer.java:1420)
    [exec] at weblogic.ejb20.deployer.EJBDeployer.undeploy(EJBDeployer.java:310)
    [exec] at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:884)
    [exec] at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:79)
    [exec] at weblogic.j2ee.Application.addComponent(Application.java:294)
    [exec] at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:163)
    [exec] at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:396)
    [exec] at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:302)
    [exec] at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:256)
    [exec] at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:207)
    [exec] at java.lang.reflect.Method.invoke(Native Method)
    [exec] at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:717)
    [exec] at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:699)
    [exec] at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:405)
    [exec] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    [exec] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    [exec] at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:921)
    [exec] at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:470)
    [exec] at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:198)
    [exec] at $Proxy40.updateDeployments(Unknown Source)
    [exec] at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:3957)
    [exec] at weblogic.management.deploy.slave.SlaveDeployer.updateServerDeployments(SlaveDeployer.java:2258)
    [exec] at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:365)
    [exec] at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:235)
    [exec] at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:61)
    [exec] at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:812)
    [exec] at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:294)
    [exec] at weblogic.Server.main(Server.java:31)
    [exec] <Oct 30, 2002 10:15:28 AM PST> <Error> <J2EE> <160001> <Error deploying
    application cps_server_ejb:

    Could it be caused by a wrong configuration in the Weblogic Server console?That, or you are simply using the wrong JNDI lookup path. Or both. The server should provide a function to see what is deployed in its JNDI context, hopefully also mentioning the JNDI path to use. If you need more help, I suggest you take your question to the weblogic forum.
    https://forums.oracle.com/forums/category.jspa?categoryID=193

  • 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

  • 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: No object bound for java:comp/env/...

    Help, help! I have a problem:
    javax.naming.NameNotFoundException: No object bound for java:comp/env/configuratorDataSource
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:116)
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:127)
    at javax.naming.InitialContext.lookup(InitialContext.java:355)
    at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
    at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
    at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
    at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
    at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
    at com.configurator.datasource.ToplinkClientSessionManager.<init>(ToplinkClientSessionManager.java:18)
    at com.configurator.datasource.ToplinkClientSessionManager.getInstance(ToplinkClientSessionManager.java:33
    at com.configurator.persistence.PersistenceManagerImpl.<init>(PersistenceManagerImpl.java:16)
    at com.configurator.ConfiguratorServiceMediatorImpl.getModelsFromDB(ConfiguratorServiceMediatorImpl.java:3
    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 org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:281)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:595)
    code:
    initialContext = new InitialContext();
    LocalStatelessREHome localHome = (LocalStatelessREHome)initialContext.lookup("java:comp/env/StatelessREBean");
    in web.xml:
    <ejb-local-ref>
    <ejb-ref-name>StatelessREBean</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local-home>com.re.stateless.ejb.LocalStatelessREHome</local-home>
    <local>com.re.stateless.ejb.LocalStatelessRE</local>
    <ejb-link>StatelessREBean</ejb-link>
    </ejb-local-ref>
    Any help will be appreciated! Thanks in advance.

    Try removing the JNDI fully qualified name (i.e. java:comp\env\) Use the name of your bean to lookup.
    It worked for me when i used to get a similar exception.

  • 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: 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).

  • A difficult javax.naming.NameNotFoundException problem

    I have to move my application from IBM X455 PC Server to IBM X3850 (inter x86 64bit) PC Server . The application had been running on IBM X455 for about 3 years well . The OS is Red hat linux. The weblogic server on IBM X455 is 8.1.3. I tar the application from IBM X455 to IBM X3850 and install weblogic 8.1.4 on the x86 64bit OS. I redeploy the application on weblogic 8.1.4. When the client try to connect to the server, follow errors appear:
    <Jul 30, 2008 8:39:21 AM GMT+08:00> <Warning> <WLW> <000000> <Unable to load class ProcessControl>
    <Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Exception processing SessionService
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
    java.lang.RuntimeException: Unable to create adaptor
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:186)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_814_WLStub.confirmDeployment(Unknown Source)
    at com.bea.wlw.runtime.core.dispatcher.DispProjectJar.confirmDeployment(DispProjectJar.java:190)
    at com.bea.wlw.runtime.core.dispatcher.DispResources.confirmDeployment(DispResources.java:752)
    at com.bea.wlw.runtime.core.dispatcher.DispCache.ensureDispUnit(DispCache.java:767)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.getDispUnit(HttpServerHelper.java:501)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(HttpServerHelper.java:649)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(HttpServer.java:49)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at com.reformsoft.safe.manage.SessionFilter.doFilter(SessionFilter.java:64)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6724)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.RuntimeException: Unable to create adaptor
    at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:198)
    at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.confirmDeployment(SyncDispatcherBean.java:346)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.confirmDeployment(SyncDispatcher_k1mrl8_EOImpl.java:100)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
    ... 24 more
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'SafeWebService.GenericStateless.bean.StatelessContainer' didn
    't find subcontext 'GenericStateless' Resolved SafeWebService; remaining name 'GenericStateless/bean/StatelessContainer'
    at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:897)
    at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:225)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:154)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
    at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:256)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:359)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at com.bea.wlw.runtime.core.dispatcher.DispBean.getHome(DispBean.java:132)
    at com.bea.wlw.runtime.core.dispatcher.DispBean.getAdaptor(DispBean.java:189)
    ... 28 more
    >
    <Jul 30, 2008 8:39:22 AM GMT+08:00> <Error> <WLW> <000000> <Returning HTTP 500 due to httpWriteCompileErrors <error> <description>An
    unexpected exception occurred while attempting to locate the run-time information for this Web Service. Error: java.rmi.RemoteExcep
    tion:EJB Exception: ; nested exception is: java.lang.RuntimeException: Unable to create adaptor</description> <source>[unknown sourc
    e]</source> <line>[unknown line]</line> <column>[unknown column]</column> <prescription>An unexpected error occurred. Please contact
    [email protected] for further assistance.</prescription> </error> >
    I check the weblogic console and find that there is something wrong with the JNDI tree. The state of GenericStateless is red. because of my poor english , please get the picture from http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=81&threadID=47583&messageID=282533 or http://www.itpub.net/viewthread.php?tid=1032379&extra=page%3D1&frombbs=1 , it will help.
    Since the application is an old one and runs well on IBM X455 machine , the configuration of JNDI and other components is ok. Since the weblogic version is different(8.1.3 to 8.1.4, 32 bit to 64 bit) , is there anything wrong with the weblogic or JDK enviroment? or OS configuration? I have tried weblogic 8.1.6 and many versions of JDK too, still failed . What is wrong? Please help me ASAP. Thanks a lot!

    Did you managed to get the solution to the above error. Can you please let me know the solution if you have get it right? You can post back to my id [email protected]
    Thanks,
    SK
    Edited by: shivaG on Nov 3, 2008 4:25 AM

  • 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

  • Javax.naming.NameNotFoundException: ConnectionFactory not bound

    Hi,
    Is there any one who has any idea about this error. Im getting this while migrating application from JBOSS 4 - JBOSS 5. What could be the approach to resolve it.
    javax.naming.NameNotFoundException: ConnectionFactory not bound
    Regards,
    Gurpreet

    Better posting this in a JBoss forum. It seems like a configuration with how you are using JNDI. Look to see what they changed from JBoss4 to JBoss5. You might need to modify or create some xml files.

Maybe you are looking for

  • Link other dll to Adobe plugin

    Hi, I sucessfully build a plugin that uses other functions from an external .lib file (Subversion API). When my plugin loads, AI loads the DLLs used in the .lib successfully. But when I set a break point at the function that supplied by the .lib file

  • Huge latency reading quadrature encoders

    I'm using a PCI-6601 to read two quadrature encoders on a pan-tilt mechanism. The software uses the DAQmx C interface and polls the encoder positions at 200Hz. The problem is that there appears to be a huge latency on the order of ~50msec between whe

  • BAPI - BUS2014 - Purchasing contracts

    Hi guru's, I am using LSMW(BAPI - BUS2014) to create purchasing Contracts(MRO outline agreements). I am getting the following error - Tax Code I1 in procedure is invalid. But I am passing the right tax code and also checked the tax procedure. (everyt

  • USB SNAP + colour pattern matching ( IMAQ)

    I am new to LAbView and currently  I am working on colour pattern matching with USB snap. My problem is this program keep prompt me on the IMAQ Learn Colour Pattern. I need someone to help me solve that problem. Another question is 'Are colour patter

  • Can't burn disc

    I'm trying to burn my project which has only 1 track (55 Min.) and should play to the end. I also inserted 39 chapter markers which do not have targets assigned. these markers are only accessible with a DVD remote. It all plays fine on the simulator