aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Advice App - how does the client know where to send the request? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Advice App - how does the client know where to send the request?" Watch "Advice App - how does the client know where to send the request?" New topic
Author

Advice App - how does the client know where to send the request?

Vivek Ranjan
Greenhorn

Joined: Jun 18, 2010
Posts: 1
Hi,


Newbie planning to write the to SCBCD. I picked up the Headfirst EJB book and got as far as deploying AdviceApp app.

After the initial hiccup with the CORBA.BAD_OPERATION (natch), I was able to rename the methods and get the client working.

Now when I run the client, I do get the expected advice but it is at the end of a java.io.FileNotFoundException (see farther below).

My questions:

1. Why is it looking for security.properties? Isn't it a file in the RI server?

2. Why is it looking for security.properties in C:\Me\Dev\projects\config\ when I'm running the client from C:\Me\Dev\projects\advice and anyway C:\Me\Dev\projects\config doesn't even exist?

3 This one is more important: how does the client know where to send the request to when we're not even setting the INITIAL_CONTEXT_FACTORY and the PROVIDER_URL properties?


Thanks in advance.


java.io.FileNotFoundException: C:\Me\Dev\projects\config\security.properties (
The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:91)
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:190)
at org.omg.CORBA.ORB.create_impl(ORB.java:279)
at org.omg.CORBA.ORB.init(ORB.java:323)
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>(SerialInitC
ontextFactory.java:31)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
47)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241
)
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:173)
at AdviceClient.go(AdviceClient.java:22)
at AdviceClient.main(AdviceClient.java:16)
java.io.FileNotFoundException: C:\Me\Dev\projects\config\ejb.properties (The s
ystem cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:91)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42
)
at com.sun.enterprise.iiop.J2EEInitializer.<init>(J2EEInitializer.java:5
4)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at com.sun.corba.ee.internal.Interceptors.PIORB.registerORBInitializers(
PIORB.java:377)
at com.sun.corba.ee.internal.Interceptors.PIORB.parseProperties(PIORB.ja
va: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.jav
a:336)
at org.omg.CORBA.ORB.init(ORB.java:324)
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>(SerialInitC
ontextFactory.java:31)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:232)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
47)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241
)
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:173)
at AdviceClient.go(AdviceClient.java:22)
at AdviceClient.main(AdviceClient.java:16)

Warning: unable to read transaction.interoperability config property
java.io.FileNotFoundException: C:\Me\Dev\projects\config\security.properties (
The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:91)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42
)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<clinit>(S
ecurityMechanismSelector.java:102)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLS
ocketFactory.java:211)
at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(Connecti
onTable.java:73)
at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(Connecti
onTable.java:68)
at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:7
0)
at com.sun.corba.ee.internal.corba.InitialNamingClient.locateObject(Init
ialNamingClient.java:769)
at com.sun.corba.ee.internal.corba.InitialNamingClient.getIORUsingHostIn
fo(InitialNamingClient.java:597)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveCorbaloc(I
nitialNamingClient.java:573)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingORBIn
itRef(InitialNamingClient.java:544)
at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialRefe
rences(InitialNamingClient.java:1080)
at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_r
eferences(InitialNamingClient.java:981)
at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.ja
va:2425)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
a:52)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120
)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at AdviceClient.go(AdviceClient.java:23)
at AdviceClient.main(AdviceClient.java:16)
Imagination is more important than knowledge...
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3178
    
    3
Vivek Ranjan wrote:Hi,


Newbie planning to write the to SCBCD. I picked up the Headfirst EJB book and got as far as deploying AdviceApp app.



Hello Vivek !

HF EJB is a bit outdated - it describes EJB 2.0, and you can't take SCBCD for EJB 2.0 - the exam was retired.

I would advise you to get a copy of O'Reily's "Enterprise JavaBeans 3.0" (5-th dition) by Richard Monson-Haefel and Bill Burke.

http://oreilly.com/catalog/9780596009786

There is a workbook for the book:

http://sourceforge.net/projects/jboss/files/O_Reilly%20EJB%203.0%20Workbook/

You can try to run examples on JBoss App Server.

HTH,
MZ


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Advice App - how does the client know where to send the request?
 
Similar Threads
error, executing client for entity bean
Urgent....Runtime error when running client
AdviceClient Problem
FileNotFoundException - ejb.properties not found wihle doing JNDI lookup
Cannot able to run the advice aplication..any help!!