Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > Software > Can't find property: java.naming.factory.initial

Reply
Thread Tools

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

 
 
joepareti joepareti is offline
Junior Member
Join Date: Jan 2008
Posts: 1
 
      01-03-2008
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(j ava.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.Strin g) (/lib/ssa/libgcj.so.4.0.0)
[java] at za.co.solms.finance.calculators.LoanCalculatorPane l.connect() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorPane l.init() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorPane l.LoanCalculatorPanel() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorClie nt.LoanCalculatorClient() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorClie nt.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.Nam ingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.namingrg. jnp.interfaces
jnp.socketFactory=org.jnp.interfaces.TimedSocketFa ctory
#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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 3 02-14-2011 05:28 AM
How to exclude action of Find::Find::find in subdirectories withknown names? vdvorkin Perl Misc 0 02-10-2011 05:18 PM
can find ImageButton but can't find button ad ASP .Net 2 11-20-2005 11:35 AM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
Find::Find Dan Jones Perl 1 10-08-2004 09:14 AM



Advertisments