Meaningless Drivel is fun!*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes AdviceClient Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "AdviceClient Problem " Watch "AdviceClient Problem " New topic
Author

AdviceClient Problem

Nura Horne
Ranch Hand

Joined: Jul 26, 2001
Posts: 40
Hi,
I am getting a "FileNotFound configs/security.properties" when I run the AdviceClient from HeadFirst EJB.
Has anyone else experienced this? I am on WinXP, JDK1.4, J2EE1.3.1 and am starting the J2EE RI from the projects/advice directory.
Any ideas?
Thanks
Arun
David Harrigan
Ranch Hand

Joined: Sep 16, 2003
Posts: 43
Hi,
Can you post the entire stack trace that you are getting please. That may be helpful in tracking down your problem.
-=david=-
Kirk Woerner
Greenhorn

Joined: Feb 05, 2004
Posts: 4
I got the same error (As well as the other Corba one which the method name change fixed) Two fixes I found worked.
1) creste a config directory under project/advice and copy in security.properties and ejb.properties from the config directory under the J2EE_HOME.
2) run your AdviceClient app from J2EE_HOME
It looks for these files in ./config apparently. Which is wierd cause I'd expect all that to be in the jar file (?)
Stack trace below..
--------------------------
java.io.FileNotFoundException: c:\usr\local\client\j2ee\projects\advice\config\security.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.POAEJBORB.<clinit>(POAEJBORB.java:78)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.omg.CORBA.ORB.create_impl(ORB.java:295)
at org.omg.CORBA.ORB.init(ORB.java:336)
at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:138)
at com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
at com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitContextFactory.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at AdviceClient.go(AdviceClient.java:15)
at AdviceClient.main(AdviceClient.java:10)
java.io.FileNotFoundException: c:\usr\local\client\j2ee\projects\advice\config\ejb.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.J2EEInitializer.<init>(J2EEInitializer.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at com.sun.corba.ee.internal.Interceptors.PIORB.registerORBInitializers(PIORB.java:377)
at com.sun.corba.ee.internal.Interceptors.PIORB.parseProperties(PIORB.java:347)
at com.sun.corba.ee.internal.TxPOA.TxPIORB.parseProperties(TxPIORB.java:116)
at com.sun.corba.ee.internal.corba.ORB.set_parameters(ORB.java:461)
at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:156)
at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:336)
at org.omg.CORBA.ORB.init(ORB.java:337)
at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:138)
at com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
at com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitContextFactory.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at AdviceClient.go(AdviceClient.java:15)
at AdviceClient.main(AdviceClient.java:10)
Warning: unable to read transaction.interoperability config property
java.io.FileNotFoundException: c:\usr\local\client\j2ee\projects\advice\config\security.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<clinit>(SecurityMechanismSelector.java:102)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:211)
at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:73)
at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:68)
at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:70)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(InitialNamingClient.java:769)
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostInfo(InitialNamingClient.java:597)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(InitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBInitRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:2425)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:52)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at AdviceClient.go(AdviceClient.java:16)
at AdviceClient.main(AdviceClient.java:10)
bhaskar yallala
Greenhorn

Joined: Feb 05, 2004
Posts: 4
I guess that is the path problem..just make sure all j2ee libraries in class path.
Kevin Kennedy
Greenhorn

Joined: Feb 09, 2004
Posts: 1
Never trust what's in print...
http://www.oreilly.com/catalog/hfjava/errata/
Robert Glover
Greenhorn

Joined: Feb 07, 2004
Posts: 26
I had a java path problem with a a new computer running xin/xp, j2se1.4
and j2ee1.3.1 that might be related to your problem or at any rate give you some food for thought.
As the computer came out of the box it had in the PATH a directory that had embedded spaces in it. Spaces in a directory name or a file name can confuse the java compiler and java runtime, in my experience.
What I did to fix it was to make sure the directory name that had embedded apaces was LAST in the "path". That way the java compiler and runtime found the java related directories prior to getting (harmlessly) confused by the non-java directories that have spaces.
This by the way is a problem that also happens if you install JDeveloper into the "Program Files" directory. The embedded spaces in "program files" cause problems.


So far I am: IBM 141 XML and Related Technologies Certified, Sun Cert Java Programmer, Sun Cert Java Developer, Sun Cert Java 2 Architect, Sun Cert J2EE Architect (part 1 only), Sun Cert J2EE Web Component Developer, Sun Cert Business Component Developer, and Microsoft Certified System Engineer for Win NT 4.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AdviceClient Problem
 
Similar Threads
AdviceClient compiler error in HFE
NoInitialContextException
NoInitialContextException :- running AdviceClient
error with EJB first example
Advice Client problem