Java.naming.ORB   system property

Hello,
In my program, i want to set java.naming.ORB system property to the ORB that is already initialized. Is there any way to do this ??
Thanks.

Don't post this again. You already asked it here: http://forum.java.sun.com/thread.jsp?thread=401537&forum=31&message=1751719

Similar Messages

  • Imqobjmgr does not recognize the value of java.naming.provider.url property

    On Windows, I am running imqobjmgr 4.3
    when I run imqobjmgr -i list.properties, I am getting the following error
    Error [A3052]: imqobjmgr does not recognize the value of java.naming.provider.url property.
    Why is that?
    classpath
    C:\Sun\SDK\imq\lib\jms.jar;C:\Sun\SDK\imq\lib\imq.jar;C:\Sun\SDK\imq\lib\fsconte
    xt.jar;.
    contents of list.properties
    # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    # Copyright 2000-2008 Sun Microsystems, Inc. All rights reserved.
    # The contents of this file are subject to the terms of either the GNU
    # General Public License Version 2 only ("GPL") or the Common Development
    # and Distribution License ("CDDL") (collectively, the "License"). You may
    # not use this file except in compliance with the License. You can obtain
    # a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
    # or mq/legal/LICENSE.txt. See the License for the specific language
    # governing permissions and limitations under the License.
    # When distributing the software, include this License Header Notice in each
    # file and include the License file at mq/legal/LICENSE.txt. Sun designates
    # this particular file as subject to the "Classpath" exception as provided by
    # Sun in the GPL Version 2 section of the License file that accompanied this
    # code. If applicable, add the following below the License Header, with the
    # fields enclosed by brackets [] replaced by your own identifying information:
    # "Portions Copyrighted [year] [name of copyright owner]"
    # Contributor(s):
    # If you wish your version of this file to be governed by only the CDDL or
    # only the GPL Version 2, indicate your decision by adding "[Contributor]
    # elects to include this software in this distribution under the [CDDL or GPL
    # Version 2] license." If you don't indicate a single choice of license, a
    # recipient has the option to distribute your version of this file under
    # either the CDDL, the GPL Version 2 or to extend the choice of license to
    # its licensees as provided above. However, if you add GPL Version 2 code
    # and therefore, elected the GPL Version 2 license, then the option applies
    # only if the new code is made subject to such option by the copyright holder.
    # @(#)list.properties     1.11 07/02/07
    # This property file will list administered objects
    # Version of command file
    # NOTE: This is not the version of the Sun Java(tm) System Message Queue product
    version=2.0
    cmdtype=list
    # If you want to only list a particular type of administered
    # object, uncomment the following line and specify the type.
    # Acceptable values for the type property are: t, q, tf, and qf,
    # where t = topic, q = queue, tf = topic connection factory, and
    # qf = queue connection factory.
    #obj.type=
    # To use the LDAP service provider implementation from
    # Sun Microsystems, uncomment the following two property lines
    # and set the url property correctly.
    objstore.attrs.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
    objstore.attrs.java.naming.provider.url=ldap://localhost:389/ou=imqobjmgr,o=sun.com
    # To use the File System service provider implementation from
    # Sun Microsystems on Solaris, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///home/foo/imq_admin_objects
    # To use the File System service provider implementation from
    # Sun Microsystems on Windows, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///C:/imq_admin_objects
    #objstore.attrs.java.naming.security.authentication=
    #objstore.attrs.java.naming.security.principal=
    #objstore.attrs.java.naming.security.credentials=

    I see you're using Sun Java System Message Queue. There's a forum specific to that product over at [http://forums.sun.com/forum.jspa?forumID=711&start=0|http://forums.sun.com/forum.jspa?forumID=711&start=0] . You could try asking there.
    Nigel

  • Java gets the system property  ????

    I' am want create Java-Applet for get data system property in computer, when another computers used open this applet , give show data system property ( what os ?,quantity ram ?, quantity harddisk, name cd-rom ? etc. ) what can i do ????

    Don't post this again. You already asked it here: http://forum.java.sun.com/thread.jsp?thread=401537&forum=31&message=1751719

  • 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

    Hi!
    I got this error message at runtime.
    After adding value to the Intialcontext by adding the following code snippet:
    Properties p = new Properties();
    p.put("java.naming.factory.initial",
    "com.sun.jndi.cosnaming.CNCtxFactory");
    p.put("java.naming.provider.url",
    "iiop://127.0.0.1:9010");
    initContext = new javax.naming.InitialContext(p);
    After this i am getting different error message:
    org.omg.CORBA.COMM_FAILURE:
    minor code: 1 completed: Maybe at om.sun.corba.se.internal.iiop.IIOPConnection.purge_calls(Unknown Source)
    at com.sun.corba.se.internal.iiop.ReaderThread.run(Unknown Source)
    Looking forward a proper solution
    for this problem.
    Thanks in advance.
    Regards,
    James Arun

    I have find the code to specify the naming context property to access another host
    Properties props = new Properties();
    props.setProperty("java.naming.factory.initial",
    "com.sun.enterprise.naming.SerialInitContextFactory");
    props.setProperty("java.naming.factory.url.pkgs",
    "com.sun.enterprise.naming");
    props.setProperty("java.naming.factory.state",
    "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
    // optional. Defaults to localhost. Only needed if web server is running
    // on a different host than the appserver
    props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
    // optional. Defaults to 3700. Only needed if target orb port is not 3700.
    props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");

  • Setting up java.system.property in WL 6.0

    Hi all,
    I just installed Web Logic 6.0. I would like to know if anyone knows how
    to set java.system.property in Web Logic 6.0
    In old Web Logic 5.1, I added this line in weblogic.properties file. Now
    since we don't have weblogic.properties file anymore, I am assuming this
    should go in config.xml. Documentation says I should use Admin Console
    to modify config.xml and to convert old weblogic.properties file, but I
    found Admin Console confusing.
    My Web Logic 6.0 is installed on d:\bea\. I clicked on Convert
    Weblogic.properties and I see directories on my system. I click on icon
    to get the directory that has weblogic.properties file. Then I get page
    that ask me to pick Clusters and Server and I have no idea what
    directory I need to click on
    If someone knows what to do next or how to edit Config.xml so that I can
    add my java.system.property, please e-mail me
    Thanks in advance
    Qaiser

    Did you see the directions on page 3-11 of the WLS 6.0 Administration Guide? I
    followed these steps, and was able to create a new domain. I found them to be
    clear.
    Laurel
    "Jesper de Jong" <[email protected]> wrote:
    >
    Hello all,
    Instead of working with "mydomain" and "myserver" I want to create my
    own domain.
    IMHO, the documentation on e-docs is not very clear on the steps that
    are necessary
    to do this.
    What are the steps, or where can I find better documentation on creating
    a domain?
    regards,
    Jesper

  • Passing Java system property at runtime

    How to set system property at runtime?
    Imaging the situation - application is already run. One of the threads polls system properties periodically. In debug purposes I need to set system during program is working. How can I do that?

    Not possible.
    Far as I know not possible for any app (not just java) and true for most popular desktop OSes as well.
    The environment is copied into the application (all applications) when it starts. So external changes will not impact it.

  • Java.system.property

    I repost Craig Sandin's question, which was post on Feb 06th. I have the same problem
    as him.
    I have used java.system.property in my wls 5.1 weblogic.properties file, and it
    set a system property I could get at runtime. Is there an equivalent in wls 7.0?
    I haven't found anything in the documentation for config.xml. Obviously I can
    pass -D options to the jvm, but I was looking for a way from the config file.
    hongjie

    We don't offer this anymore.. Sorry.
    You could write your own very simple
    wrapper class to start WLS:
    Properties props = new Properties();
    props.load(new FileInputStream("weblogic.properties");
    System.setProperties(props);
    weblogic.Server.main();
    Cheers
    mbg
    "hongjie" <[email protected]> wrote in message
    news:[email protected]..
    >
    I repost Craig Sandin's question, which was post on Feb 06th. I have thesame problem
    as him.
    I have used java.system.property in my wls 5.1 weblogic.properties file,and it
    set a system property I could get at runtime. Is there an equivalent inwls 7.0?
    I haven't found anything in the documentation for config.xml. Obviously Ican
    pass -D options to the jvm, but I was looking for a way from the configfile.
    >
    hongjie

  • Add a system property when the deployment java command is build by jdevelop

    Hello everybody,
    I have fedora core 4 installed using jdk 1.4.2_06 and JDeveloper 9.0.5.2.
    I have cofigured a connection to a external OC4J standalone where I want to deploy my applications.
    There are a problem between fedora core 4 anda jdk 1.4.2 that it's solved adding the argument "-Djava.net.preferIPv4Stack=true" to the java command when it's run.
    The problem is that I don't know where I must put this parameter so that when I do a deployment to the OC4J Standalone, the command that jdeveloper build include this system property. Now the command that it builds is
    java -jar admin.jar ...
    I need that the command was:
    java -Djava.net.preferIPv4Stack -jar admin.jar ...
    Thank you very much in advance.

    I'll see this menu, but it allow to configure the internal OC4J standalone of the JDeveloper.
    I want to deploy to an OC4J standalone that is external to JDeveloper, and that is running in another machine.

  • Why can't change default cipersuits of JSSE by java system property?

    I am using jdk1.5.0_17,Now I am trying to change default ciphersuits of JSSE by java system property,so all code can be kept unchanged.In JSSE Reference Guide I know default ciphersuits can be customized by https.cipherSuites system property.I run my program by java -Dhttps.cipherSuites=SSL_RSA_WITH_RC4_128_MD5 myProgram
    but it doesn't work.the default ciphersuits of jre are always used.I am not able to change it.
    any comments? your help will be appreciated.

    Well that only works with HTTPS, i.e. with URLs and HttpsURLConnections. If you're using Sockets directly you have to use the API.

  • -D for System property in java

    Hi,
    What does -D means in a System Property? Is there any other notation that can be given as well apart from -D? Please clarify.
    Thanks.

    BIJ001 wrote:
    A sidenote: the -D command line syntax resembles some (for example the GNU and the Borland command line) C compiler's define feature: Hm, system properties can hardly be compared to preprocessor directives, but it would be a reasonable answer to the (pointless) question "why'd they pick -D" :)

  • How to specify class name in environment or system property

    Hi,
    Iam learning ejb. I was practicing the stateless session bean. I wrote a sample hello world application. While executing the client am getting the following error.
    {color:#ff0000}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(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at hw.HelloClient.main(HelloClient.java:20){color}
    My Client program:
    {color:#3366ff}package hw;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.*;
    import java.util.*;
    public class HelloClient {
    public static void main(String[] args)throws Exception {
    Properties prop = System.getProperties();
    Context ctx= new InitialContext(prop); {color:#800000}// {color}{color:#800000}(Line no :20) here only error is pointing{color}
    Object obj = ctx.lookup("HelloHome");
    HelloHome home = (HelloHome)javax.rmi.PortableRemoteObject.narrow(obj,HelloHome.class);
    Hello hello = home.create();
    System.out.println(hello.hello());
    hello.remove();
    }{color}
    please suggest me a solution.
    note: iam using eclipse ganymede and jboss app server
    Edited by: Arun_ece on Mar 10, 2009 1:13 AM

    Hi,
    You need to create a ejb-jar.xml and jboss.xml files to deploy the application on the servers.
    Also, put these lines of codes after getting System Properties.
    prop.put(Context.PROVIDER_URL, "iiop://localhost:[port_no]");Thanks,
    Srikant

  • How to set my System Property for frmall.jar like !

    I have a JAR file named SecAuth.jar in ORACLE_HOME\forms\java\ directory.
    I configured this JAR file in ORACLE_HOME\forms\server\formsweb.cfg file archive tag. Like,
    archive=frmall.jar,SecAuth.jar
    Its working very nice.
    Now I need to give a System Property to one of the Class file in the SecAuth.jar !
    Actually my System Property is,
    -Dproject.system.securityFile=C:\client\security.properties
    How can I do this sir ? Can someone help me ?

    Try looking in the $ORACLE_HOME/opmn/conf/opmn.xml file. You'll see a set of process definitions that correspond to the OC4J instances you have configured. There should be a "start-properties" or some similar element to that, in which you can place your required System property. There should be examples of properties in there already.
    When OPMN starts your OC4J process, it will pass it the System property you set (along with all the other ones that were already there).
    -steve-

  • Setting Derby system property in Sun Application Server batch file

    Hi all,
    I am trying to set up a home directory for my Derby databases other than the default C:\Sun\AppServer\lib that is used when asadmin.bat runs.
    I have found in the derby documentation you can set the derby.system.home System Property using -Dderby.system.home="C:\databases" and I have tried to do this in the asadmin.bat file next to all the other system properties containing the -D option.
    But still no luck, when I load the server using asadmin and check the server log file I can tell the property is not being set. I can also tell its not being set because I can't ping my database connection in the admin console. Any ideas anyone?
    Much appreciated,
    Alman

    Here is what I tried.
    No jndiname works but when I leave the value empy I get the result (see end)
    Properties props = new Properties();
    props.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
    props.put("java.naming.provider.url", "iiop://localhost:3700");
    InitialContext initialContext = new InitialContext(props);
    //queueConnectionFactory = (QueueConnectionFactory) initialContext.lookup( "jms/qschdinfact");
    //queue = (Queue)initialContext.lookup("jms/qschdin");
    Enumeration en = initialContext.listBindings("");
    while(en.hasMoreElements()) {
    Binding b =(Binding)en.nextElement();
    System.out.println(b);
    ServerObject: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    intakefacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    commonfacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    J2EE_UNIQUE_VALUE_GEN: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    trackfacade: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    hsface: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    DatabaseInformation: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    Realm_Manager: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    SerialContextProvider: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    usergroups: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    intakereporter: com.sun.corba.se.internal.iiop.CDRInputStream_1_0$1:com.sun.corba.se.internal.iiop.CDRInputStream_1_0
    Help please

  • NoInitialContextException:  ...java.naming.factory.initial

    Calling J2eeRi.LookupEjbHome() throughs a NoInitialContextException (see bottom) in the last example of the COM Bridge Tutorial:
    ----- last line of the following code segement throws exception:
    Dim JvmCtl As New JvmControl
    JvmCtl.Classpath = "%J2EE_HOME%\lib\j2ee.jar;%COMBRIDGE_HOME%\doc\guide\examples\lib\AccountAppClient.jar"
    JvmCtl.StartJvm
    Set J2eeRi = New J2eeRiServices
    J2eeRi.ProviderURL = "iiop://localhost:1244" '1050
    Set AcctHome = J2eeRi.LookupEjbHome("MyAccount", "account.AccountHome")
    java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException: 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:638)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:278)
         at javax.naming.InitialContext.lookup(InitialContext.java:345)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.sun.interop.beans.PrivilegedMethodInvokeAction.run(PrivilegedMethodInvokeAction.java:51)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.interop.beans.RegularDispatcher.invoke(RegularDispatcher.java:142)
         at com.sun.interop.dispatch.InstanceProxy.Invoke(InstanceProxy.java:96)
    java.lang.Exception: Could not call javax.naming.InitialContext.lookup because: 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 com.sun.interop.beans.RegularDispatcher.invoke(RegularDispatcher.java:159)
         at com.sun.interop.dispatch.InstanceProxy.Invoke(InstanceProxy.java:96)
    java.lang.Exception: Could not call javax.naming.InitialContext.lookup because: 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 com.sun.interop.beans.RegularDispatcher.invoke(RegularDispatcher.java:159)
         at com.sun.interop.dispatch.InstanceProxy.Invoke(InstanceProxy.java:96)
    What's missing here?

    http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/Context.html
    maybe you should set the property:Context.INITIAL_CONTEXT_FACTORY
    try that.

  • Org.xml.sax.SAXException: System property org.xml.sax.driver not specified

    Hi,
    I am running Jdeveloper 9.0.3.1 and using embedded OC4J.
    Getting following error when trying to run the application. Please help me if you can.
    Thanks
    Tareq
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:90)
         at net.sundog.struts.ActionFinderPlugIn.parseHtmlFiles(ActionFinderPlugIn.java:76)
         at net.sundog.struts.ActionFinderPlugIn.searchDirectory(ActionFinderPlugIn.java:64)
         at net.sundog.struts.ActionFinderPlugIn.init(ActionFinderPlugIn.java:50)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1156)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpApplication.loadServlet(HttpApplication.java:1956)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpApplication.findServlet(HttpApplication.java:4355)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpApplication.getRequestDispatcher(HttpApplication.java:2750)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:617)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

    try to look on xml.apache.org for this error. There should be some pages describing how and why setup this property.
    Basically, these properties defines factories for javax extensions. javax defines interfaces and providers than supply implementations, so for example you can use different XML parsers implementations (we use Xalan for one OC4J container and original ORACLE parser for other). To bind this together they use some defined mechanism like setting system property of including special manifest file etc. (I don't know about details)
    Myrra

Maybe you are looking for

  • I only get a blank page when trying to print a web page

    I have looked up how to print a web page and did exactly as shown on the screen (I did select my printer) but when I want to print a Web page I only get a blank page. I also cannot save as PDF in the Print Dialog Box because I get a blank page there

  • I am looking for a app which enables me to write in a document on my iPad2, for instance in word documents

    I have a iPad 2. Someone told me there would be a App which i can download that enables me to write in a document on my iPad, on the screen. For instances during a business meeting. Then it is not necessary anymore to print the document when i want t

  • Code in Dreamweaver

    Hi, I have recently created a site using Dreamweaver and posted it on to some forums. Some of the comments were that the code was poor and that Dreamweaver was not good enough. Is it not possible to build a site in Dreamweaver and tidy the code yours

  • Flash Differences between Browsers

    http://www.guygar.com/inception/fiction/ Thank you for your interest; here is the issue I am having. The above URI with FLV movie renders fine in Firefox, Chrome and Safari. But when viewed in IE9 the movie displays strangely, somehow the movie is no

  • Noise when using NVIDIA HDMI output

    Trying to use audio over HDMI output on an NVIDIA GTX580, using nvidia 331.38, results in the audio transmitted with a large amount of noise on top of it. I'm not sure quite what is helpful to say here, though. Just using ALSA, no PulseAudio or anyth