Prev | Next | J2EETM Developer's Guide
Getting Started |
ConverterAppClient.jar
file. This jar file contains stub classes that allow the client to communicate with the enterprise bean instance that is running in the EJB container. You created the ConverterAppClient.jar
file in the section, "Deploying the J2EE Application".
testClient.sh
, change <installation-location> to the directory in which you installed the J2EE SDK.
2. Run the#!/bin/sh J2EE_HOME=<installation-location> CPATH=$J2EE_HOME/lib/j2ee.jar:ConverterAppClient.jar:. java -classpath "$CPATH" ConverterClient
testClient.sh
script.
testClient.bat
, change <installation-location> to the directory in which you installed the J2EE SDK.
2. Run theset J2EE_HOME=<installation-location> set CPATH=.;%J2EE_HOME%\lib\j2ee.jar;ConverterAppClient.jar java -classpath "%CPATH%" ConverterClient
testClient.bat
script.
ConverterClient
, you may encounter one of the following errors.
1. java.lang.ClassCastException
The program could not locate the classes in the2.ConverterAppClient.jar
file. Make sure that this file exists. You should have specified theConverterAppClient.jar
file in the section, "Deploying the J2EE Application".
java.lang.NoClassDefFoundError: ConverterClient
The3.java
launcher could not locate theConverterClient.class
. Verify that you compiledConverterClient.java
in the section, "Compiling the Client's Code".
java.lang.NoClassDefFoundError: javax/naming/Context
The program could not locate a class it needed in the4.lib/j2ee.jar
file. Make sure that you correctly defined the J2EE_HOME environment variable in thetestClient.sh
(UNIX) ortestClient.bat
(Windows) script.
javax.naming.NameNotFoundException: Lookup of name MyConverter failed.
The J2EE server could not locate the enterprise bean whose JNDI name is MyConverter
. Either you did not deploy the enterprise bean, or you specified the wrong JNDI name in the section, "Deploying the J2EE Application".
5. javax.naming.NamingException: Error accessing repository: Cannot connect to ORB at . . . .
The J2EE server is not running. See step 1 in the section, "Creating the J2EE Application".