Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

 
Bartender
Posts: 3647
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
You'll never get away with this you overconfident blob! The most you will ever get is this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic