InitialContext()

I developed an application using netbeans.
when I tried to launch the application on the command line I get following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/logging/LogDomains
     at com.sun.enterprise.util.ORBManager.<clinit>(ORBManager.java:78)
     at com.sun.enterprise.naming.SerialInitContextFactory.<clinit>(SerialInitContextFactory.java:56)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
     at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
     at be.softarts.Main.main(Main.java:38)
the line 38 in question contains the following code:
Context ctx = new InitialContext();
The code runs fine in netbeans, but when I build the jar file in the dist folder I
get this error.
I suppose I have to add a jar file to the classpath but to what jarfile does the class com/sun/logging/LogDomains belong. A search on the internet gave no result. Thanks for any help.

I developed an application using netbeans.
when I tried to launch the application on the command line I get following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/logging/LogDomains
     at com.sun.enterprise.util.ORBManager.<clinit>(ORBManager.java:78)
     at com.sun.enterprise.naming.SerialInitContextFactory.<clinit>(SerialInitContextFactory.java:56)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Unknown Source)
     at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
     at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
     at be.softarts.Main.main(Main.java:38)
the line 38 in question contains the following code:
Context ctx = new InitialContext();
The code runs fine in netbeans, but when I build the jar file in the dist folder I
get this error.
I suppose I have to add a jar file to the classpath but to what jarfile does the class com/sun/logging/LogDomains belong. A search on the internet gave no result. Thanks for any help.

Similar Messages

  • Unable to get 'InitialContext' using Java Client in Oracle App 10.0.2.0

    Scenario & Problem Description: Unable to get 'Initial Context' using Simple Java Client in Oracle Application Server 10.0.2.0
    I'm having an issue while I try to initialize the Initial Context for an EJB lookup from a simple Java Client [local lookup], but the same code snippet works fine when I try from Servlet. I have enclosed the Exception Stack Trace and the Code Snippet for your reference.
    1. .NET Client ---> Servlet --> LookupUtility --> EJB --> DB - Issue
    2. .NET Client ---> Servlet --> EJB --> DB - Works
    Exception: java.lang.InstantiationException: Error communicating with server: Lookup error: javax.naming.AuthenticationException: Invalid username/password for Config (guest); nested exception is: nested exception is: Exception in InitialContext: javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Invalid username/password for Config (guest) at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:149)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.seagate.edcs.config.util.LookupUtility.getInitialContext(LookupUtility.java:123)
    at com.seagate.edcs.config.util.LookupUtility.getConfiguration (LookupUtility.java:69)
    at com.seagate.edcs.config.util.LookupUtility.main(LookupUtility.java:135)
    Code Snippet:
    * This method returns the Configuration for the properties set.
    public ArrayList getConfiguration ( ) throws Exception {
    ArrayList arrayList = null;
    try {
    Context context = getInitialContext();
    System.out.println("Context : " + context);
    Object home = context.lookup("java:comp/env/ejb/com.seagate.edcs.config.ejb.ConfigSessionEJBHome");
    System.out.println("Object home : " + home);
    ConfigSessionEJBHome configSessionEJBHome = (ConfigSessionEJBHome)PortableRemoteObject.narrow(home, ConfigSessionEJBHome.class);
    System.out.println("ConfigSessionEJBHome configSessionEJBHome : " + configSessionEJBHome);
    ConfigSessionEJB configSessionEJB =(ConfigSessionEJB)PortableRemoteObject.narrow(configSessionEJBHome.create(), ConfigSessionEJB.class);
    System.out.println("ConfigSessionEJB configSessionEJB : " + configSessionEJB);
    arrayList = configSessionEJB.getAllConfig();
    System.out.println("Context : " + context);
    } catch (Exception ex) {
    System.out.println("Exception Occured");
    throw ex;
    return arrayList;
    * Get an initial context from the JNDI tree.
    private Context getInitialContext() throws NamingException {
    try {
    Hashtable hashtable = new Hashtable();
    hashtable.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory");
    hashtable.put("java.naming.provider.url", "ormi://seagate.mil-shivas-270.am.ad.seagate.com/home"); // if we won't specify the port, it considers the default port
    hashtable.put("java.naming.security.principal","ias_admin");
    hashtable.put("java.naming.security.credentials","ias123");
    return new InitialContext(hashtable);
    } catch (NamingException ne) {
    System.out.println("Exception in InitialContext.");
    throw ne;
    Note:
    1. The user "ias_admin" & password "ias123" are the credential provided for the 'Admin' while installing the Oracle App Server and using these credentials I'm able to bring the Admin Console. Also, added new user 'guest/guest' - assigned this user to the 'admin' group ...
    2. Since its a local lookup, there is no need to specify the credentials, but at runtime a dialog box pops up prompting to enter the 'userid/password' and when I enter the crendtials, I get the exception as stated. [In case of Servlet - EJB lookup, I'm not specifying any credentials]
    Are there are any configuration parameters which I need to provide in any of the .xml? Could you please let me know the fix for the same.
    Regards,
    Kafeel/-

    Please use the OS {forum:id=210}

  • Questions on InitialContext and replica-aware stub caching

    Hi All,
    We have a cluster and deployed with some stateless ejb session beans. Currently we only cached the InitialContext object in the client code, and I have several questions:
    1. in the current case, if we call lookup() to get a replica-aware stub, which server will return the stub object, the same server we get the InitialContext, or it will load balanced to other servers every time we call the lookup method?
    2. should we just cache the stub? is it thread safe? if it is, how does the stub handle concurrent requests from the client threads? in parallels or in sequence?
    One more question, when we call new InitialContext(), it will take a long time before it can return a timeout exception if the servers are not reachable, how can we set a timeout for this case?

    809364 wrote:
    You can set the timeout value programatically by using the
    weblogic.jndi.Environment.setRequestTimeout()
    Refer: http://docs.oracle.com/cd/E12839_01/apirefs.1111/e13941/weblogic/jndi/Environment.html
    or
    set the REQUEST_TIMEOUT in the weblogic.jndi.WLContext
    Refer: http://docs.oracle.com/cd/E11035_01/wls100/javadocs/weblogic/jndi/WLContext.html
    Hi, I tried setting the parameters before, but it only works for stub lookup and ejb call timeout, not for the creation of InitialContext. And any idea for my 2nd question?

  • Problem in using InitialContext to do a lookup of CMP EnitityBean.

    Hi,
    I am running WLS 5.1 SP6 on Windows98. I am trying to lookup a CMP entiry bean from
    Java 1.3 client. I can successfully create the InitialContext but having trouble in using it to do the lookup. I get the following error:
    jndiContext is javax.naming.InitialContext@61f24(This is line is the result of println : see code)
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.titan.cabin.Client_1.main(Client_1.java:21)
    My code of the Java 1.3 client is as follows:
    package com.titan.cabin;
    import com.titan.cabin.CabinHome;
    import com.titan.cabin.Cabin;
    import com.titan.cabin.CabinPK;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.rmi.RemoteException;
    import java.util.Properties;
    import java.util.Hashtable;
    public class Client_1 {
    public static void main(String [] args){
    try {
    InitialContext jndiContext = getWeblogicInitialContext();
    System.out.println("jndiContext is " + jndiContext);
    CabinHome home = (CabinHome)(jndiContext.lookup("CabinHome"));
    Cabin cabin_1 = home.create(1);
    System.out.println("created it!");
    cabin_1.setName("Master Suite");
    cabin_1.setDeckLevel(1);
    cabin_1.setShip(1);
    cabin_1.setBedCount(3);
    CabinPK pk = new CabinPK();
    pk.id = 1;
    System.out.println("keyed it! ="+ pk);
    Cabin cabin_2 = home.findByPrimaryKey(pk);
    System.out.println("found by key! ="+ cabin_2);
    System.out.println(cabin_2.getName());
    System.out.println(cabin_2.getDeckLevel());
    System.out.println(cabin_2.getShip());
    System.out.println(cabin_2.getBedCount());
    } catch (java.rmi.RemoteException re){re.printStackTrace();}
    catch (javax.naming.NamingException ne){ne.printStackTrace();}
    catch (javax.ejb.CreateException ce){ce.printStackTrace();}
    catch (javax.ejb.FinderException fe){fe.printStackTrace();}
    public static InitialContext getWeblogicInitialContext()
    throws javax.naming.NamingException {
    InitialContext ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY, weblogic.jndi.WLInitialContextFactory.class.getName());
    ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
    ht.put(Context.SECURITY_PRINCIPAL, "system");
    ht.put(Context.SECURITY_CREDENTIALS, new weblogic.common.T3User("system", "askpanch"));
    try {
    ctx = new InitialContext(ht);
    // Use the context in your program
    catch (NamingException e) {
    System.out.println("InitialContext could not be created");
    System.out.println("The explanation is " + e.getExplanation());
    e.printStackTrace();
    // a failure occurred
    finally {
    try {ctx.close();}
    catch (Exception e) {
    // a failure occurred
    return ctx;
    The message printed by System.out.println shows that InitialContext is created but exception is thrown when it is used by the lookup method.
    My classpath is as follows:
    CLASSPATH=C:\VisualCafeEE\Java\Lib\ERADPUBLIC.JAR;C:\VisualCafeEE\Java\Lib\servlet.jar;C:\VisualCafeEE\Java\Lib\server.jar;C:\VisualCafeEE\Bin\Components\templa
    tes.jar;C:\VisualCafeEE\Java\Lib\javax_ejb.ZIP;C:\VisualCafeEE\Java\Lib\jndi.jar;C:\VisualCafeEE\Bin\Components\vcejbwl.jar;C:\VisualCafeEE\Bin\sb;C:\VisualCafe
    EE\Bin\sb\classes\sb.jar;.;;C:\VisualCafeEE\Java\Lib;C:\VisualCafeEE\Java\Lib\SYMCLASS.ZIP;C:\VisualCafeEE\Java\Lib\CLASSES.ZIP;C:\VisualCafeEE\Java\Lib\COLLECT
    IONS.ZIP;C:\VisualCafeEE\Java\Lib\ICEBROWSERBEAN.JAR;C:\VisualCafeEE\Java\Lib\SYMTOOLS.JAR;C:\VisualCafeEE\JFC\SWINGALL.JAR;C:\VisualCafeEE\Bin\Components\SFC.J
    AR;C:\VisualCafeEE\Bin\Components\SYMBEANS.JAR;C:\VisualCafeEE\Java\Lib\DBAW.ZIP;C:\VisualCafeEE\Bin\Components\DBAW_AWT.JAR;C:\VisualCafeEE\Bin\Components\Data
    bind.JAR;C:\VisualCafeEE\Java\Lib\ERADTOOLS.JAR;;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtime20;;.;c:\Weblogic\classes;c:\weblogic\lib\weblogicaux.jar
    Any help to solove this problem from anybody is greatly appreciated. I am including some other related articles in this newsgroup for your ready reference(see below).
    Thanks a lot,
    Ashok Pancharya
    Email: [email protected]
    Sounds like your WL config is a bit different, perhaps a classpath issue or
    a missing .properties file or a different command line. For whatever
    reason, the factory does not know what class is supposed to be used as the
    initial context.
    Peace.
    Cameron Purdy
    [email protected]
    http://www.tangosol.com
    WebLogic Consulting Available
    "Chris Solar" <[email protected]> wrote in message
    news:[email protected]...
    Hi-
    I'm running WLS 5.1 on NT 4.0 (SP6).
    For some reason, I'm unable to use the default
    constructor to get an initial context. That is,
    if I try:
    InitialContext ctx = new InitialContext();
    I get a NoInitialContextException, as in:
    "Need to specify class name in environment or system
    property, or as an applet parameter, or in an application
    resource file: java.naming.factory.initial"
    This does not happen if I pass in a HashTable or Properties
    object containing a value for the initial context factory
    (even if it's just weblogic.jndi.WLInitialContextFactory).
    Colleagues of mine seem to be able to use
    the defaut constructor without any problems.
    What am I missing?
    -Chris.

    Thanks Gene. Good solution. I could solve the problem which is explained in my another article posted just before a minute you posted this response.
    Thanks again.
    Ashok Pancharya
    "Gene Chuang" <[email protected]> wrote:
    According to your getWeblogicInitialContext(), you are putting ctxt.close() in a finally block,
    which will always get executed, and then returning ctxt. Don't think you can do any lookups with a
    closed Context.
    Gene Chuang
    Join Kiko.com!
    "Ashok Pancharya" <[email protected]> wrote in message news:[email protected]...
    Hi,
    I am running WLS 5.1 SP6 on Windows98. I am trying to lookup a CMP entiry bean from
    Java 1.3 client. I can successfully create the InitialContext but having trouble in using it todo the lookup. I get the following error:
    jndiContext is javax.naming.InitialContext@61f24(This is line is the result of println : see code)
    javax.naming.NoInitialContextException: Need to specify class name in environment or systemproperty, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.titan.cabin.Client_1.main(Client_1.java:21)
    My code of the Java 1.3 client is as follows:
    package com.titan.cabin;
    import com.titan.cabin.CabinHome;
    import com.titan.cabin.Cabin;
    import com.titan.cabin.CabinPK;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.rmi.RemoteException;
    import java.util.Properties;
    import java.util.Hashtable;
    public class Client_1 {
    public static void main(String [] args){
    try {
    InitialContext jndiContext = getWeblogicInitialContext();
    System.out.println("jndiContext is " + jndiContext);
    CabinHome home = (CabinHome)(jndiContext.lookup("CabinHome"));
    Cabin cabin_1 = home.create(1);
    System.out.println("created it!");
    cabin_1.setName("Master Suite");
    cabin_1.setDeckLevel(1);
    cabin_1.setShip(1);
    cabin_1.setBedCount(3);
    CabinPK pk = new CabinPK();
    pk.id = 1;
    System.out.println("keyed it! ="+ pk);
    Cabin cabin_2 = home.findByPrimaryKey(pk);
    System.out.println("found by key! ="+ cabin_2);
    System.out.println(cabin_2.getName());
    System.out.println(cabin_2.getDeckLevel());
    System.out.println(cabin_2.getShip());
    System.out.println(cabin_2.getBedCount());
    } catch (java.rmi.RemoteException re){re.printStackTrace();}
    catch (javax.naming.NamingException ne){ne.printStackTrace();}
    catch (javax.ejb.CreateException ce){ce.printStackTrace();}
    catch (javax.ejb.FinderException fe){fe.printStackTrace();}
    public static InitialContext getWeblogicInitialContext()
    throws javax.naming.NamingException {
    InitialContext ctx = null;
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY,weblogic.jndi.WLInitialContextFactory.class.getName());
    ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
    ht.put(Context.SECURITY_PRINCIPAL, "system");
    ht.put(Context.SECURITY_CREDENTIALS, new weblogic.common.T3User("system", "askpanch"));
    try {
    ctx = new InitialContext(ht);
    // Use the context in your program
    catch (NamingException e) {
    System.out.println("InitialContext could not be created");
    System.out.println("The explanation is " + e.getExplanation());
    e.printStackTrace();
    // a failure occurred
    finally {
    try {ctx.close();}
    catch (Exception e) {
    // a failure occurred
    return ctx;
    The message printed by System.out.println shows that InitialContext is created but exception isthrown when it is used by the lookup method.
    My classpath is as follows:
    CLASSPATH=C:\VisualCafeEE\Java\Lib\ERADPUBLIC.JAR;C:\VisualCafeEE\Java\Lib\servlet.jar;C:\VisualCafe
    EE\Java\Lib\server.jar;C:\VisualCafeEE\Bin\Components\templa
    >
    tes.jar;C:\VisualCafeEE\Java\Lib\javax_ejb.ZIP;C:\VisualCafeEE\Java\Lib\jndi.jar;C:\VisualCafeEE\Bin
    \Components\vcejbwl.jar;C:\VisualCafeEE\Bin\sb;C:\VisualCafe
    >
    EE\Bin\sb\classes\sb.jar;.;;C:\VisualCafeEE\Java\Lib;C:\VisualCafeEE\Java\Lib\SYMCLASS.ZIP;C:\Visual
    CafeEE\Java\Lib\CLASSES.ZIP;C:\VisualCafeEE\Java\Lib\COLLECT
    >
    IONS.ZIP;C:\VisualCafeEE\Java\Lib\ICEBROWSERBEAN.JAR;C:\VisualCafeEE\Java\Lib\SYMTOOLS.JAR;C:\Visual
    CafeEE\JFC\SWINGALL.JAR;C:\VisualCafeEE\Bin\Components\SFC.J
    >
    AR;C:\VisualCafeEE\Bin\Components\SYMBEANS.JAR;C:\VisualCafeEE\Java\Lib\DBAW.ZIP;C:\VisualCafeEE\Bin
    \Components\DBAW_AWT.JAR;C:\VisualCafeEE\Bin\Components\Data
    >
    bind.JAR;C:\VisualCafeEE\Java\Lib\ERADTOOLS.JAR;;C:\IBMVJava\eab\runtime30;C:\IBMVJava\eab\runtime20
    ;;.;c:\Weblogic\classes;c:\weblogic\lib\weblogicaux.jar
    Any help to solove this problem from anybody is greatly appreciated. I am including some otherrelated articles in this newsgroup for your ready reference(see below).
    Thanks a lot,
    Ashok Pancharya
    Email: [email protected]
    Sounds like your WL config is a bit different, perhaps a classpath issue or
    a missing .properties file or a different command line. For whatever
    reason, the factory does not know what class is supposed to be used as the
    initial context.
    Peace.
    Cameron Purdy
    [email protected]
    http://www.tangosol.com
    WebLogic Consulting Available
    "Chris Solar" <[email protected]> wrote in message
    news:[email protected]...
    Hi-
    I'm running WLS 5.1 on NT 4.0 (SP6).
    For some reason, I'm unable to use the default
    constructor to get an initial context. That is,
    if I try:
    InitialContext ctx = new InitialContext();
    I get a NoInitialContextException, as in:
    "Need to specify class name in environment or system
    property, or as an applet parameter, or in an application
    resource file: java.naming.factory.initial"
    This does not happen if I pass in a HashTable or Properties
    object containing a value for the initial context factory
    (even if it's just weblogic.jndi.WLInitialContextFactory).
    Colleagues of mine seem to be able to use
    the defaut constructor without any problems.
    What am I missing?
    -Chris.

  • Problem in using new InitialContext when running client application

    Hi All,
    We are having a web application which runs on weblogic server 6.1.
    We are loading a servelet at startup which will load the application specific
    properties file and bind it with the context.
    In one of the classes in the .ear file we are looking up the data source like
    this
    InitialContext _initialContext = new InitialContext();
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    con = dataSource.getConnection();
    This works fine through the jsp.
    But when I run a separate client program this lookup is failing.
    I tried another way of looking up like this
         Properties h = new Properties();
         h.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
         h.put(Context.PROVIDER_URL, url);
         Context _initialContext = new InitialContext(h);
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    But the weblogic server got hanged for some time after it gave no messages coming
    idle exception.
    If any body knows the solution for this please reply. I am trying to develop an
    application client but I don't know hoe to proceed. Any examples I can get for
    writing a application client using weblogic is very much welcome.
    Please give your valuable suggestions.

    Hi Krishna,
    servlet/jsp programs will work successfully in getting initial context of
    application server, because they runs at server side, and server
    automatically loaded the client library.
    If you are using application client, you need to point the weblogic.jar the
    application client classpath.What is the exception it is throwing?
    Can you test the weblogic samples from the following location of your
    installation
    \bea\wlserver6.1\samples\examples
    Thanks
    Kumar
    "Krishna Kumar" <[email protected]> wrote in message
    news:3def5758$[email protected]..
    >
    Hi All,
    We are having a web application which runs on weblogic server 6.1.
    We are loading a servelet at startup which will load the applicationspecific
    properties file and bind it with the context.
    In one of the classes in the .ear file we are looking up the data sourcelike
    this
    InitialContext _initialContext = new InitialContext();
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    con = dataSource.getConnection();
    This works fine through the jsp.
    But when I run a separate client program this lookup is failing.
    I tried another way of looking up like this
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, url);
    Context _initialContext = new InitialContext(h);
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    But the weblogic server got hanged for some time after it gave no messagescoming
    idle exception.
    If any body knows the solution for this please reply. I am trying todevelop an
    application client but I don't know hoe to proceed. Any examples I can getfor
    writing a application client using weblogic is very much welcome.
    Please give your valuable suggestions.

  • Creation of InitialContext fails when i hot-deploy scheduler-service.xml

    Creation of InitialContext fails when i hot-deploy scheduler-service.xml
    I configured scheduler-service as follows in Jboss 3.2:
    scheduler-service.xml
    <mbean code="org.jboss.varia.scheduler.Scheduler"
         name=":service=Scheduler">
    <attribute name="StartAtStartup">true</attribute>
    <attribute name="SchedulableClass">com.beta.my.utils.FMScheduler</attribute>
    <attribute name="SchedulableArguments">Schedulabe Test,12345</attribute>
    <attribute name="SchedulableArgumentTypes">java.lang.String,int</attribute>
    <attribute name="InitialStartDate">0</attribute>
    <attribute name="SchedulePeriod">10000</attribute>
    <attribute name="InitialRepetitions">-1</attribute>
    </mbean>
    Schedulable Class
    package com.beta.my.utils;
    import java.util.Date;
    import org.jboss.varia.scheduler.Schedulable;
    public static class FMScheduler
    implements Schedulable
    private String mName;
    private int mValue;
    public FMScheduler(String pName,int pValue)
    mName = pName;
    mValue = pValue;
    public void perform(Date pTimeOfCall,long pRemainingRepetitions)
    try {
              Context context = new InitialContext();//properties taken from jndi.properties file
              } catch (Exception e){
                   e.printStackTrace();
    I started my jboss..,FMScheduler created successfully, perform method in FMScheduler called succesfully after SchedulePeriod(1000)
    The problem occurs(NullPointerException) while i changed SchedulePeriod time and hot-deployed(just saved scheduler-service.xml).
    The following Exception occures due to InitialContext creation fails*(Context context = new InitialContext();)* in FMScheduler.
    17:46:27,361 ERROR [STDERR] java.lang.NullPointerException
    17:46:27,361 ERROR [STDERR] at org.jboss.mx.loading.UnifiedClassLoader.findR
    esources(UnifiedClassLoader.java:374)
    17:46:27,361 ERROR [STDERR] at java.lang.ClassLoader.getResources(ClassLoade
    r.java:825)
    17:46:27,361 ERROR [STDERR] at com.sun.naming.internal.VersionHelper12$5.run
    (VersionHelper12.java:145)
    17:46:27,361 ERROR [STDERR] at java.security.AccessController.doPrivileged(N
    ative Method)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.VersionHelper12.getRe
    sources(VersionHelper12.java:142)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.ResourceManager.getAp
    plicationResources(ResourceManager.java:468)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.ResourceManager.getIn
    itialEnvironment(ResourceManager.java:159)
    17:46:27,377 ERROR [STDERR] at javax.naming.InitialContext.init(InitialConte
    xt.java:215)
    17:46:27,377 ERROR [STDERR] at javax.naming.InitialContext.<init>(InitialCon
    text.java:195)
    17:46:27,377 ERROR [STDERR] at com.beta.my.utils.FMScheduler.perform
    (FMScheduler.java:42)
    17:46:27,392 ERROR [STDERR] at org.jboss.varia.scheduler.Scheduler$Listener.
    handleNotification(Scheduler.java:1263)
    17:46:27,392 ERROR [STDERR] at org.jboss.mx.server.NotificationListenerProxy
    .handleNotification(NotificationListenerProxy.java:69)
    17:46:27,392 ERROR [STDERR] at javax.management.NotificationBroadcasterSuppo
    rt.sendNotification(NotificationBroadcasterSupport.java:95)
    17:46:27,392 ERROR [STDERR] at javax.management.timer.Timer.sendNotification
    s(Timer.java:441)
    17:46:27,392 ERROR [STDERR] at javax.management.timer.Timer.access$000(Timer
    .java:31)
    17:46:27,408 ERROR [STDERR] at javax.management.timer.Timer$RegisteredNotifi
    cation.doRun(Timer.java:612)
    17:46:27,408 ERROR [STDERR] at org.jboss.mx.util.SchedulableRunnable.run(Sch
    edulableRunnable.java:164)
    17:46:27,408 ERROR [STDERR] at org.jboss.mx.util.ThreadPool$Worker.run(Threa
    dPool.java:225)
    please help me if u have any idea,thanks

    Hi Hamsa,
    Did you also create and configure an "Execution Destination"?
    You can test the Metadata destination configuration on Web Service Navigator.
    On the web service navigator (http://hostname:portnumber/wsnavigator) search in the metatda destination you have created for the service you imported in web dynpro as a model. If you can find it there test it on the ws navigator.
    Best regards,
    Yasar

  • Remote access of InitialContext via JMX client

    Hi,
    I'm not sure if i'm the right place here for posting my problem, but I don't know where to put it otherwise.
    I'm trying to access a JBoss datasource via JMX. The JMX code and datasource code is both placed inside a WAR file that is deployed in Jboss 5.1.
    When I access the datasource from a servlet, it runs oke but when I try to run it from jconsole I get a classnotfoundexception.
    The code where I register the MBean is:
    MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
    try
    ObjectName mbeanName = new ObjectName(OBJECT_NAME);
    Test mbean = new Test();
    mbs.registerMBean(mbean, mbeanName);
    catch (Exception e)
    //handle
    The code where I get the exception is:
    Context initContext = new InitialContext(jndiProps);
    The exception is:
    javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
    These are my JNDI props:
    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
    java.naming.provider.url=jnp://localhost:1099
    Any ideas?

    OK - I found another thread dealing with the problem at hand.
    http://forums.sun.com/thread.jspa?threadID=5369697
    Edited by: Christian.Yttesen on Jan 13, 2010 5:15 AM

  • Can not InitialContext in weblogic 10.3.5

    Hi,
    When I try to InitialContext for JMS like below,
    public class AAJMSClient {
         public static void main(String[] args) {
              Context ctx = null;
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://localhost:7001");
              try {
              ctx = new InitialContext(ht);
              catch (NamingException e) {
              finally {
              try {ctx.close();}
              catch (Exception e) {
    I enccounter such an exception:
    Exception in thread "Main Thread" java.lang.NoSuchMethodError: weblogic/management/configuration/NetworkAccessPointMBean.isSDPEnabled()Z
         at weblogic.server.channels.BasicServerChannelImpl.update(BasicServerChannelImpl.java:495)
         at weblogic.server.channels.BasicServerChannelImpl.<init>(BasicServerChannelImpl.java:456)
         at weblogic.server.channels.ServerChannelImpl.<init>(ServerChannelImpl.java:94)
         at weblogic.server.channels.ServerChannelImpl.<init>(ServerChannelImpl.java:85)
         at weblogic.server.channels.ServerChannelImpl.createDefaultServerChannel(ServerChannelImpl.java:223)
         at weblogic.rjvm.t3.ProtocolHandlerT3$ChannelInitializer.<clinit>(ProtocolHandlerT3.java:37)
         at weblogic.rjvm.t3.ProtocolHandlerT3.getDefaultServerChannel(ProtocolHandlerT3.java:42)
         at weblogic.protocol.ServerChannelManager$SingletonMaker$1.getOutboundServerChannel(ServerChannelManager.java:393)
         at weblogic.protocol.ServerChannelManager.findOutboundServerChannel(ServerChannelManager.java:288)
         at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:233)
         at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:197)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteCluster(RJVMFinder.java:316)
         at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:205)
         at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
         at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:353)
         at weblogic.jndi.Environment.getContext(Environment.java:315)
         at weblogic.jndi.Environment.getContext(Environment.java:285)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at oracle.oats.empstart.AAJMSClient.main(AAJMSClient.java:27)
    Could u kindly help me to check how to resolve this problem, is any jar version not correct? we just updated to 10.3.5 from 10.3.3

    Hi,
    Sorry for the late response.
    Make sure you have the correct jars in your client classpath. See Overview of Stand-alone Clients at http://docs.oracle.com/cd/E21764_01/web.1111/e13717/basics.htm#SACLT122, and table 2-2 on the same page.
    Note that if your client is running in the same JVM as a WL server, it normally should not specify any parameters for context creation (simply call "new InitialContext()" or obtain a context references from your EJB).
    Tom
    PS. It's cool to see a "ctx.close()". Far too often, folks forget to clean these suckers up.

  • Problem in accessing two different InitialContexts simultaneously

    Hi All
    I have a strange problem the scenario is as below
    I have two different web logic servers as server1 and server2
    The Realm on server1 is user1 and password is pwd1
    The Realm on server1 is user2 and password is pwd2
    In my application on server1 I created the database connection with DataSource lookup by setting InitialContext values as java.naming.security.principal to user1 and java.naming.security.credentials to pwd1 and i have done some data base transaction .
    In between i need to made a remote EJB call which is on server2 so i created an other
    InitialContext by setting java.naming.security.principal to user2 and java.naming.security.credentials to pwd2 and this 2nd context i am closing after placing the HomeObject in a HashMap.
    After completing the EJB call I have to continue the remaining database transactions by getting the connection from lookup.
    Here i am getting the following error
    *Caused by: java.sql.SQLException: Pool connect failed : java.lang.SecurityException: [Security:090398]Invalid Subject:user2*
    If any one has faced the same problem or know the solution to this problem please help me in solving this.
    Thanks in Advance.

    The thread that establishes an initial context with a WLS server gets infected with the security credential of the initial context. Anything that thread does afterwards will be using that credential. A typical solution to this would be to obtain and cache the current subject on the thread before getting the second initial context, and then resume the subject when you need to go back to work with the first initial context. You may want to look into weblogic.Security.Security class for the APIs that you need to accomplish this.
    Regards,
    Dongbo
    Edited by: user650694 on Dec 12, 2008 10:31 AM

  • Can't get InitialContext from Applet over SSL

    The web page loads, the applet loads, but an exception is thrown creating an InitialContext.
    java.lang.RuntimeException
         at weblogic.security.utils.SSLSetup.getLicenseLevel(SSLSetup.java:157)
         at weblogic.security.utils.SSLSetup.getWrapperClass(SSLSetup.java:195)
         at weblogic.security.utils.SSLContextWrapper.<init>(SSLContextWrapper.java:35)
         at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapper.java:29)
         at weblogic.security.utils.SSLSetup.getSSLContext(SSLSetup.java:390)
         at weblogic.rjvm.t3.T3SJVMConnection.newSocket(T3SJVMConnection.java:118)
         at weblogic.rjvm.t3.T3JVMConnection.newSocketWithRetry(T3JVMConnection.java:569)
         at weblogic.rjvm.t3.T3JVMConnection.connect(T3JVMConnection.java:430)
         at weblogic.rjvm.t3.T3SJVMConnection.createConnection(T3SJVMConnection.java:92)
         at weblogic.rjvm.ConnectionManager.createConnection(ConnectionManager.java:1772)
         at weblogic.rjvm.ConnectionManager.findOrCreateConnection(ConnectionManager.java:1295)
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:430)
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:312)
         at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:222)
         at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:180)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:222)
         at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:188)
         at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:125)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:296)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:239)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at MyApplet.init(MyApplet.java:15)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    It seems like the certificate was downloaded correctly since the page loads and the applet loads. What else needs to be set up for the InitialContext?
    Thanks!

    Oops, forgot to mention the specs. That's WebLogic 8.1 with Service Pack 4, JRE 1.4.2_06, IE 6.0 SP 2, using the Demo certs for now.

  • Getting the InitialContext in an application client

    I have an application client deployed in my application. When I run the client like this:
    java -jar reconcile-client/reconcile-client.jar
    It is failing with this exception when trying to look up anything through the InitialContext object:
    Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
            at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
            at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
            at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
            at javax.naming.InitialContext.lookup(InitialContext.java:347)
            at aoc.arkansas.ReconcileClient.main(ReconcileClient.java:26)Is there another way I should be running the client? According to this link I shouldn't have to supply any information to the constructor of the InitialContext object. http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/servjndi011.htm

    You missed the part where it says you have to use "oracle.j2ee.naming.ApplicationClientInitialContextFactory" and that you should see "Configuring an Oracle Initial Context Factory" (http://download.oracle.com/docs/cd/B32110_01/web.1013/b28221/servjndi011.htm#CIACBCHB). Follow that link and you'll find you have to pass in a map with the "java.naming.factory.initial" property set to that factory, and with the "java.naming.provider.url" property set up to point to the OC4J server.

  • On Weblogic7, how do I create an InitialContext to a Weblogic6 server and set SECURITY_CREDENTIALS?

    On a Weblogic7 server I am trying to
    create an InitialContext to a Weblogic6
    server and set the SECURITY_CREDENTIALS.
    The code is something like this:
    Hashtable p = new Hashtable();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, url);
    p.put(Context.SECURITY_PRINCIPAL, usr);
    p.put(Context.SECURITY_CREDENTIALS, pwd);
    InitialContext ctx = new InitialContext(p);
    But when this code runs, I get a class cast
    exception on class:
    weblogic.security.acl.DefaultUserInfoImpl
    How can I stop this?

    Yes I wrote AspectRatioSelection to take the document orientation into consideration an use the ratio you set orientated to the documents orientation.  So an action to crop Landscape and Portraits for a 4X6 paper would be easy to record. You will notice the dialog has two numbers fields not a Width and Height fields no orientation is implied. Its companion LongSidePrintLength.jsx the let you set the correct print dpi after the aspect ratio crop.
    I did create a plug-in where you could specify an absolute aspect ratio that also had an orient option to work like AspectRatioSelection.  So with that plug-in you would able to crop a landscape to a portrait and portrait to landscape. Hover the image composition changes so much when you do often you can't get an acceptable composition.  The dialog also became hard  to describe well for me.  I program better then I do English.  The orient check box made width and height meaningless and the aspect ratio not absolute and wasn't easly explained. This is what it look like.
    znarkus wrote:
    Thanks for these scripts!
    I noticed an (for me) issue with AspectRatioSelection though: even though I set aspect ratio to 6:4 it decides to crop some images 4:6.
    It works with images that are portrait, but those that are more square are cropped in 4:6.
    I don't follow your more square thing.  If you have two documents one 4x6 and the other 6x4 which is more square?
    The way it works biased on you documents orientation. If your document is wider then tall it landscape if it taller the wide it a Portrait. If It square the plugin defaults it to Landscape.
    So it makes no difference if you set 4 and 6 or 6 and 4 or 3 and 2 or 2 and 3 
    Landscape and square document will see landscape selection with a or 3:2 aspect ratio selection or path the is either rectangle or oval
    Portraits documents will see a Portrait selection with a 2:3 aspect ratio selection or path the is either rectangle or oval
    Message was edited by: JJMack

  • Problem with InitialContext Creation in Weblogic 5.1

    Hi all,
    We are using Weblogic 5.1 on Windows and Solaris.
    We are trying to get InitialContext by the following code snippet.
    This piece of code is in a Thread which is kicked off by a startup class.
    The purpose of getting the initialContext here is to get a reference to a JMS
    queue and to start listening for any messages that are put into the queue.
    Hashtable htEnv = new Hashtable();
    htEnv.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    htEnv.put(Context.PROVIDER_URL, "t3://ip_address:port_number");
    return new InitialContext(htEnv);
    Sometimes this code takes almost 15 minutes to return an InitialContext.
    Some other times it does not return at all, neither does it throw any exception.
    In the application this code may get called multiple times simultaneously.
    The problem is not consistent also.
    There is one aspect that has been noticed. A number of InitialContext Objects
    are initiated in the application and are not closed after use (As recommended
    in the weblogic documentation).
    The other observation is that the occurrence of the above explained problem is
    very consistent when the executeThreadCount of the Weblogic server is low (<=
    15). However, once the executeThread count is increased to a higher value (30
    to 45) the occurrence of the problem is very rare.
    Any information regarding this problem would be extremely helpful.
    Thanks and Regards,
    Uday

    Thank you Bhagvan,
    The creation of initial context in every call is a clear mistake. Caching has
    to be implemented.
    However , i need some more information about this ....
    As you said the initial context is being created at every instant for a lookup
    of any object in the jndi tree in the remote machine(I'll name this "machine A").
    Simultaneously there is an attempt for creation of an InitialContext in the other
    machine(call it "machine B") for the remote "machine A".
    This is needed because "machine B" has to get a reference to a JMS queue on "machine
    A" and start listening for any messages in it.
    It is at this point that the InitialContext creation takes randomly long times
    to return.
    That is the call is made by populating a Hashtable with the properties of the
    remote "machine A" like the IP address, Port number of "machine A" and using this
    Hashtable as a parameter in "machine B" to get the InitialContext.
    I was also wondering if there is a limit on the number of InitialContext objects
    that can be opened at any instant in a server.
    Could you please throw more light on these areas ........
    Thanks and regards,
    uday
    "bhagvan" <[email protected]> wrote:
    >
    Is there any particular reason why you want to get
    a new initial context in every call ?? My suggestion
    is to cache it based on the application parameters let us
    say the client user or client's machine or any other parameter
    which is unique for a client.
    hope this helps.
    "Uday Reddy" <[email protected]> wrote:
    Hi all,
    We are using Weblogic 5.1 on Windows and Solaris.
    We are trying to get InitialContext by the following code snippet.
    This piece of code is in a Thread which is kicked off by a startup class.
    The purpose of getting the initialContext here is to get a reference
    to a JMS
    queue and to start listening for any messages that are put into thequeue.
    Hashtable htEnv = new Hashtable();
    htEnv.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    htEnv.put(Context.PROVIDER_URL, "t3://ip_address:port_number");
    return new InitialContext(htEnv);
    Sometimes this code takes almost 15 minutes to return an InitialContext.
    Some other times it does not return at all, neither does it throw any
    exception.
    In the application this code may get called multiple times simultaneously.
    The problem is not consistent also.
    There is one aspect that has been noticed. A number of InitialContext
    Objects
    are initiated in the application and are not closed after use (As recommended
    in the weblogic documentation).
    The other observation is that the occurrence of the above explainedproblem
    is
    very consistent when the executeThreadCount of the Weblogic server is
    low (<=
    15). However, once the executeThread count is increased to a highervalue
    (30
    to 45) the occurrence of the problem is very rare.
    Any information regarding this problem would be extremely helpful.
    Thanks and Regards,
    Uday

  • Getting server side initialcontext

    Hello,
    I have created a user using the admin console. When I try to get a IntialContext
    for this user, I am getting accress denied error when trying to get the InitialContext.
    Code snippet:
    Hashtable env = new Hashtable();
    // This required property specifies the factory to be used
    // to create the context.
    env.put(
    Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory"
    env.put(Context.PROVIDER_URL, providerUrl );
    env.put(Context.SECURITY_PRINCIPAL, "someuser");
    env.put(Context.SECURITY_CREDENTIALS, "userpassword");
    context = new InitialContext(env);
    Thanks for the help.
    BTW, this code works on a stand alone client.

    Hi Kavitha,
    If u have not gone through the link given below then
    plz visit it, it may help u.
    http://help.sap.com/saphelp_nw04/helpdata/en/5c/2f2c4142aef623e10000000a155106/content.htm
    Regards,
    Narinder

  • InitialContext and javax.rmi.PortableRemoteObject

    I've been trying to locate a very annoying problem that I get when I try to bind remote objects in JNDI. I have now located the problem but I have no idea why this causes a problem or how to fix it. It seems that creating an InitialContext has different effects depending whether I create an instance of javax.rmi.PortableRemoteObject before.
    Here's what I am doing...
    1:Context ctx = new InitialContext(); //Create Initial context
    2://Instantiate remote object (extends PortableRemoteObject and stubs gen with rmic with -iiop flag)
    3:Hello hello = new HelloImpl();
    4:ctx.rebind("hello", hello); //Bind to JNDI
    5:System.out.println("Object bound!!!!!");
    This code works fine. The problem occurs when I try to instantiate the remote object before creating the InitialContext for the first time (I.e. I move line 3 to the top) I then get the following exception:
    2007-aug-13 09:32:26 com.sun.corba.ee.impl.util.Utility autoConnect
    VARNING: "IOP00511403: (INV_OBJREF) Class rmi.HelloImpl not exported, or else is actually a JRMP stub"
    org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1403 completed: No
    at com.sun.corba.ee.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:569)
    at com.sun.corba.ee.impl.logging.UtilSystemException.objectNotExported(UtilSystemException.java:592)
    at com.sun.corba.ee.impl.util.Utility.autoConnect(Utility.java:147)
    at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAny(Util.java:323)
    at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$10.write(DynamicMethodMarshallerImpl.java:256)
    at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.writeArguments(DynamicMethodMarshallerImpl.java:407)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:157)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
    at com.sun.enterprise.naming._SerialContextProvider_DynamicStub.rebind(_SerialContextProvider_DynamicStub.java)
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:403)
    at javax.naming.InitialContext.rebind(Unknown Source)
    at parlayxws.usecases.ejb.px_spec_v2_1.RunEjb.main(RunEjb.java:43)
    Exception in thread "main" javax.naming.CommunicationException: java.rmi.NoSuchObjectException: CORBA INV_OBJREF 1398080891 No; nested exception is:
    org.omg.CORBA.INV_OBJREF: vmcid: SUN minor code: 1403 completed: No
    at com.sun.enterprise.naming.SerialContext.rebind(SerialContext.java:405)
    at javax.naming.InitialContext.rebind(Unknown Source)
    at parlayxws.usecases.ejb.px_spec_v2_1.RunEjb.main(RunEjb.java:43)
    I assume the problem is in the javax.rmi.PortableRemoteObject's (HelloImpl's) constructor since that is the only code that's beeing executed. But how could that effect the instantiation of the InitialContext? I should also say that it seems that it is only the first time that an InitialContext is created that is critical. If I create on instance of it before instantiating the first PortableRemoteObject, all subsequently created instances of InitialContext succeed in binding remote (RMI-IIOP) objects.
    Can someone help me understand why this happens and how to avoid it? I don't want to have to create an InitialContext the first thing I do in the code. It seems the PortableRemoteObject constructor somehow changes the configuration in a way that makes the bindings fail... How? Why? Can I prevent it from happening?
    Any input appreciated!
    Kristofer

    my bean is running in my EJBServer, and I have it in the classpath of the RmiRegistry (which runs as part of my server). The RmiRegistry is an actual ".bat" file that starts an RMI Registry (I assume).
    The client is not a bean and is run like this:
    java com.titan.cabin.Client_1
    All it does is create a cabin and then read it back. It works, it not only gets the context, but also creates, persists and reads that cabin bean.
    Is it because java automatically finds all RmiRegistries running on the computer? This makes sense, but I read on java.sun.com that you need a stub class for your clients. And if it is true, then how does it get the context and remote/home interface of a bean on another server?

  • How to create InitialContext for JNDI lookup in a cluster?

              I am new to clusters in WL7 and I wanted to know how a client would create an InitialContext
              object to perform a JNDI lookup for a remote object deployed across serveral servers
              in the cluster. Is the following correct?
              Physcial Servers in the cluster
              machine1:9001
              machine2:9001
              machine3:9001
              Code for creating InitialContext
              Properties p = new Properties();
              p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              p.put(Context.PROVIDER_URL, "machine1:9001,machine2:9001,machine3:9001");
              Context c = new InitialContext( p);
              Thanks,
              Raffi
              

    Hi Ivaylo,
    There's another alternative solution to your problem. You can have the screen 120 as a user-defined selection screen. i.e., instead of creating this screen through the screen painter, you can create it from within your ABAP Program. This way, you can directly use the SELECT-OPTIONS statement within your screen. You then will no longer have to bother about how to handle the data for the field.
    Especially in the case where your screen 120 has few elements, this approach, in my opinion, will be the best.
    Please let me know if you need any further clarifications on how to go about it if you choose to follow this approach.
    Regards,
    Anand Mandalika.

Maybe you are looking for