Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Andree Charfen

Ranch Hand
+ Follow
since Mar 24, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andree Charfen

If the compiler cant find the Advice classes you havent added the client jar file that the RI tool created to the CLASSPATH!
OH YES! Got it working! Wow!

I got the example working after a lot of work. All the research helped me to understand a lot of things. I wished java was a little more transparent as far as configuration. I hate all the deal with CLASSPATH vars and stuff like that. Oh well...
OK... I am messing with everything I can.

What do I need to have on my hardcoded properties for the lookup. I dont get it yet!

Properties prop = new Properties();

prop.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext.RefFSContextFactory");
prop.put(Context.PROVIDER_URL,"127.0.0.1:4848");


???
classpath = %J2EE_HOME%/lib/j2ee.jar;C:\java\SCBCD\Advice\
got the same error as you guys. Did you find anything??!?!
[ May 13, 2005: Message edited by: Andree Charfen ]
OH wow... I have been trying to run the example in chapter 1 for 2 days now! hahaha.... ok here is where I am:



C:\>java -cp %CLASSPATH%;AdviceAppClient.jar AdviceClient

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/JDKBridge

{....}

at javax.naming.InitialContext.lookup(Unknown Source)
at AdviceClient.go(AdviceClient.java:25)
at AdviceClient.main(AdviceClient.java:11)


I made a search and couldnt find anything on this PARTICULAR error with the JDKBridge thing! Still fighting to get it running! PLEASE HELP ME
Here is the exception:

javax.naming.NoInitialContextException

Here is the code line:

Object o = ic.lookup("java:comp/env/Advisor");

I have tried also:

Object o = ic.lookup("Advisor");

and yes Advisor is the JNDI name for the EJB Object.

Any ideas :roll:

OH and I start the server from the J2EE 1.4 SDK start menu where it says start default server. Is that correct? AH!
[ May 13, 2005: Message edited by: Andree Charfen ]
Oh I would really like to chech that tree. Now for the App Server that I am using well here is what I am doing (I am new at EJB):

I am using the newst J2EE server (1.4). I know that b/c I downloaded it a few days ago. I am using the deploytool to start my EJB and its JNDI name. The client I am coding it in Eclipse (I dont think that matters anyways).

In the deploytool it does show that my ejb is running. But what else can I do?
hummmmm..... I was doing a little research and I found an example that does a lookup and it includes the whole path, like this:

"java:comp/env/com/app/beanjndi"

humm.... I thought you did have to do that. The HF book doesnt show the whole path.

HI. I have the HF book. In chapter 1 there is an example called the Advice Guy. I got it compiling and everything but at runtime the JNDI cannot find the bean (when the context does the lookup). The server is running as well as the Bean. And I did set the right bean JNDI name. But it just wont do it. I dont have the excact error with me, but I do know it was that the JNDI couldnt find the Bean.

What else could I be missing? Thank you for your help.
[ May 12, 2005: Message edited by: Andree Charfen ]
Hi everyone. I would like to practice creating EJB components. I understand that the only thing I need is J2EE including the deploytool. Can I do the linking to a database using the deploytool? What else do I need if not?

Thank you for your help
Thank you for everyones help. I will check out your options.
Ops. Sorry I duplicated this topic. I couldnt remember if I had alredy asked this but I did.

I guess an administrator can delete this.
HI everyone. I am preparing for the SCBCD. I want not only to learn the information but practice creating and using beans. What is the best or best known IDE for creating EJB? Is it Eclipse?

Thank you for your help
Hi everyone. I am working on my SCBCD certification. Now.. I want to also know which is the preferred IDE for developing Beans. Is it Eclipse? JCreator? What are developers using for this and Java?

Thank you in advance...