Can't find property: java.naming.factory.initial

Discussion in 'Software' started by joepareti, Jan 3, 2008.

  1. joepareti

    joepareti

    Joined:
    Jan 3, 2008
    Messages:
    1
    I am developing a demo based on JBOSS 4.2.0.CR2 on Linux RHEL 3/x86.
    The demo includes an EJB (stateless session bean), and a client app that requests services from the bean.

    I invariably get the following rt error when launching the client as
    # ant runClientApp

    [java] javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial
    [java] at javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) (/lib/ssa/libgcj.so.4.0.0)
    [java] at javax.naming.InitialContext.getDefaultInitCtx() (/lib/ssa/libgcj.so.4.0.0)
    [java] at javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
    [java] at javax.naming.InitialContext.lookup(java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
    [java] at za.co.solms.finance.calculators.LoanCalculatorPanel.connect() (Unknown Source)
    [java] at za.co.solms.finance.calculators.LoanCalculatorPanel.init() (Unknown Source)
    [java] at za.co.solms.finance.calculators.LoanCalculatorPanel.LoanCalculatorPanel() (Unknown Source)
    [java] at za.co.solms.finance.calculators.LoanCalculatorClient.LoanCalculatorClient() (Unknown Source)
    [java] at za.co.solms.finance.calculators.LoanCalculatorClient.main(java.lang.String[]) (Unknown Source)

    my jndi.properties, available in classpath and also under $JAVA_HOME, is as follows:
    (I also saw jndi.properties is included in the client jar file, so I assume it is taken into account):

    java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
    java.naming.provider.url=jnp://localhost:1099
    java.naming.factory.url.pkgs=org.jboss.naming:eek:rg.jnp.interfaces
    jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory
    #Connection timeout (0 == blocking)
    jnp.timeout=0
    #Read timeout (0 == blocking)
    jnp.sotimeout=0

    Finally, I started playing around with the client code by e.g. changing the name of the bean in the lookup function ...

    Object beanHomeRef
    = jndiContext.lookup(jndiName);

    into

    Object beanHomeRef
    = jndiContext.lookup("local/ejb/LoanCalculator");

    but without any results
     
    joepareti, Jan 3, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGFsZQ==?=

    WinXP Initial Connection - Can it connect PRIOR to user login?

    =?Utf-8?B?RGFsZQ==?=, Jul 13, 2005, in forum: Wireless Networking
    Replies:
    2
    Views:
    602
    Jerry Peterson[MSFT]
    Jul 15, 2005
  2. FanYe1976@gmail.com
    Replies:
    2
    Views:
    3,182
    Steven L Umbach
    Oct 26, 2005
  3. TommyC
    Replies:
    5
    Views:
    808
    Dave Cohen
    Aug 21, 2005
  4. sateesh
    Replies:
    0
    Views:
    1,021
    sateesh
    Oct 14, 2008
  5. TonyDyer

    <value> could not be set on property <property name>

    TonyDyer, Feb 14, 2012, in forum: General Computer Support
    Replies:
    0
    Views:
    985
    TonyDyer
    Feb 14, 2012
Loading...

Share This Page