File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Should I install J2EE on Client side? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Should I install J2EE on Client side?" Watch "Should I install J2EE on Client side?" New topic

Should I install J2EE on Client side?

DaDa Zhu

Joined: Jan 07, 2001
Posts: 11
Please let me know if I need J2EE installed on the client.
I guess it should not, but I am confused on Sun's EJB example of Converter.It asks me to running the EJB client in the following way:
java -classpath =
.;%J2EE_HOME\lib\j2ee.jar;ConverterAppClient.jar ConverterClient
which means %J2EE_HOME\lib\j2ee.jar has to be on the client machine.
Please help.
Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Copy the J2EE.jar, ConverterAppClient.jar and ConverterClient.class into a directory in the client system.
Set the classpath to that directory and then run the client.
java -classpath ConverterClient
Try it and do get back.

DaDa Zhu

Joined: Jan 07, 2001
Posts: 11
Thanks for your help.
I moved these three files to a folder on another machine, and run the client, got a bunch of errors, start with the following
three lines:
ERROR! Shared library library ioser12 could not be found.
Caught an unexpected exception!
javax.naming.Communication Exception: Can't find SerialContextProvider
any idea? I am wondering I may need to move some other jar files
from j2ee to the client, and may be I also need some JNDI seeting on the client?
Then I moved these three files to a local folder on the server, and run the client, this time I got errors start with:
Caught an unexpected exception:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application file: java.naming.factory.initial
Please help.
Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Hi DaDa Zhu
In the second case for"No initialContext Exception" .
1. Have you set the classpath to the directory from which you
are running the client?
2. Also set the classpath to the jar file you have created
(in the Environment or System variable listing.
You can do this by going to Start -> Settings ->Control Panel
->System ->Environment Variables and set it up there
3. Also please specify the J2EE home and JDK home parameters.
Do get back please.
DaDa Zhu

Joined: Jan 07, 2001
Posts: 11
I copied the following three files
j2ee.jar, ConverterAppClient.jar, ConverClient.class
to a directory on a client machine,
switch to that directory, and executed in the command line
java -classpath .;j2ee.jar;ConverterAppClient.jar ConverClient
and got the errors in my last email.
I do not have classpath in the environment, since I do not need them, when I execute my program in the above way.
I have JDK_HOME path, also Jave Runtime is installed on the client. But I do not have J2EE_HOME, I do not know what it should be, since I do not have J2EE SDK on my client machine.
Should I set it to the J2EE SDK folder on the server?

[This message has been edited by DaDa Zhu (edited January 16, 2001).]
Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Yes Please set the J2EE home to the one on the server.
Please do get back as I unable to generate the same errors.
benoit rolland

Joined: May 31, 2001
Posts: 2
I encountered a similar problem:
Could any one help ?
I tried sun's jms example provided with the J2ee1.3 beta release
(the jms api and a jms server are included in j2ee1.3) and
It worked perfectly locally, but i didn't manadged to have the SimpleQueueSender working distantly.
This is what i get:
E:\benoit\jmsClient>java\ SimpleRemoteQueueSender MyQueue 3
Queue name is MyQueue
JNDI lookup failed: javax.naming.CommunicationException: Can't find SerialContextProvider

This the code i added to try to connect to my jndi server:
Properties env = new Properties();
* Create a JNDI InitialContext object if none exists yet.
try {
jndiContext = new InitialContext(env);

Could anyone help ?

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

No one has mentioned this, so thought I'd post it.

From the J2EE 1.2.1 Developer's Guide.

Perhaps this will help.
alessandro bosco

Joined: Jul 07, 2001
Posts: 1
hi all, i have a problem. My client don't work, even less launch my client with the option -CPATH=.:$J2EE_HOME/lib/j2ee.jar:ConvertAppClient.jar
java -Dorg.omg.CORBA.ORBInitialHost= -classpath "$CPATH" ConverterClient. I see that should be right, but in my case don't work but launch an exception can't find SerialContextProvider.
my configuration is: a Linux machine( with installed j2sdkee1.2.1 and another linux. The 2 machine are interconnected with cross-connect cable and the ping work right.
p.s. i don't have properly installed the client, i have only connected the 2 machine with the cable.
I agree. Here's the link:
subject: Should I install J2EE on Client side?
It's not a secret anymore!