• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Should I install J2EE on Client side?

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
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.
Regards
Suneel
 
DaDa Zhu
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suneel,
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
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Regards
Suneel
 
DaDa Zhu
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suneel,
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?
Thanks.

[This message has been edited by DaDa Zhu (edited January 16, 2001).]
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Please set the J2EE home to the one on the server.
Please do get back as I unable to generate the same errors.
Thanks
Regards
Suneel
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
SimpleQueueSender.java and SimpleQueueReceiver.java http://java.sun.com/products/jms/tutorial/html/client.fm.html
It worked perfectly locally, but i didn't manadged to have the SimpleQueueSender working distantly.
This is what i get:
E:\benoit\jmsClient>java -Djms.properties=.\jndi.properties 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();
env.put(Context.SECURITY_PRINCIPAL,"guest");
env.put(Context.SECURITY_CREDENTIALS,"guest123");
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
env.put(Context.PROVIDER_URL,"iiop://172.20.1.208:1050/");
/*
* Create a JNDI InitialContext object if none exists yet.
*/
try {
jndiContext = new InitialContext(env);

Could anyone help ?

 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No one has mentioned this, so thought I'd post it.

From the J2EE 1.2.1 Developer's Guide.


Perhaps this will help.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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=192.168.1.1 -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(192.168.1.1) 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.
reply
    Bookmark Topic Watch Topic
  • New Topic